Executable icon without rc file
Jan 1, 2014 at 5:13pm UTC
Hi everyone, only as a matter of curiosity, I am trying to setup the icon of my Win32 application without using the rc file. I mean the executable icon, not the window icon. So far I tried this:
1 2
windowClass.hIcon = (HICON)LoadImage(NULL,"icon.ico" ,IMAGE_ICON,32,32,LR_LOADFROMFILE);
windowClass.hIconSm = (HICON)LoadImage(NULL,"icon.ico" ,IMAGE_ICON,16,16,LR_LOADFROMFILE);
This sets correctly the small and big window icons, but not the executable file (viewed in Windows Explorer). Anyone know how to do this?
Jan 1, 2014 at 6:25pm UTC
Windows Explorer uses the first icon it finds to display it, so there is no way of doing this without a resource file.
Jan 1, 2014 at 10:16pm UTC
Jan 3, 2014 at 2:33pm UTC
Thank you all for the answers. I think this was not a good idea. Back to the rc file!
Topic archived. No new replies allowed.