Changing Icon ...

BlitzPlus Forums/BlitzPlus Programming/Changing Icon ...

JPD(Posted 2004) [#1]
OK, my proggy works ... :-)

I've added a icon with a Ressource-Hacker :-) My question: How can I change the icon in the title-Bar?


Seldon(Posted 2004) [#2]
You can't directly, but it should be possible using WinAPI. I've no time to try, but if you do this:

SendMessage(WindowID(Your_Window), #WM_SETICON, 0, Image)

, it should work.

Set a proper userlib and all the related stuff. Of course you must have Blitz3D or Blitz+ . The Image must be loaded in a bank (it must be Windows ICON format). With Blitz3D you also need to retrieve the handle of your window with FindWindow, but it should be possible as well. With some more work, I think you could retrieve it directly from resources, that is the real ICON in the .EXE .