Solved

Subitem not shown on column

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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 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 learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

746 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

9 Experts available now in Live!

Get 1:1 Help Now