Sunday, September 26, 2010

Flicker free drawing using WS_EX_COMPOSITED

Tip - With WS_EX_COMPOSITED window style is set, all descendants of a window get bottom-to-top painting order using double-buffering.

Details - This window style will give double buffering effect( somewhat like drawing with memDC ). For using this style in VC6 , #define _WIN32_WINNT 0x0500 in stdafx.h. To seeing the effect, resize the window of attached sample exe. Also see the OnCheck1() and OnPaint() in CompositeDlg.cpp to see the code behind sample application attached. Please read the MSDN link for details.

No comments:

Post a Comment