I have tab control and on it there is one treeview and one listview control.
Sometimes listview control does not redraw it self properly
This happens when I select some item from listview and then change
active window, and after that when I return to my program listview is not redrawn
Here is the picture when I select item
and this is what happens when I set active some other window for a second and then return
to my program
You can see exacly where was other window drawn, that part of listview is blank and you can see that it only applies for listview, other part of tab control are redrawn normally
I dont know what could be the problem... I tryed changing styles and exstyles of listview but nothing
Any help/hint is very appreciated
Sometimes listview control does not redraw it self properly
This happens when I select some item from listview and then change
active window, and after that when I return to my program listview is not redrawn
Here is the picture when I select item

and this is what happens when I set active some other window for a second and then return
to my program

You can see exacly where was other window drawn, that part of listview is blank and you can see that it only applies for listview, other part of tab control are redrawn normally
I dont know what could be the problem... I tryed changing styles and exstyles of listview but nothing
Any help/hint is very appreciated
Bizarre problem, it's like the listview is not being invalidated. Try something like this assuming it's a window and not a dialog
.ELSEIF uMsg == WM_PAINT
invoke InvalidateRect,hListView,NULL,TRUE
invoke DefWindowProc,hWnd,uMsg,wParam,lParam
ret
if it's a dialog use this
.ELSEIF uMsg == WM_PAINT
invoke InvalidateRect,hListView,NULL,TRUE
mov eax,FALSE
ret
This will at least invalidate the the listview, it will tell you if that's the problem
.ELSEIF uMsg == WM_PAINT
invoke InvalidateRect,hListView,NULL,TRUE
invoke DefWindowProc,hWnd,uMsg,wParam,lParam
ret
if it's a dialog use this
.ELSEIF uMsg == WM_PAINT
invoke InvalidateRect,hListView,NULL,TRUE
mov eax,FALSE
ret
This will at least invalidate the the listview, it will tell you if that's the problem
Perhaps you're missing some flag.
hay donkey thanks, that peace of code really solved the problem
I already tryed somthing similiar
.ELSEIF uMsg == WM_PAINT
invoke SendMessage,hListView,WM_PAINT,0,0
but it only consiredably slowed down whole app
(its dialog not window)
Anyway this workaround will do the work for me but I still dont get it
where is the problem
here are flags for controles
Main app dialog: WS_VISIBLE + WS_BORDER + WS_DLGRAME + WS_SYSMENU + WS_THICKFRAME + WS_GROUP ; no exStyles
Tab control: WS_CHILD + WS_VISIBLE + WS_TABSTOP; no exStyles
Dialog inside tab: WS_CHILD + WS_VISIBLE ; WS_EX_NOPARENTNOTIFY + WS_EX_CONTROLPARENT
Listview: WS_CHILD + WS_VISIBLE + ws_TABSTOP; WS_EX_CLIENTEDGE
I already tryed somthing similiar
.ELSEIF uMsg == WM_PAINT
invoke SendMessage,hListView,WM_PAINT,0,0
but it only consiredably slowed down whole app
(its dialog not window)
Anyway this workaround will do the work for me but I still dont get it
where is the problem
here are flags for controles
Main app dialog: WS_VISIBLE + WS_BORDER + WS_DLGRAME + WS_SYSMENU + WS_THICKFRAME + WS_GROUP ; no exStyles
Tab control: WS_CHILD + WS_VISIBLE + WS_TABSTOP; no exStyles
Dialog inside tab: WS_CHILD + WS_VISIBLE ; WS_EX_NOPARENTNOTIFY + WS_EX_CONTROLPARENT
Listview: WS_CHILD + WS_VISIBLE + ws_TABSTOP; WS_EX_CLIENTEDGE