dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: ListView message

  1. #1
    Join Date
    Aug 2002
    Posts
    698

    ListView message

    Hi,
    On this page I couldn't find a message that corresponds to user double-clicking on the header divider.
    This event should correspond to the column being auto-sized.

    Should I try to catch the HDN_DIVIDERDBLCLICK (header notification) instead of some ListView notification/message? Or I am just missing something?

    Thank you.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,423

    Re: ListView message

    Quote Originally Posted by OneEyeMan View Post
    Hi,
    On this page I couldn't find a message that corresponds to user double-clicking on the header divider.
    This event should correspond to the column being auto-sized.
    The link you've provided shows the List control messages while you seem to need the List control notifications.
    Well. it is not a problem in your case...

    Quote Originally Posted by OneEyeMan View Post
    Hi,
    On this page I couldn't find a message that corresponds to user double-clicking on the header divider.
    This event should correspond to the column being auto-sized.

    Should I try to catch the HDN_DIVIDERDBLCLICK (header notification) instead of some ListView notification/message? Or I am just missing something?
    Yes, HDN_DIVIDERDBLCLICK
    Notifies a header control's parent window that the user double-clicked the divider area of the control. This notification code is sent in the form of a WM_NOTIFY message.
    Victor Nijegorodov

  3. #3
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,764

    Re: ListView message

    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.2.2)

  4. #4
    Join Date
    Jul 2019
    Location
    USA
    Posts
    3

    Re: ListView message

    had been writing methods directly in the code editor, but on a hunch I decided to double click the listview on the form designer, let it produce the pre-made method bit, then change the code there.

  5. #5
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,033

    Re: ListView message

    Quote Originally Posted by amyacker View Post
    had been writing methods directly in the code editor, but on a hunch I decided to double click the listview on the form designer, let it produce the pre-made method bit, then change the code there.
    That's the way to do it. Back in the day, that functionality was in something called the Class Wizard.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)