Hi,
I've made a icon with multiple resolutions which include the following:
16x16 - 32x32 - 48x48 - 64x64 - 128x128 - 256x256.
I add the icon to the WNDCLASSEX structure when I initializes my window. It works fine with the .exe file itself, but I don't get a icon in the window border. I've added it in the hIcon part of the structure. I also tried to add to the hIconSm varaible, but it didn't seem to have an effect.
The icons are defined in the resource.
Any suggestions to solve this problem?
Your application should supply groups of icon images in the following sizes:
48x48, 256 color
32x32, 16 color
16x16 pixels, 16 color
When filling in the WNDCLASSEX structure to be used in registering your window class, set the hIcon member to the 32x32 icon and the hIconSm member to the 16x16 icon. For more information about class icons, see Class Icons.
I don't know if these resolutions are required or just a suggestion but it has always worked for me. Perhaps you have an error in your code retrieving the icon handles?
Got it to work. For some weird reason, I had a line of code somewhere else, where it initialized the small icon to standard. I removed it, and now it works fine.