Click here to Skip to main content
15,929,263 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: File type icons Pin
Jörgen Sigvardsson14-Dec-02 0:31
Jörgen Sigvardsson14-Dec-02 0:31 
GeneralRe: File type icons Pin
Jörgen Sigvardsson14-Dec-02 1:13
Jörgen Sigvardsson14-Dec-02 1:13 
GeneralRe: File type icons Pin
Magius9614-Dec-02 1:24
Magius9614-Dec-02 1:24 
GeneralRe: File type icons Pin
Gary R. Wheeler14-Dec-02 4:37
Gary R. Wheeler14-Dec-02 4:37 
GeneralRe: File type icons Pin
Jörgen Sigvardsson14-Dec-02 6:19
Jörgen Sigvardsson14-Dec-02 6:19 
GeneralRe: File type icons Pin
Gary R. Wheeler15-Dec-02 2:21
Gary R. Wheeler15-Dec-02 2:21 
GeneralRe: File type icons Pin
Jörgen Sigvardsson15-Dec-02 2:50
Jörgen Sigvardsson15-Dec-02 2:50 
GeneralRe: File type icons Pin
Michael Dunn14-Dec-02 4:40
sitebuilderMichael Dunn14-Dec-02 4:40 
I do it with SHGetFileInfo(), however AFAIK it doesn't restrieve the 48x48 icon, only 16x16 and 32x32. Here's how to get the icon for DLL files:
SHFILEINFO sfi = {0};
 
  SHGetFileInfo ( _T("foo.dll"), FILE_ATTRIBUTE_NORMAL,
                  &sfi, sizeof(SHFILEINFO), 
                  SHGFI_USEFILEATTRIBUTES | SHGFI_ICON |
                    SHGFI_LARGEICON );
 
// now sfi.hIcon holds the 32x32 icon
Replace SHGFI_LARGEICON with SHFGI_SMALLICON to get the 16x16 one.
Note that foo.dll doesn't need to exist, the SHGFI_USEFILEATTRIBUTES flag tells the API to just look at the extension of the name you pass.

--Mike--
Friday's GoogleFight results: Britney Spears 2,190,000 - Erica Weichers 23 Frown | :(

1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm

GeneralRe: File type icons Pin
Jörgen Sigvardsson14-Dec-02 6:19
Jörgen Sigvardsson14-Dec-02 6:19 
QuestionHow Do I Test If A File Is Open By Another Process? Pin
John Clump13-Dec-02 23:08
John Clump13-Dec-02 23:08 
AnswerRe: How Do I Test If A File Is Open By Another Process? Pin
Nick Parker14-Dec-02 1:50
protectorNick Parker14-Dec-02 1:50 
Generaldialogs not rendering (painting) immeditatly Pin
cleathley13-Dec-02 22:22
cleathley13-Dec-02 22:22 
GeneralRe: dialogs not rendering (painting) immeditatly Pin
Ravi Bhavnani14-Dec-02 10:55
professionalRavi Bhavnani14-Dec-02 10:55 
GeneralCOM + object pooling in VC7 Pin
Christian Graus13-Dec-02 21:44
protectorChristian Graus13-Dec-02 21:44 
GeneralSimulate Find Target Programatically Pin
Paul Farry13-Dec-02 20:58
professionalPaul Farry13-Dec-02 20:58 
GeneralConverting and Concatenating Strings Pin
KBL13-Dec-02 20:56
KBL13-Dec-02 20:56 
GeneralRe: Converting and Concatenating Strings Pin
Christian Graus13-Dec-02 21:42
protectorChristian Graus13-Dec-02 21:42 
GeneralRe: Converting and Concatenating Strings Pin
KBL13-Dec-02 21:59
KBL13-Dec-02 21:59 
GeneralRe: Converting and Concatenating Strings Pin
Christian Graus13-Dec-02 22:13
protectorChristian Graus13-Dec-02 22:13 
GeneralRe: Converting and Concatenating Strings Pin
Gary R. Wheeler14-Dec-02 4:54
Gary R. Wheeler14-Dec-02 4:54 
Questionwhere find articel on edit and list control searching? Pin
MyMojo13-Dec-02 20:41
MyMojo13-Dec-02 20:41 
AnswerRe: where find articel on edit and list control searching? Pin
valikac14-Dec-02 6:50
valikac14-Dec-02 6:50 
Generalbuffer increase & increment in C++/MFC Pin
MyMojo13-Dec-02 20:27
MyMojo13-Dec-02 20:27 
Generalevent handler question.. Pin
trustno113-Dec-02 18:09
trustno113-Dec-02 18:09 
GeneralRe: event handler question.. Pin
Christian Graus13-Dec-02 19:12
protectorChristian Graus13-Dec-02 19:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.