Invalidating non-client areas

Posted by Ismael on Stack Overflow See other posts from Stack Overflow or by Ismael
Published on 2010-05-12T14:52:11Z Indexed on 2010/05/12 14:54 UTC
Read the original article Hit count: 235

Filed under:
|
|

I've a window which I draw a custom border/caption, in order to do that I handle WM_NCPAINT message. My captin has two backgrounds a brighter one when it is the active window, and a darker one when it is in the background.

But under some circumstances, for example when the window loses/gain focus, my caption is not updated so I end with the wrong background.

Until now I've handled WM_NCACTIVATE, and send a RedrawWindow(hwnd, NULL, NULL, RDW_FRAME|RDW_INVALIDATE), but this causes the whole window to repaint. Do you have any advice about this?

© Stack Overflow or respective owner

Related posts about Windows

Related posts about c++