Is it possible? I'm using the API and my program is dialog box only. I don't need to create a registered window. How do I assign it an icon that will be shown in Windows Explorer.
Is it possible? I'm using the API and my program is dialog box only. I don't need to create a registered window. How do I assign it an icon that will be shown in Windows Explorer.
Use SendMessage to send a WM_SETICON to change the large or small icon of any window.
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
^not the answer I was looking for. I'm talking about the icon of the program in a desktop or explorer. The program is not running.
without using this:
wc.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_MAINICO));
Explorer simply uses the first icon resource of your program. Explorer does not start your program to find an icon, so what it does at runtime is irrelevant. So add an icon resource.
^Thanks man, that did the trick.