win32: how avoid flicker and do transparent?

for avoid flicker i read that i must do:
1 - add the WS_CLIPCHILDREN style on the parent window;
2 - return true on erase message:

1
2
3
4
5
case WM_ERASEBKGND:
            {
                return TRUE;
            }
            break;


3 - invalidate the image for update it:
1
2
3
RECT d;
                GetClientRect(hwnd,&d);
                InvalidateRect(hwnd,&d,FALSE);


but imagine if i need the control been transparent?
the brush continues be showed :(
WS_CLIPCHILDREN style can avoid the flicker but don't let the child control been clear :(
what anyone can advice me?
Last edited on
Topic archived. No new replies allowed.