Win32 GUI flickering on resize

前端 未结 4 1516
旧巷少年郎
旧巷少年郎 2021-01-19 02:04

I have a Win32 GUI program with a tab control, each tab having a list view control. There is massive flickering whenever the window is resized. I\'ve tried the following thi

4条回答
  •  日久生厌
    2021-01-19 02:58

    Windows supports a re-size batching operation that is meant to avoid flicker caused when lots of child windows are indepently resized. See BeginDeferWindowPos for more information on that.

    If that is not working, then try the WM_SETREDRAW message. It looks possible to stop drawing of the parent window - which will inhibit all the child controls, then, when the layout is finished, enable drawing again, and call RedrawWindow to repaint the entire window in one pass. I did rather think that this is what Defered window positioning would use internally.

提交回复
热议问题