[Win32 API] How to change window icon?
how to change icons in a window in win32 api (c++)?
i google'd, but my google-fu isn't very good it seems. :(
a short sample code or something would help greatly.
thanks!
If you want to set the icon initially you use the hIcon and hIconSm members of the WNDCLASS or WNDCLASSEX structures. If you want to change it later, you can send the WM_SETICON message.
in window registration phase (WinMain function), this line does it
wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement