Click to See Complete Forum and Search --> : How can I change the application Icon...?


May 12th, 1999, 11:49 PM
How can I change the application Icon...? I saw almost of the applications today have their own icon when I viewed it with Windows Explorer, but I don't know how to do it.

Nick (kritaya@www.graffiti.net)

May 13th, 1999, 12:33 AM
The answer is:
1. Create a member variable of HICON type in your MainFrm.h file.
2. Create a new icon resource using the resource editor given by the Visual Studio.
3. Load the icon into memory using function LoadIcon() in the OnCreate() handler in MainFrm.cpp file .
4. Once you get a handle to this icon, in the same OnCreate() handler, use function SetIcon() to set the new Application Icon.