Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Subitem not shown on column

Posted on 1997-05-19
2
Medium Priority
?
215 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

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