Invalidating non-client areas
- by Ismael
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?