Sign in to follow this  
gargling_mayonnaise

window icon repaint

Recommended Posts

Hello, anyone who knows which event is called when window icon(the small icon at left-top of a window caption bar) needs to be repainted? I'm currently catching ncpaint message but when i change folder using the same window, window icon is repainted from elsewhere but my ncpaint covering my custom icon. As always any help appreciated, thanx dudes! -GM

Share this post


Link to post
Share on other sites
Unfortunately the non client area is not that streamlined as the client area is.

AFAIK there are three messages that signal a redraw in the nc area:

WM_NCPAINT
WM_NCACTIVATE
WM_ACTIVATE

As seen in the thoroughly hacked method how MFC keeps the tool windows' caption active with the main window.

Share this post


Link to post
Share on other sites
Uhm, actually the right messages are ncpaint, ncactivate, nccalcsize if you want to change client area size and settext which force the caption bar to redraw itself, anyway catching them all doesn't prevent the window icon at the top-left to be re-drawn when changing folder using toolbar buttons e.g back arrow, there must be some other message that force the caption to redraw.
Thanx!

-GM

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