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

Thread: ListView

  1. #1
    Join Date
    Feb 2000
    Posts
    1

    ListView

    I'm trying to get access to a 'syslistview32' like those in a FILE/OPEN dialog... I need to get let's say the 3rd item of the 3rd column. When I try to send different API SendMessage calls, it just closes the application (example notepad) with no errors or anything. I tried with an LVITEM (sendmessage hwnd, 3, 3, theLVITEM) and such, without success... Anybody can help me with this? I only need to get some TEXT from a LISTVIEW control of another program... Thank you in advance, I really really really need this ...


  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: ListView

    If you're are just looking to get the value then the following should work:

    MsgBox ListView1.ListItems(index).SubItems(subIndex)




    You can see from this how you could loop through the entire collection.

    If the user is selecting an item, you might be able to use:

    MsgBox ListView1.SelectedItem.SubItems(subIndex)




    Hope this helps,
    John

    John Pirkey
    MCSD
    www.ShallowWaterSystems.com
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

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