Question

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.

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top