I tried icon "iconNAME.ico" in a resource file (im not stupid, i did it right) but it could not use the icon file for some reason. Since I can't figure it out, I would like to ask the experience programmer how to do this with CB + MinGW. IM NOT CHANGING THE SHORTCUT ICON. Just making sure you got that. ;D
You have not assigned any resource id to that icon. See MSDN for resource files syntax.
When you do it right, then use LoadImage to load the icon and fill up WNDCLASSEX structure accordingly.
ok, i searched and searched... i created a 32x32 .ico PNG file, included it in my project, did this with a resource file:
MAINICON ICON "journal.ico"
and the dam thing gives me this:
||icon file `journal.ico' does not contain icon data|
||=== Build finished: 1 errors, 0 warnings ===|
yeah, no sh** sherlock! I know it doesn't have that data, its a picture!
back to you guys...
I'm losing my patients. I've searched and searched for about 3 hours and i found nothing that I haven't tried to fix my problem. I've checked the compiler, formated the dam .ico in png, 24-bit, 16-bit, and now we're at 32 by 32 pixels. IM LOSING MY MIND! Why wont C::B just compile the dam thing? Based on my research it uses winres.exe to do it and it doesn't seem to be doing that.
PLEASE ONLY POST IF YOU HAVE A RESOLUTE ANSWER, thanks in advance! Seriously... thanks so so so so so so much... >;< my head might explode if you don't hurry! (jk)
You have 3 files: main.cpp (the file where WinMain is located), the resources.rc (the file where your resources are defined) and the resources.h(where you assign an ID for each resource).
look, i did my research. IT CAN BE DONE. All I want is for the icon not to be generic. I haver about 10 consol programs I've created and i would like to compile an Icon with each of them so i dont accededentally click the wrong one.
There are some independent applications that can create and change the icons of your .exe files like Exe Icon Changer, ResEdit or IcoFX. You can use them after creating your file.
||icon file `journal.ico' does not contain icon data|
||=== Build finished: 1 errors, 0 warnings ===|
i tried includeing the .ico in my project, i tried excluding it from my project, i tried to compile the dam thing (the .ico independently, theoretically creating a .o. it doesnt do that...), nothing seems to work.
I figured it out. After giving up with paint, i just searched for a 3rd party software. Some how, paint (even though saved as an icon) doesn't save it in the right icon format. I got iconFX and got it all workin well. Sorry for the trouble, haha.
Thanks to all of you who tried to answer my question.
Now you see - if you were better at asking questions and explaining your issues - I (we) could
have told you that MS Paint is no good for making ICON files.
I didn't think it was an issue witht the icon format, lol. I feel like an idiot. I was using paint to create 32, 32 pixel *.ico files, but for some reason, they weren't in a "special" format. I am not quite sure what IconFX does to make it compatable... the results are practically the same: 32, 32 pixel .ico files.
There is something wrong with your icon then. I used myself windows 7 Paint to convert .png or .jpg to .ico and it worked without issues, the icon is displayed correctly.
hmm... There can't be anything wrong... it's 32, 32 pixel .png formatted *.ico file. Mabey it has to do with vista, because i upgraded to W7 from windows Vista. Vista pisses me off, genuinly pisses me off. This wouldnt be the first time either. would be, though, since the upgrade...