windowed mode titlebar icon

Previous topic - Next topic

Kuron

Does anybody know of a "working" method to put an icon in the title bar or a GLBasic program that is running in windowed mode?

Gernot keeps suggesting Resource Hacker, but I have been unable to find any tutorials that explain how to do this with Resource Hacker.  What Gernot has suggested only changes the icon in the EXE itself (which I already knew how to do) and it does not affect the titlebar icon displayed when in windowed mode.

Since GLBasic programs do NOT have an icon for windowed mode programs, there is nothing to change with resource hacker, and all that is displayed in the titlebar is the default windows "file" icon.

My games are windowed mode only, and I need to get this figured out, any help would be appreciated.

Kitty Hello

If you change the icon, the title bar icon changes, too. Make sure you change the whole icon. An icon can store several images for each size/color. like: 16x16x8bit, 32x32x24bit - both in _one_ icon. Honestly - I just load the first icon from the exe's resource and display it. There's no magic.

Can anyone make a small tutorial, please? I don't have resource hacker her - I use visual studio.

Kitty Hello

If you change the icon, the title bar icon changes, too. Make sure you change the whole icon. An icon can store several images for each size/color. like: 16x16x8bit, 32x32x24bit - both in _one_ icon. Honestly - I just load the first icon from the exe's resource and display it. There's no magic.

Can anyone make a small tutorial, please? I don't have resource hacker her - I use visual studio.

Kuron

QuoteIf you change the icon, the title bar icon changes, too.
No it doesn't. in fact there is NO default icon for the titlebar, it uses the generic Windows file icon, not the exe's icon.

QuoteMake sure you change the whole icon. An icon can store several images for each size/color. like: 16x16x8bit, 32x32x24bit - both in _one_ icon.
I am well aware of this ;c)

Let me restate.  If you do NOT mess with the compiled exe, The EXE's icon isn't even displayed in the titlebar, all it displays is the generic "file" icon in Windows,  If you change the icon, the exe's icon will change, but what is displayed in the titlebar is still the generic "file" icon.

QuoteHonestly - I just load the first icon from the exe's resource and display it.
The method you are using is not compatible with XP's theme system.  Check your email for some XP theme compatible methods.

Kitty Hello

You're perfectly right. I changed it. Sorry!
Here's a tutorial how to do it:
http://www.glbasic.com/forum/viewtopic.php?pid=2489

Kuron

Thank you, very much :)

Hemlos

Quote from: Kuron on 2006-Nov-07
Does anybody know of a "working" method to put an icon in the title bar or a GLBasic program that is running in windowed mode?

These 2 links are for windows only:

Hardcoded icon using a function to build the icon:
http://www.glbasic.com/forum/index.php?topic=2332.0

Icon image using a prebuilt image:
http://www.glbasic.com/forum/index.php?topic=1364.0
Bing ChatGpt is pretty smart :O