resizable control with WS_EX_TRANSPARENT flickers!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've created a containercontrol with supports dynamic resizing at runtime.
The control draws it's own nc border and caption bar. When resizing, both the
nc area and the client area flickers. This seems logical as WS_EX_TRANSPARENT
causes the operating system to render the underlying controls before telling
my control to paint itself. Is there anyway to counter this behaviour? Can i
tell the operating system to render the underlying windows to a memory dc
instead of directly to screen? Another thing that bugs e is that the flicker
is somewhat erratic, its not constant. I'm handling: WM_NCPAINT,
WM_NCACTIVATE, WM_SETTEXT, WM_NCCALCSIZE, WM_WINDOWPOSCHANGING and
WM_ERASEBKGND. If i remove the WS_EX_TRANSPARENT style (and change the
control region instead) the flicker does not occur, but i lose the support
for transparency.
 
Back
Top