-
July 15th, 2010, 04:25 PM
#1
Cimagelist in clistCtrl
Dear Sir/Madam ~
I have a clistctrl, for each item in the list, there is a defined icon I would like to use
itemA->iconA.ico
itemB->iconB.ico
itemC->iconC.ico
...
long list
How can I use those icons in my listcontrol ?
Thank you Sir/Madam ~ very much
-
July 15th, 2010, 05:51 PM
#2
Re: Cimagelist in clistCtrl
-
July 15th, 2010, 09:46 PM
#3
Re: Cimagelist in clistCtrl
Hmmm, I seem to get the idea of cimagelist now
But still
I have used Shell32 function to insert system icons (available worldwide by google, so please I am not posting it again here) into list control sucessfully, now I wonder how the clistctrl's setimagelist distinguishes each added data/file's identity to assign it an appropriate icon ?
If I reason the same steps as you explain, I am stuck. Could Sir ovidiucuu ******** ?
Thank you Sir ovidiucucu
-
July 16th, 2010, 06:14 AM
#4
Re: Cimagelist in clistCtrl
See CListCtrl::InsertItem and CListCtrl::SetItem.
You will notice a parameter which is an index in the imagelist.
See also List Items and Image Lists.
-
July 17th, 2010, 06:57 PM
#5
Re: Cimagelist in clistCtrl
Hello, ovidiucucu
I have tried
HICON hi=ExtractAssociateIcon(afxgetinstancehandle(),_T("C:\\windows\\shell32.dll"),&dw);
imglisg.add(hi);
hi contains valid value (!NULL) but I have got an assertion failure at the add function
-
July 18th, 2010, 02:11 PM
#6
Re: Cimagelist in clistCtrl
Originally Posted by Dadidum
Hello, ovidiucucu
I have tried
HICON hi=ExtractAssociateIcon(afxgetinstancehandle(),_T("C:\\windows\\shell32.dll"),&dw);
imglisg.add(hi);
hi contains valid value (!NULL) but I have got an assertion failure at the add function
What is afxgetinstancehandle?
What is dw?
What is imglisg.add(hi);?
PLease, show your actual code, not a pseudo-code.
Victor Nijegorodov
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
|