Hi all!
I am writing an application, when I need to use for a TreeView, icons used by explorer for directory & also the icons for different file type displayed within explorer.
Thanks for your time,
Regards,
Usman.
Printable View
Hi all!
I am writing an application, when I need to use for a TreeView, icons used by explorer for directory & also the icons for different file type displayed within explorer.
Thanks for your time,
Regards,
Usman.
Have a look at IShellIcon::GetIconOf
and other IShellIcon methods.
Thanks for the reply VictorN & also for understanding my post :D. One additional question, the icon returned from the method you mentioned is an HICON, but for the TreeView/Ctrl, I need to populate the Imagelist, and that expects bmp I believe. Do I need to convert it somehow from icon to bmp??? or I can use icon. Sorry if it's too obvious, I've always used bmps with ImageLists.
Thanks for your time,
Regards,
Usman.
From MSDN:So you don't need to convert anything. ;)Quote:
CImageList::Add
int Add( CBitmap* pbmImage, CBitmap* pbmMask );
int Add( CBitmap* pbmImage, COLORREF crMask );
int Add( HICON hIcon );
PS. If you don't use MFC - then use ImageList_AddIcon macro.
super!
Regards,
Usman.