I've asked a similar question before but was using wxWidgets ( http://cplusplus.com/forum/windows/23540/ ). Now I am trying to learn the Win32api and am using the MinGW compiler. I was able to figure out how to set the titlebar icon using an external .ico file with this code:
Did you include your header file in the resource file?
@Null: Actually, hIcon just defines the icon displayed on the taskbar, however, if hIconSm is null, hIcon will be searched for an appropriate image in the hIcon handle.