How can I change my program's icon for anyone who uses the program? Obviously I would have to include the .ico file with it, but beyond that, I'm stumped.

10 Years
Discussion Span
Last Post by Maulth

Typically the main icon is linked in at compilation. How exactly you do it depends on your compiler. In all cases, a Windows resource named MAINICON is in your exe.

You can also check out Resource Hacker, which you can use to manually change a program's icon.


I don't know.

If you know how to link windows resources to your project, create an icon resource named MAINICON.

Otherwise you'll have to use resource hacker.

Good luck!


Its possible to do, ive never tried this but I think it should work.

SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(NULL,

No it doesn't, you have to create a Win32 project, make a window and then make it change the icon at runtime.. The point is I dont need to try it because im not the one with the problem, hes the one who should be putting in the effort to test it, im just giving suggestions.


Is there a simple way to do this in Dev-Cpp? There doesn't seem to be an area to compile linked .ico's into the project. I have tried using IconFX but it cannot add icons to a project that has already been compiled.


To dmanw100...

You can do it in Dev C++.Create a project & then go to Project->Project Options & in the "General" page you will find Icon Option for your project(for the .exe).


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.