Solved

Subitem not shown on column

Posted on 1997-05-19
2
192 Views
Last Modified: 2010-05-18
I want to use list control to show the database record.

...
While(!m_pSet.IsEOF())
{
      lvitem.mask = LVIF_TEXT;
      lvitem.iItem = i;
      lvitem.iSubItem = 0;
      lvitem.pszText = (LPTSTR)(LPCTSTR)m_pSet.m_Supplier;
      m_list.InsertItem(&lvitem);
      m_list.SetItemText(i, 1, (LPCTSTR)m_pSet.SupplierName;
      m_pSet.MoveNext();
      i++;
}
..

When I use the above code to add item and subitem to column, all item label(m_Supplier) can show, but only the subitem of last record can show on screen. All other subitem disappear.
Why? How to fix it?
0
Comment
Question by:edward95
2 Comments
 
LVL 3

Expert Comment

by:LucHoltkamp
ID: 1163484
To few points to even read it!  
0
 
LVL 4

Accepted Solution

by:
md041797 earned 0 total points
ID: 1163485
Grade your provious responses and maybe someone will help you
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now