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

Threaded View

  1. #2
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,656

    Re: Listview selected item

    Quote Originally Posted by Henkie
    I'm trying to select an item in a listview from code. However I'm having some problems.
    First method should work.
    Second should work if you also set
    SelectListViewItemMessage.mask = LVIF_STATE;

    Stupid question - do you have at least 5 items in that list?

    <edited> Just noticed that you have an OWNERDRAW style. Then you had to draw items yourself. Do you check for the selected state?
    Last edited by VladimirF; February 23rd, 2007 at 07:17 PM.
    Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinWindows - replacement windows manager for Visual Studio, and more...

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