Add wxIcon::CreateFromHICON() to wxMSW.

Provide a public method properly assigning an HICON to wxIcon, instead of
asking people to call SetHICON() and SetSize().

Closes #15023.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-02-10 16:13:37 +00:00
parent 87a1dbc52e
commit 973abcbb6a
5 changed files with 38 additions and 18 deletions

View File

@@ -179,6 +179,22 @@ public:
*/
virtual ~wxIcon();
/**
Attach a Windows icon handle.
This wxMSW-specific method allows to assign a native Windows @c HICON
(which must be castes to @c WXHICON opaque handle type) to wxIcon.
Notice that this means that the @c HICON will be destroyed by wxIcon
when it is destroyed.
@return @true if successful.
@onlyfor{wxmsw}
@since 2.9.5
*/
bool CreateFromHICON(WXHICON icon);
/**
Returns disabled (dimmed) version of the icon.