HiTtyler,
Thanks for using MSDN Newsgroup!
Bitmap class just uses the Icon handle, it will not take the ownership
of that handle, so you need
destroy it by yourself.
If you have any further questions on this issue, pleaset le me know.
Thanks!
Best regards,
Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" should be removed before
sending, Thanks!
--------------------
| From: "Tyler" <
[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| References: <
[email protected]>
<
[email protected]>
| Subject: Re: Loading Icon Resource from Win32 DLL
| Lines: 28
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <
[email protected]>
| Date: Tue, 30 Sep 2003 03:13:35 GMT
| NNTP-Posting-Host: 24.192.11.167
| X-Complaints-To: (e-mail address removed)
| X-Trace: news04.bloor.is.net.cable.rogers.com 1064891615 24.192.11.167
(Mon, 29 Sep 2003 23:13:35 EDT)
| NNTP-Posting-Date: Mon, 29 Sep 2003 23:13:35 EDT
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.com!cyclone01.bloor.is.net.cable.rogers.com!news04.bloor.is.net.cable.rogers.c
om.POSTED!not-for-mail
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:53426
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| Do you know whether ownership of the HICON is taken over by the Bitmap
class
| when I do a Bitmap.FromHIcon or must I call DestroyIcon after creating a
| bitmap from the Icon? Is there anyway to tell that from the .NET
| documentation?
|
| Thanks again for your assistance, Tyler
|
|
| | > Tyler,
| >
| > >Is there a nice way in the .NET framework to load an icon resource that
| is
| > >embedded within a Win32 DLL?
| >
| > Not really, I think you have to call the ExtractIconEx Win32 API.
| >
| >
| >
| > Mattias
| >
| > --
| > Mattias Sjögren [MVP] mattias @ mvps.org
| >
http://www.msjogren.net/dotnet/
| > Please reply only to the newsgroup.
|
|
|