Click here to Skip to main content
15,914,795 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: File API Question Pin
Brian Delahunty29-Aug-02 10:06
Brian Delahunty29-Aug-02 10:06 
GeneralRe: File API Question Pin
Carlos Antollini29-Aug-02 11:08
Carlos Antollini29-Aug-02 11:08 
GeneralRe: File API Question Pin
Joaquín M López Muñoz29-Aug-02 11:16
Joaquín M López Muñoz29-Aug-02 11:16 
GeneralRe: File API Question Pin
Brian Delahunty29-Aug-02 10:07
Brian Delahunty29-Aug-02 10:07 
GeneralDatabase recommendations and questions Pin
Chris Hambleton29-Aug-02 8:06
Chris Hambleton29-Aug-02 8:06 
GeneralRe: Database recommendations and questions Pin
Carlos Antollini29-Aug-02 8:27
Carlos Antollini29-Aug-02 8:27 
GeneralRe: Database recommendations and questions Pin
Joel Lucsy29-Aug-02 13:19
Joel Lucsy29-Aug-02 13:19 
GeneralListview problems!!! AAAAAAAaaaaaaaaa Pin
Ray Cassick29-Aug-02 7:57
Ray Cassick29-Aug-02 7:57 
Anyone ever have a problem where, for some reason, they can no longer add any subitems to a listview?

I have been banging my head on this for two days now. The code is as follows:

for (int i = 1; i <= num_vbpc_channels; i++)<br />
	{<br />
	// Insert the first item<br />
	lvi.mask =  LVIF_IMAGE | LVIF_TEXT;<br />
	strItem.Format(_T("Item %i"), i);<br />
		<br />
	lvi.iItem = i;<br />
	lvi.iSubItem = 0;<br />
	lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);<br />
	lvi.iImage = i%8;		// There are 8 images in the image list<br />
	m_cListCtrl.InsertItem(&lvi);<br />
<br />
	strSubItem1.Format(_T("%s"), "Past");<br />
	strSubItem2.Format(_T("%s"), "Past");<br />
<br />
	// Set subitem 1<br />
	lvi.iSubItem =1;<br />
	lvi.pszText = (LPTSTR)(LPCTSTR)(strSubItem1);<br />
	m_cListCtrl.SetItem(&lvi);<br />
<br />
	// Set subitem 2<br />
	lvi.iSubItem =2;<br />
	lvi.pszText = (LPTSTR)(LPCTSTR)(strSubItem2);<br />
	m_cListCtrl.SetItem(&lvi);<br />
<br />
        }


Most of you will probably notice this code as it is (for the most part) a copy/paste from one of the MFC examples here. It works for a few runs then simply stops adding sub items. The first column of items always gets added...

UGH!
GeneralRe: Listview problems!!! AAAAAAAaaaaaaaaa Pin
Joaquín M López Muñoz29-Aug-02 8:29
Joaquín M López Muñoz29-Aug-02 8:29 
GeneralRe: Listview problems!!! AAAAAAAaaaaaaaaa Pin
Michael Dunn29-Aug-02 9:02
sitebuilderMichael Dunn29-Aug-02 9:02 
GeneralRe: Listview problems!!! AAAAAAAaaaaaaaaa Pin
Ray Cassick29-Aug-02 9:28
Ray Cassick29-Aug-02 9:28 
GeneralRe: Listview problems!!! AAAAAAAaaaaaaaaa Pin
Michael Dunn29-Aug-02 9:43
sitebuilderMichael Dunn29-Aug-02 9:43 
GeneralRe: Listview problems!!! AAAAAAAaaaaaaaaa Pin
Joaquín M López Muñoz29-Aug-02 9:33
Joaquín M López Muñoz29-Aug-02 9:33 
GeneralRe: Listview problems!!! AAAAAAAaaaaaaaaa Pin
Tomasz Sowinski29-Aug-02 9:38
Tomasz Sowinski29-Aug-02 9:38 
GeneralRe: Listview problems!!! AAAAAAAaaaaaaaaa Pin
Michael Dunn29-Aug-02 9:47
sitebuilderMichael Dunn29-Aug-02 9:47 
GeneralHELP!!! Pin
Nitron29-Aug-02 7:18
Nitron29-Aug-02 7:18 
GeneralRe: HELP!!! Pin
Joaquín M López Muñoz29-Aug-02 7:26
Joaquín M López Muñoz29-Aug-02 7:26 
GeneralRe: HELP!!! Pin
Nitron29-Aug-02 7:54
Nitron29-Aug-02 7:54 
Generalforcing window repaint Pin
TimWallace29-Aug-02 7:14
TimWallace29-Aug-02 7:14 
GeneralRe: forcing window repaint Pin
Joaquín M López Muñoz29-Aug-02 7:17
Joaquín M López Muñoz29-Aug-02 7:17 
GeneralRe: forcing window repaint Pin
lucy29-Aug-02 9:59
lucy29-Aug-02 9:59 
GeneralLexical matching - wildcard type Pin
Sayan Mukherjee29-Aug-02 5:54
Sayan Mukherjee29-Aug-02 5:54 
GeneralRe: Lexical matching - wildcard type Pin
Chris Losinger29-Aug-02 6:04
professionalChris Losinger29-Aug-02 6:04 
GeneralEN_CHANGE and CEdit, simple question Pin
ns29-Aug-02 5:46
ns29-Aug-02 5:46 
GeneralRe: EN_CHANGE and CEdit, simple question Pin
Tomasz Sowinski29-Aug-02 5:49
Tomasz Sowinski29-Aug-02 5:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.