CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003
    Location
    Pakistan
    Posts
    223

    CListCtrl Sequecnce of Inserted items

    In Report style fot a list ctrl .

    When I insert items , every new item enters at the top , so if I enter 1,2,3,4 in list control one by one it will look like

    4
    3
    2
    1
    although i choose the Sorting to None.
    But I want that every new item should be entered at bottom and i also dont want sorting , sequence in my case is very important.

    So how to insert every new item at the last of list ctrl. to have such kind of result
    1
    2
    3
    4
    where 1 entered first , 2 secondly and so on.
    Unmanaged in a .NET world

  2. #2
    Join Date
    Aug 2002
    Location
    Cluj-Napoca,Romania
    Posts
    3,496
    Please post the code you use to insert the items.

    The following code adds items at the botom of a list control:

    Code:
    // the list control has the m_lstCtrl variable attached
    m_lstCtrl.InsertItem( m_lstCtrl.GetItemCount(), szText);  // or use the LVITEM structure
    Hope it helps.
    Har Har

  3. #3
    Join Date
    May 2003
    Location
    Pakistan
    Posts
    223
    Thanx It really worked , thanx a lot
    Unmanaged in a .NET world

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