I have a window and it has a WS_EX_COMPOSITED extended style, I handle the WM_ERASEBKGND Notification and wm_paint message, everything seems right, but when I call GetDC&ReleaseDC in some place, and do some drawing with GDI functions, I simply can't draw it on the window, during I debug the program, I found that after my drawing calls, the window will handle the wm_erasebkgnd and wm_paint messages, and the action in erasebkgnd overlap the drawing, and this is why the drawing seems doesn't work,

and after I remove the ws_ex_composited style, there is no more wm_paint message ,and GetDC could work,

now I just wonder if there is a ws_ex_composited style, then you can't drawing outside erasebkgnd handler and wm_paint handler, am I right?

Is there anyone who have meet the similar problem?

Regards.


David