Click to See Complete Forum and Search --> : List view movewindow screw up


SuJiaLaoShi
April 9th, 2006, 07:16 AM
Hello

I made a listview wich can edit subitems.
in LVM_BEGINSUBITEMS i implement a subclass for the editcontroll.
in the subclassfunction i move the edit control to the right position,
but than the text of the first column get screwed up.

.ELSEIF uMsg == WM_WINDOWPOSCHANGED
MoveWindow(....);

What is wrog?

You can see the picture....



Good bye....

UnfitElf
April 9th, 2006, 07:32 PM
To help you we need way more infomation, try posting up your code for a start.

SuJiaLaoShi
April 10th, 2006, 04:54 AM
Hi,

its almost the complete source.

But I will post more for you:


.ELSEIF [edi].code == LVN_BEGINLABELEDIT

PUSH OFFSET SubWindowEdit
PUSH GWL_WNDPROC
PUSH hEditControl
CALL SetWindowLong

...


SubWindowEdit PROC hEdit:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORD



.IF uMsg == WM_WINDOWPOSCHANGED
MoveWindow(hEdit, 100, 200, 120, 260);
...
....



Thats all,

and its work fine, but the place where the edit-controll was before
get wiped. The edit-controll get moved, to my specyfied position,
but the text where the box was before keeps white.

I also tryed to redraw, but that don't take any effects.



Good bye

kkez
April 10th, 2006, 08:31 AM
Why do you subclass it? You just need to call MoveWindow/SetWindowPos inside the LVN_BEGINLABELEDIT notification handler.

SuJiaLaoShi
April 11th, 2006, 10:21 AM
Its doesn't matter wheter i subcluss it or not.

but why the first item get wiped?



good bye