Icon issue as well

BlitzMax Forums/MaxGUI Module/Icon issue as well

gellyware(Posted 2006) [#1]
I've used resource hacker to make the icon for my game, however in the title bar the icon is not showing up. It's showing the typical white rectangle. The icon IS showing up for the executable itself. Any ideas?


Fabian.(Posted 2006) [#2]
Check the resource name in the executable; it must be "101" as I think. It also may depend on which resource hacker you are using. I'm using OpenWatcom Resource Editor without any problems (when naming the resource as described: "101").

I hope it helps;)


gellyware(Posted 2006) [#3]
Hi Fabian, thanks for the response. I downloaded the OpenWatcom Resource editor... however... after I add the Icon Resource and save, when I try to run the app I get an error saying that it's an invalid win 32 app. Maybe I'm doing something wrong here.


I have the following:

ICON GROUP
|
|--> 101
|
|->Language Neutral
|
|-> 32x32x256 color


Fabian.(Posted 2006) [#4]
There're many things which may cause the resource hacking to fail. Sorry I can't say why there's an error, but try the following (I'm always using this way, because there're some unknown bugs when I tried to do it different):
1.: You need to have an compiled executable ("*.exe") an icon file ("*.ico")
2.: If you don't have an icon file you can create them with special icon editors (Normally there's a buildin icon editor with OpenWatcom Res Edit)
3.: Open the icon file with OpenWatcom Resource Editor
4.: Select the icon resource (there should be only one resource in it) and then use the "Resource->Copy To..." function
5.: Select your executable as CopyTo target
6.: Maybe you'll get the error message "This executable has no resources" although the resource was successfully copied
7.: Open the executable to rename the resource (using "Resource->Rename..." menu)


Grey Alien(Posted 2006) [#5]
didn't you try the Jim Brown method of making a resource file that gets compiled with the exe? This is the method I recommended with my framework. Oh wait, I just remembered, that method doesn't put it on the title bar which is why I used the extracticon code in my framework. I have noticed something weird though, on my PC I get the icon on the titlebar, but not on the laptop - same code! But on the laptop, if I go to full-screen mode and then back to windowed mode, the icon is on the titlebar. This is weird and I need to look into it more.