CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2006
    Posts
    3

    List view movewindow screw up

    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....
    Attached Images Attached Images

  2. #2
    Join Date
    Oct 2005
    Posts
    230

    Re: List view movewindow screw up

    To help you we need way more infomation, try posting up your code for a start.

  3. #3
    Join Date
    Apr 2006
    Posts
    3

    Unhappy Re: List view movewindow screw up

    Hi,

    its almost the complete source.

    But I will post more for you:

    Code:
    		.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

  4. #4
    Join Date
    Sep 2004
    Location
    Italy
    Posts
    389

    Re: List view movewindow screw up

    Why do you subclass it? You just need to call MoveWindow/SetWindowPos inside the LVN_BEGINLABELEDIT notification handler.

  5. #5
    Join Date
    Apr 2006
    Posts
    3

    Re: List view movewindow screw up

    Its doesn't matter wheter i subcluss it or not.

    but why the first item get wiped?



    good bye

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured