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

Thread: ListCtrl basics

  1. #1
    Join Date
    Apr 1999
    Posts
    27

    ListCtrl basics

    Hi
    I have a problem with a ListCtrl (Sort Ascending)
    When I insert the Items, only the item which was inserted at last has subitems, all other items dont have whats wrong?
    I inserted the items like this
    m_pLC->InsertItem(0, str1);
    m_pLC->SetItemText(0, 1, str2);

    thanks in advance


    --
    -=SKULK=-

  2. #2
    Join Date
    Apr 1999
    Location
    Germany
    Posts
    418

    Re: ListCtrl basics

    Hi Skulk,

    use the value returned by InsertItem as the first parameter in SetItemText.


    int nItem = m_pLC->InsertItem(0, str1);
    m_pLC->SetItemText(nItem, 1, str2);





    Martin

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