0

A win32 listview with the view style set to LV_VIEW_DETAILS will not draw onto a window with its exstyle WS_EX_COMPOSITED set? Why?

Heres my code for changing my dialogbox to composite if anyone is interested:

case WM_INITDIALOG:
     {
          unsigned long styles = GetWindowLong(hwndDlg, GWL_EXSTYLE);
          SetWindowLong(hwndDlg, GWL_EXSTYLE, styles | WS_EX_COMPOSITED);
          return (INT_PTR)TRUE;
     }

The listview's view flag is set in the visual studios resource editor rather than by code.

Anyone have any ideas why this is happening, and I really want this composited cos it solves all flicker.

1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by stevee1984
0

I found out the hard why, listviews are not compatible with a composited window.

The answer is to use the WM_ERASEBKGND:

case WM_ERASEBKGND:
     {
          return (INT_PTR)TRUE;
     }
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.