-
November 2nd, 2007, 07:36 AM
#1
Getting the shell icon for folder...
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.
-
November 2nd, 2007, 07:45 AM
#2
Re: Getting the shell icon for folder...
Have a look at IShellIcon::GetIconOf
and other IShellIcon methods.
Victor Nijegorodov
-
November 2nd, 2007, 07:55 AM
#3
Re: Getting the shell icon for folder...
Thanks for the reply VictorN & also for understanding my post . 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.
-
November 2nd, 2007, 08:01 AM
#4
Re: Getting the shell icon for folder...
From MSDN:
CImageList::Add
int Add( CBitmap* pbmImage, CBitmap* pbmMask );
int Add( CBitmap* pbmImage, COLORREF crMask );
int Add( HICON hIcon );
So you don't need to convert anything.
PS. If you don't use MFC - then use ImageList_AddIcon macro.
Victor Nijegorodov
-
November 2nd, 2007, 08:03 AM
#5
Re: Getting the shell icon for folder...
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
|