Click here to Skip to main content
16,012,223 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCMainFrame from CView? Pin
Dominik Reichl3-Sep-03 23:25
Dominik Reichl3-Sep-03 23:25 
AnswerRe: CMainFrame from CView? Pin
Dominik Reichl3-Sep-03 23:28
Dominik Reichl3-Sep-03 23:28 
GeneralRe: CMainFrame from CView? Pin
Anonymous4-Sep-03 0:07
Anonymous4-Sep-03 0:07 
GeneralCombo box Index and Edit Control Pin
Member 3971373-Sep-03 23:17
Member 3971373-Sep-03 23:17 
GeneralRe: Combo box Index and Edit Control Pin
David Crow4-Sep-03 3:02
David Crow4-Sep-03 3:02 
GeneralHelp...win 98 to win XP Pin
fynox3-Sep-03 23:12
fynox3-Sep-03 23:12 
GeneralRe: Help...win 98 to win XP Pin
Magnus Westin3-Sep-03 23:45
Magnus Westin3-Sep-03 23:45 
GeneralProblem with CListCtrl Pin
Ph@ntom3-Sep-03 22:52
Ph@ntom3-Sep-03 22:52 
CListCtrl m_List ;<br />
        m_List.ModifyStyle(0, LVS_LIST) ;<br />
<br />
	CImageList ListImage ;<br />
	HIMAGELIST hList = ImageList_Create(16, 16, ILC_COLOR8 | ILC_MASK, 8, 1) ;<br />
	ListImage.Attach(hList) ;<br />
<br />
	CBitmap bmp ;<br />
	bmp.LoadBitmap(IDB_BITMAP1) ;<br />
	ListImage.Add(&bmp, RGB(255,0,255)) ;	<br />
<br />
	m_List.SetImageList(&ListImage, LVSIL_SMALL) ;<br />
<br />
<br />
	LVITEM lvi ;<br />
	CString strItem ; <br />
<br />
	m_List.DeleteAllItems() ;<br />
<br />
	for (int i=0; i<9; i++)<br />
	{<br />
		strItem.Format(_T("Item %i"), i) ;<br />
		lvi.mask =  LVIF_IMAGE | LVIF_TEXT ;		<br />
		lvi.iItem = i ;<br />
		lvi.iSubItem = 0 ;<br />
		lvi.pszText = (LPTSTR)(LPCTSTR)(strItem) ;<br />
		lvi.iImage = i ;<br />
		m_List.InsertItem(&lvi) ;	<br />
		m_List.SetItemData(i, i+100) ;<br />
	}


Yes, this was the code I wrote for the CListCtrl object.

The Problem is it won't display the images in the list control.

Can anybody tell me what's wrong with the code.

Regards,


-The Phantom
GeneralStrange Behavior with ::CreateDialogIndirect Pin
Bernhard3-Sep-03 22:20
Bernhard3-Sep-03 22:20 
GeneralRe: Strange Behavior with ::CreateDialogIndirect Pin
Iain Clarke, Warrior Programmer3-Sep-03 22:29
Iain Clarke, Warrior Programmer3-Sep-03 22:29 
GeneralRe: Strange Behavior with ::CreateDialogIndirect Pin
Bernhard3-Sep-03 22:37
Bernhard3-Sep-03 22:37 
GeneralThreads, Dialog based appl Pin
KKR3-Sep-03 21:50
KKR3-Sep-03 21:50 
GeneralRe: Threads, Dialog based appl Pin
VIKASK_773-Sep-03 23:52
VIKASK_773-Sep-03 23:52 
GeneralRe: Threads, Dialog based appl Pin
jhwurmbach4-Sep-03 2:59
jhwurmbach4-Sep-03 2:59 
QuestionHow to get the Handle of a WebCam? Pin
nwillie3-Sep-03 21:43
nwillie3-Sep-03 21:43 
GeneralStupid problem Pin
Rohit  Sinha3-Sep-03 21:17
Rohit  Sinha3-Sep-03 21:17 
GeneralRe: Stupid problem Pin
jhwurmbach3-Sep-03 21:49
jhwurmbach3-Sep-03 21:49 
GeneralRe: Stupid problem Pin
Rohit  Sinha4-Sep-03 7:59
Rohit  Sinha4-Sep-03 7:59 
GeneralRe: Stupid problem Pin
Ted Ferenc3-Sep-03 21:55
Ted Ferenc3-Sep-03 21:55 
GeneralRe: Stupid problem Pin
David Crow4-Sep-03 3:07
David Crow4-Sep-03 3:07 
GeneralProblem with thread Pin
Majid Shahabfar3-Sep-03 20:35
Majid Shahabfar3-Sep-03 20:35 
GeneralRe: Problem with thread Pin
Magnus Westin3-Sep-03 21:08
Magnus Westin3-Sep-03 21:08 
GeneralDirectX problem Pin
SteelModule3-Sep-03 19:58
SteelModule3-Sep-03 19:58 
GeneralRe: DirectX problem Pin
JWood5-Sep-03 3:38
JWood5-Sep-03 3:38 
GeneralDetermine if System is Shutting Down/Restarting or Logging off Pin
Paul Farry3-Sep-03 19:58
professionalPaul Farry3-Sep-03 19:58 

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.