Article View: borland.public.cppbuilder.nativeapi
Article #16464Re: Loading a 16x16 icon from resource
From: Bob Gonder
Date: Tue, 13 May 2003 20:38
Date: Tue, 13 May 2003 20:38
15 lines
1680 bytes
1680 bytes
"Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de> wrote: >I am not able to load my 16x16 icon from my res file. I always >get them as 32x32. Here is my code: > > HICON hIcon = LoadImage(HInstance, MAKEINTRESOURCE(ID_SMALLICON), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR); > >I have tried zeros instead of 16 and tried also other flags, but >nothing helps. Yes, the description for the LR_DEFAULTSIZE is self contradictory. Don't know _the_ answer, but you could probably work around this by getting the actual size that MS loaded, create a new DC with 16x16 and stretch (shrink) the icon back. Course, you could also get around it by using BMPs instead of ICONs.
Technical Details
Message-ID:
<0il2cvon7ilhg92b76ak4pq1l5euamed4q@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3ec102d2$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,b203a5a9fd734f5 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-05-13 13:43:19 PST From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Loading a 16x16 icon from resource Date: Tue, 13 May 2003 13:38:28 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <0il2cvon7ilhg92b76ak4pq1l5euamed4q@4ax.com> References: <3ec102d2$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.31.165.238 X-Trace: newsgroups.borland.com 1052858304 67.31.165.238 (13 May 2003 13:38:24 -0700) Lines: 19 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail