How to avoid flicker while handling WM_ERASEBKGND in Windows dialog

后端 未结 6 1300
梦谈多话
梦谈多话 2020-12-17 19:41

I have a dialog that resizes. It also has a custom background which I paint in response to a WM_ERASEBKGND call (currently a simple call to FillSolidRect).

When t

6条回答
  •  醉酒成梦
    2020-12-17 20:38

    Assuming that "FillSolidRect" is the erase of your background then return TRUE from the WM_ERASEBKGND.

    To do the double buffering that you are almost doing in your code fragment, you will need to use CreateCompatibleBitmap and select that into your memDC.

提交回复
热议问题