Disabling desktop composition causes flickering on Tab Control

ε祈祈猫儿з 提交于 2019-12-02 11:19:16

Issue is fixed by using WS_EX_COMPOSITED in the Dialog box Extended styles.

EDIT: Fixes for the edit of my question is by using SetParent on the Listview and attach it to the main window as it's parent instead of the sub dialog. Now it shows its frame correctly.

So i think this one has an issue

Listview on another dialog -> attach it to the main dialog(Over tab control) using CreateDialogParam. WS_EX_COMPOSITED set on tab control

Result: has XP drawing issues. Very sluggish. Hidden frames of listview in report type. as seen in question edit.

New method Listview on another dialog -> attach it to the main dialog(Over tab control) using CreateDialogParam. WS_EX_COMPOSITED set on tab control and main dialog as well. Call SetParent associate the listview with Main dialog as it's parent.

Result: Very smooth drawing. XP has no issues either. No flickering at all even when disabling desktop composition. And leave WM_ERASEBKGND as default for main dialog and no custom WM_PRINT handling. But WM_ERASEBKGND disabling is only needed on the sub dialog DialogProc to set return to 1.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!