CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2001
    Location
    Canada
    Posts
    182

    How to capture the Event or WM_messages when the HeadColumns of the ListView resized

    Hi,

    I want to capture the event when user resize the headercolumn of a listview, and then store the column length.

    I cannot find a related Event of ListView, I am wondering if I should use windows Hook. If so, what the WM_messages I can use?

    Thanks.

    Michi


  2. #2
    Join Date
    Dec 1999
    Location
    Dublin, Ireland
    Posts
    1,173

    Re: How to capture the Event or WM_messages when the HeadColumns of the ListView resized

    There is a subclassing control called EventCtl.dll at http://www.merrioncomputing.com/Download/index.htm which is a good start. I can even supply source code (given some notice).

    The message you are looking for is probably WM_NOTIFY although there are several ListView specific messages registered ... prefix LVM_ which might be appropriate.

    HTH,
    D.

    -------------------------------------------------
    Ex. Datis: Duncan Jones
    Merrion Computing Ltd
    http://www.merrioncomputing.com
    '--8<-----------------------------------------
    NEW -The printer usage monitoring application
    '--8<------------------------------------------

  3. #3
    Join Date
    May 2001
    Location
    Canada
    Posts
    182

    Re: How to capture the Event or WM_messages when the HeadColumns of the ListView resized

    Thanks for your kindly help.

    I have downloaded EventCtl.dll, but I still cannot find with one I can use for the ListView ColumnHeader resizing event.

    To use WM_NOTIFY, I need to know the message of the NMHDR structure (which contains information about a notification message). Unfortinatly, I was sticked here.

    I tried to use ListView_MouseDown event, but it can not be trigger when I drag the ColumnHeader,except when I clicked other place in the ListView.

    Thanks again.


    Regards,

    Michi

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