How do I change the Icon on my exe?
How do I change the Icon on my exe?
-Elven Forge Software-
(Lead Designer)
http://www.geocities.com/elvenforge
**infected by frenchfry164**
I am a signature virus. Please add me to your signature so that I may multiply
hmmm...I guess it is...
Sorry.
-Elven Forge Software-
(Lead Designer)
http://www.geocities.com/elvenforge
**infected by frenchfry164**
I am a signature virus. Please add me to your signature so that I may multiply
Moved to the Windows forum (guessing that's where you want it ? )
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
Are you using visual studio? If so, just make an icon resource and when you register your class you can load it there. Look up MAKEINTRESOURCE
"...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers
I think he's talking about changing the icon by command, after the program has been compiled... like some of the trojans.
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
Are you making some subtle hint Devil Panther?
Let's not jump to conclusions.like some of the trojans
As for changing the icon during runtime, that should be possible somehow. A dodgy method of using WM_NCPAINT springs to mind. Of course, that's not REALLY changing the icon, just painting where it would be. And it would only paint one of the many application icons on the screen. Bah. Someone else?
[email protected]
Microsoft Visual Studio .NET 2003 Enterprise Architect
Windows XP Pro
Code Tags
Programming FAQ
Tutorials
hell no!
It's just really cool how some trojans can change their icon. But how do they do it... that's a mystery.
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
No Ideas? Drat.
-Elven Forge Software-
(Lead Designer)
http://www.geocities.com/elvenforge
**infected by frenchfry164**
I am a signature virus. Please add me to your signature so that I may multiply
Set the icon when you register the window class (see RegisterClassEx) or you can do it at runtime (eg for dialogs where you haven't registered a window class) with WM_SETICON (use SendMessage) or by using SetClassLong/SetClassLongPtr (GCL_HICON or GCL_HICONSM index). Search this board as this has been asked a number of times.
Yep, WM_SETICON works.
Code:HICON hIcon; hIcon=LoadIcon(NULL,IDI_HAND); SendMessage(hwnd,WM_SETICON,(WPARAM)ICON_SMALL,(LPARAM)hIcon); SendMessage(hwnd,WM_SETICON,(WPARAM)ICON_BIG,(LPARAM)hIcon);
[email protected]
Microsoft Visual Studio .NET 2003 Enterprise Architect
Windows XP Pro
Code Tags
Programming FAQ
Tutorials
Ah, thanks. But I just found a way to do it with my compiler....
-Elven Forge Software-
(Lead Designer)
http://www.geocities.com/elvenforge
**infected by frenchfry164**
I am a signature virus. Please add me to your signature so that I may multiply