Ge van Geldorp wrote:
From: Filip Navara
The previous code was perfectly valid. Why did you change it? If GetUpdateRect returns FALSE then there's no need to call BeginPaint...
Possibly I fixed it wrong. Try minimizing the window with the old code. This will set the WINDOWOBJECT_NEED_NCPAINT flag. As a result, an endless stream of WM_PAINT messages is generated, 'cause that flag is never reset. Calling BeginPaint resets the flag.
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.
- Filip