You need to change the icon of an EXE after the WIN32 application project runs as follows:
Since the WIN32 application project started without resources, many people do not know how to import an ICO icon in the following ways
1, in the menu bar to occupy the Insert-"resource such as:
Then click Save, select the path you want to save (the path where the program is located)
Then you will be sent two files under that path that exist script1.rc and resource.h.
2, add script1.rc and resource.h two files to the project. Shouldn't this be a detail?
Then add in the program
#include "resource.h" header file//This depends on the location of your resource file
Then add the code in the program:
WNDCLASS WC;
Wc.hicon = LoadIcon (hinstance, (LPCTSTR) idi_icon1); Idi_icon1 the ID of the icon to add
You can look at the results here.
Hope you succeed!!
WIN32 How to add icons to application programs