문제

I have a standard windows Tab control created with the WS_EX_COMPOSITED Extended Window Style to deal with the flickering when resizing of the tab but one of the Tab child windows is a ListView (LVS_OWNERDRAWFIXED) that's set to LVS_REPORT and this combination seems to eat up CPU usage even though no rows are in the ListView so an empty ListView within the tab doing nothing at all has 48% CPU usage, changing the ListView view or removing WS_EX_COMPOSITED fixes the CPU issue but I really need LVS_REPORT so how do I, if I can, use WS_EX_COMPOSITED with a ListView child window or achieve the same result as WS_EX_COMPOSITED has in that it stops the messy flickering.

도움이 되었습니까?

해결책

You only need WS_EX_COMPOSITED when resizing. So the expedient solution is to only include it when resizing. Listen for WM_ENTERSIZEMOVE and when you receive that, include WS_EX_COMPOSITED. When you receive WM_EXITSIZEMOVE, remove WS_EX_COMPOSITED.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top