Sign in to follow this  
helloworld123

[Win32 API] How to change window icon?

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this