|
-
April 14th, 1999, 04:17 AM
#1
Add Image to subitem
Is it possible to add icon to a subitem in a Record View of CListCtrl ?
-
April 23rd, 1999, 05:52 AM
#2
Re: Add Image to subitem
It is possible to add icons to the subitems of a CListCtrl. There are two new fields in the LV_COLUMN struct - iImage being one of them. I have not used this method but you can try it and you do not need to create owner-drawn control.
If you have a CListCtrl in a view other than CListView (say CFormView), you can override OnDrawItem(WM_DRAWITEM) and draw your control items and subitems.
If you have derived the view from CListView, you can override DrawItem.
Hope this solves your problem
-
April 27th, 1999, 08:57 AM
#3
Re: Add Image to subitem
Use the extended ListView style LVS_EX_SUBITEM_IMAGES. Create the CListCtrl and change style using the macro ListView_SetExtendedListViewStyle(m_listctrl.m_hWnd, LVS_EX_SUBITEMIMAGES). Use LVCOLUMN (superset of LV_COLUMN) to set the icons to the subitems.
Help is available in MSDN library( Jan 1997 and later).
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
|