BASIC

Author Topic: windowed mode titlebar icon  (Read 6021 times)

Kuron

  • Guest
windowed mode titlebar icon
« 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?

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.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10689
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
windowed mode titlebar icon
« Reply #1 on: 2006-Nov-07 »
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.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10689
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
windowed mode titlebar icon
« Reply #2 on: 2006-Nov-07 »
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

  • Guest
windowed mode titlebar icon
« Reply #3 on: 2006-Nov-07 »
Quote
If 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.

Quote
Make 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.

Quote
Honestly - 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.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10689
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
windowed mode titlebar icon
« Reply #4 on: 2006-Nov-07 »
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

  • Guest
windowed mode titlebar icon
« Reply #5 on: 2006-Nov-08 »
Thank you, very much :)

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1631
  • Particle Hawk
    • View Profile
Re: windowed mode titlebar icon
« Reply #6 on: 2008-Sep-15 »
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
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)