Article View: borland.public.cppbuilder.nativeapi
Article #829Re: Get the icon by using "SHGetFileInfo"...
From: Asger Joergensen
Date: Sun, 02 Dec 2007 17:34
Date: Sun, 02 Dec 2007 17:34
39 lines
2137 bytes
2137 bytes
Hi remmurds
remmurds says:
>
> But however the icon which i get is only 32*32 pixels, not the original
> 48*48, How do I get it?
According to the help file:
SHGFI_ICON
Retrieves the handle of the icon that represents the file
and the index of the icon within the system image list.
The **handle** is copied to the **hIcon** member of the
structure specified by psfi, and the index is copied to
the iIcon member.
The return value is the handle of the system image list.
It looks like You have to deal with the hIcon handle
and then use the:
DrawIconEx(
HDC hdc, // handle to device context
int xLeft, // x-coordinate of upper left corner
int yTop, // y-coordinate of upper left corner
HICON hIcon, // handle to icon to draw
int cxWidth, // width of the icon
int cyWidth, // height of the icon
UINT istepIfAniCur, // index of frame in animated cursor
HBRUSH hbrFlickerFreeDraw, // handle to background brush
UINT diFlags // icon-drawing flags
);
To draw the Icon.
Let me know if it works, I haven't tryed it.
Kind regards
Asger
Technical Details
Message-ID:
<MPG.21bd0b1963f2bda698992f@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newsfeed.gamma.ru!Gamma.RU!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4751fbc8$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,bee658860984a9b7 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Asger Joergensen <junk@Asger-P.dk> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Get the icon by using "SHGetFileInfo"... Date: Sun, 2 Dec 2007 18:34:39 +0100 Message-ID: <MPG.21bd0b1963f2bda698992f@newsgroups.borland.com> References: <4751fbc8$1@newsgroups.borland.com> Organization: Asger-P MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit User-Agent: MicroPlanet-Gravity/2.70.2067 NNTP-Posting-Host: 83.73.201.25 X-Trace: newsgroups.borland.com 1196616874 83.73.201.25 (2 Dec 2007 09:34:34 -0700) Lines: 39 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newsfeed.gamma.ru!Gamma.RU!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail