Jump to content
  • Advertisement
Sign in to follow this  
helloworld123

[Win32 API] How to change window icon?

This topic is 3933 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
in window registration phase (WinMain function), this line does it

wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!