Jump to content
  • Advertisement
Sign in to follow this  
helloworld123

[Win32 API] How to change window icon?

This topic is 3853 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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!