Solved

Subitem not shown on column

Posted on 1997-05-19
2
205 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel/Word Add-in in what language? 5 144
Losing latter half of command line in Visual Studio C++ online program 10 89
computer science syllabus 3 103
Issues with C++ Class 19 109
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

730 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