|
-
March 31st, 1999, 11:16 AM
#1
CListCtrl problem
In a list control, can a subitem contain an image. I can't seem to get this to work. If possible, I don't understand
why following code doesn't work:
//m_icons is CImageList
m_icons.Create( 16, 16, ILC_COLOR, 5, 5 );
m_icons.Add( AfxGetApp()->LoadIcon( IDI_ICON1 ) );
m_icons.Add( AfxGetApp()->LoadIcon( IDI_ICON2 ) );
m_listCtrl.SetImageList( &m_icons, LVSIL_SMALL );
m_listCtrl.InsertColumn( 0, "Name", LVCFMT_CENTER, 50, 0 );
m_listCtrl.InsertColumn( 1, "Description", LVCFMT_LEFT, 100, 1 );
m_listCtrl.InsertItem( 0, "Marcus", 0 );
m_listCtrl.SetItem( 0, 1, LVIF_IMAGE, NULL, 0, 0, 0, 0 );
-
March 31st, 1999, 12:09 PM
#2
Re: CListCtrl problem
Owner draw...look at the list control section here on CodeGuru for some examples of how to do this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|