Click here to Skip to main content
15,898,747 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using SetFont and Trying to Display PI(the symbol) Pin
Ellis Li10-Mar-04 20:23
Ellis Li10-Mar-04 20:23 
GeneralRe: Using SetFont and Trying to Display PI(the symbol) Pin
David Crow11-Mar-04 3:22
David Crow11-Mar-04 3:22 
GeneralThe Noo-B Blues Pin
RedRabbit10910-Mar-04 11:19
RedRabbit10910-Mar-04 11:19 
GeneralRe: The Noo-B Blues Pin
Ravi Bhavnani10-Mar-04 11:39
professionalRavi Bhavnani10-Mar-04 11:39 
GeneralRe: The Noo-B Blues Pin
Snyp10-Mar-04 11:41
Snyp10-Mar-04 11:41 
Generaldisplay tooltips on CToolBarCtrl Pin
bin892210-Mar-04 10:50
bin892210-Mar-04 10:50 
GeneralRe: display tooltips on CToolBarCtrl Pin
casid10-Mar-04 12:21
casid10-Mar-04 12:21 
GeneralNeed some help on ClistCtrl Control Pin
pavneet10-Mar-04 10:39
pavneet10-Mar-04 10:39 
I inserted a ListBox in Form of CFormView and set it to Report type from the property. Using the control variable of the List Box the columns were inserted.
But while inserting Item using
int InsertItem( const LVITEM* pItem ); overload of the function, the call to LVN_GETDISPINFO is not sent and hence the items are not displayed.

the snippets of code

		iteminfo *it = new iteminfo;<br />
		it->Donum = m_donum;<br />
		it->weight = allocate[i]/5;<br />
		it->truck = it->weight/10;<br />
<br />
		LV_ITEM lvi;<br />
		lvi.mask = LVIF_TEXT|LVIF_PARAM;<br />
		lvi.iItem = i;<br />
		lvi.iSubItem = 0;<br />
		lvi.iImage = 0;<br />
		lvi.pszText = LPSTR_TEXTCALLBACK;<br />
		lvi.lParam = (LPARAM)it;<br />
		m_list.InsertItem(&lvi);<br />
                i++;

and this being the LVN_GETDISPINFO message handler

void CTruckBillView::OnGetdispinfoList(NMHDR* pNMHDR, LRESULT* pResult) <br />
{<br />
	LV_DISPINFO* pDispInfo = (LV_DISPINFO*)pNMHDR;<br />
	// TODO: Add your control notification handler code here<br />
	CString string;<br />
	<br />
	if(pDispInfo->item.mask & LVIF_TEXT)<br />
	{<br />
		iteminfo *pitem = (iteminfo *)pDispInfo->item.lParam;<br />
		<br />
		switch(pDispInfo->item.iSubItem)<br />
		{<br />
		case 0:<br />
			strcpy(pDispInfo->item.pszText,m_donum);<br />
			break;<br />
		case 1:<br />
			string.Format("%.2f",pitem->weight);<br />
			strcpy(pDispInfo->item.pszText,(const char*)str);<br />
			break;<br />
		case 2:<br />
			string.Format("%.0f",pitem->truck);<br />
			strcpy(pDispInfo->item.pszText,(const char*)str);<br />
			break;			<br />
		}<br />
	}<br />
	<br />
	*pResult = 0;<br />
}

Thanks in advance
GeneralRe: Need some help on ClistCtrl Control Pin
Michael Dunn10-Mar-04 12:08
sitebuilderMichael Dunn10-Mar-04 12:08 
GeneralParseing a string question. Pin
modeonetwo10-Mar-04 10:18
modeonetwo10-Mar-04 10:18 
GeneralRe: Parseing a string question. Pin
Branislav10-Mar-04 15:25
Branislav10-Mar-04 15:25 
GeneralRe: Parseing a string question. Pin
David Crow11-Mar-04 3:36
David Crow11-Mar-04 3:36 
GeneralIOCTL Pin
Dev57810-Mar-04 9:57
Dev57810-Mar-04 9:57 
GeneralRe: IOCTL Pin
David Crow10-Mar-04 10:10
David Crow10-Mar-04 10:10 
GeneralXP style project Pin
krugger10-Mar-04 8:16
krugger10-Mar-04 8:16 
GeneralRe: XP style project Pin
Christian Graus10-Mar-04 8:27
protectorChristian Graus10-Mar-04 8:27 
GeneralRe: XP style project Pin
Neville Franks10-Mar-04 10:33
Neville Franks10-Mar-04 10:33 
GeneralRe: XP style project Pin
Anonymous10-Mar-04 12:22
Anonymous10-Mar-04 12:22 
Questionnon XP visual style when using chtmlview in VC6/VC7 ?? Pin
karmafx10-Mar-04 7:42
karmafx10-Mar-04 7:42 
AnswerRe: non XP visual style when using chtmlview in VC6/VC7 ?? Pin
Neville Franks10-Mar-04 10:39
Neville Franks10-Mar-04 10:39 
AnswerRe: non XP visual style when using chtmlview in VC6/VC7 ?? Pin
karmafx10-Mar-04 10:46
karmafx10-Mar-04 10:46 
GeneralRe: non XP visual style when using chtmlview in VC6/VC7 ?? Pin
Neville Franks10-Mar-04 12:33
Neville Franks10-Mar-04 12:33 
GeneralRe: non XP visual style when using chtmlview in VC6/VC7 ?? Pin
karmafx10-Mar-04 21:45
karmafx10-Mar-04 21:45 
GeneralCHange Gradient Colors in WIndow Caption Pin
doctorpi10-Mar-04 7:13
doctorpi10-Mar-04 7:13 
GeneralRe: CHange Gradient Colors in WIndow Caption Pin
Robert A. T. Káldy11-Mar-04 1:34
Robert A. T. Káldy11-Mar-04 1:34 

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.