Allright, I managed to send the LVS_OWNERDRAWFIXED (= 0x0400) to the Listview control:
int lStyle = (int)NativeMethods.GetWindowLong(this.Handle, -16);
string bp = "lstylehier";
lStyle |= (0x0400 | 0x0001);
int iRet = NativeMethods.SetWindowLong(this.Handle, -16, lStyle);
When I do this, I see the following window messages come by:
125
WM_STYLECHANGED
641
WM_IME_SETCONTEXT
7
WM_SETFOCUS
15
WM_PAINT
71
WM_WINDOWPOSCHANGED
3
WM_MOVE
5
WM_SIZE
20
WM_ERASEBKGND
78
WM_NOTIFY
I also expect the 43 WM_DRAWITEM (0x002B) message to come by.. but I never get it. The listview does not show it's items tough, so I suspect that the style change was indeed succefull (as also indecated by the first WM ).
Any ideas?