Hi,
I have a custom drawn window (WS_POPUP, 1 back buffer, CS_HREDRAW + CS_VREDRAW) and a custom control in that window (WS_CHILD + WS_VISIBLE, CS_HREDRAW + CS_VREDRAW + CS_PARENTDC + CS_DBLCLKS, 1 back buffer) and it flickers a bit when it repaints after being covered by another window or restoring. Is this normal or is there a way to stop this? I'm thinking maybe I have too many back buffers...
Posted on 2007-10-22 20:59:00 by programinator
Make sure the background color in the class definition is zero and/or capture the WM_ERASEBKGND message (just return true). Sometime I put the WM_PAINT handler in place of WM_ERASEBKGND (i.e. no WM_PAINT message capture). If that doesn't work then most likely you'll need to double buffer.
Posted on 2007-10-23 00:10:12 by bitRAKE
Capturing the WM_ERASEBKGND seems to have stopped all flicker - thanks :D
Posted on 2007-10-23 06:13:53 by programinator