From: Thomas Weidenmueller
Filip Navara wrote:
I overlooked that the code used GetUpdateRect with the last parameter set to FALSE, it should be set to TRUE. In that case GetUpdateRect is responsible for sending the WM_NCPAINT message and cleaning the update region.
No, that shouldn't be a problem. The last parameter just specifies if the update region is supposed to be erased (by sending a WM_ERASEBKGND message). It doesn't affect the validation of update region at all.
According to MSDN, you're right, it doesn't mention GetUpdateRect sending a WM_NCPAINT message. According to the attached test program (gcc -o gurtest.exe gurtest.c -lgdi32, click inside the window to invalidate the whole window), Filip is right and a WM_NCPAINT is actually sent from within GetUpdateRect.
GvG