CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Location
    Bruton, Somerset, England
    Posts
    47

    ListView OnGetdispinfo query

    When using OnGetdispinfo(NMHDR* pNMHDR, LRESULT* pResult) with ListView the documentation says you can use LVIF_DI_SETITEM to tell the ListView to store the information for an item and not to request it again.

    How!

    Cheers in advance...




  2. #2
    Join Date
    Aug 1999
    Location
    Germany
    Posts
    22

    Re: ListView OnGetdispinfo query

    Hi!
    Did you try this?

    [ccode]
    void CMyList::OnGetdispinfo(NMHDR* pNMHDR, LRESULT* pResult)
    {
    LV_DISPINFO* pDispInfo = (LV_DISPINFO*)pNMHDR;
    // TODO: Add your control notification handler code here
    if(pDispInfo->item.mask & TVIF_IMAGE)// Check for the info he needs
    {
    pDispInfo->item.iImage=0; // Set the info he needs

    pDispInfo->item.mask |=LVIF_DI_SETITEM;
    }
    [...]
    }

    I hope it helps!
    Isabel Planells





  3. #3
    Join Date
    Apr 1999
    Location
    Bruton, Somerset, England
    Posts
    47

    Re: ListView OnGetdispinfo query

    Yeah, that is exactly how I thought it should work, but the ListView still insists on requesting for the same information again and again (ie. every time the cursor is moved)

    Do you (does anyone) have a working example?


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