Board index » cppbuilder » Get the icon of a file by using "SHGetFileInfo"...

Get the icon of a file by using "SHGetFileInfo"...


2007-12-02 08:14:39 AM
cppbuilder68
Hi all, I use "SHGetFileInfo" to get the large icon from a file or dir and
show it on an Image component:
SHFILEINFO info;
ImageList->Handle = SHGetFileInfo(FileName.c_str(), 0, &info, sizeof(info),
SHGFI_LARGEICON | SHGFI_SYSICONINDEX);
ImageList->ShareImages = true;
ImageList->GetIcon(info.iIcon, ImageIco->Picture->Icon);
But however the icon which i get is only 32*32 pixels, not the original
48*48, How do I get it?
Thank you :)
 
 

Re:Get the icon of a file by using "SHGetFileInfo"...

"remmurds" < XXXX@XXXXX.COM >wrote:
Quote
Hi all, I use "SHGetFileInfo" to get the large icon from a file or dir and
show it on an Image component:
... please post this in an appropriate newsgroup. It is not a question
about the C++ language.
I suggest borland.public.cppbuilder.nativeapi as being more appropriate.
Alan Bellingham
--
Team Browns
<url:www.borland.com/newsgroups/>Borland newsgroup descriptions
<url:www.borland.com/newsgroups/netiquette.html>netiquette