Getting default icon for a file type 
Author Message
 Getting default icon for a file type

Hello.

I have a report view of files in a directory. I don't know
how should I do to assign the default icon, or where can I
load this icon in my CImageList.

I. e. I want to show the files with her normal icon, like the
explorer.

Thanks in advance.



Fri, 31 May 2002 03:00:00 GMT  
 Getting default icon for a file type
SHGetFileInfo

If the uFlags parameter includes the SHGFI_USEFILEATTRIBUTES flag, this
parameter does not have to be a valid file name. The function will proceed
as if the file exists with the specified name and with the file attributes
passed in the dwFileAttributes parameter. This allows you to obtain
information about a file type by passing just the extension for pszPath and
passing FILE_ATTRIBUTE_NORMAL in dwFileAttributes.

--


Quote:
>Hello.

>I have a report view of files in a directory. I don't know
>how should I do to assign the default icon, or where can I
>load this icon in my CImageList.

>I. e. I want to show the files with her normal icon, like the
>explorer.

>Thanks in advance.



Fri, 31 May 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Getting default icon for a file type

2. Default Icon Hell: MFC Icon appears even after file and IDR_MAINFRAME changed

3. Change Default File Type to Source File?

4. Change Default File Type to Source File?

5. Default icon setting with user defined file extension

6. Change default new file type to .cpp

7. Default file type action

8. CFileDialog How to set default file type list

9. Default File Types

10. Change default new file type to .cpp

11. Help with getting an Icon from a file

12. getting icon from file extension

 

 
Powered by phpBB® Forum Software