the icon, now they do.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16184
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// may return NULL
extern wxWindow *wxGetWindowFromHWND(WXHWND hwnd);
// may return NULL
extern wxWindow *wxGetWindowFromHWND(WXHWND hwnd);
+
+// Get the size of an icon
+wxSize wxGetHiconSize(HICON hicon);
+
+
#endif // wxUSE_GUI
#endif
#endif // wxUSE_GUI
#endif
// private functions
// ----------------------------------------------------------------------------
// private functions
// ----------------------------------------------------------------------------
-static wxSize GetHiconSize(HICON hicon);
- size = GetHiconSize(hicon);
+ size = wxGetHiconSize(hicon);
#else // Win16
HICON hicon = ReadIconFile((wxChar *)name.c_str(),
wxGetInstance(),
#else // Win16
HICON hicon = ReadIconFile((wxChar *)name.c_str(),
wxGetInstance(),
- wxSize size = GetHiconSize(hicon);
+ wxSize size = wxGetHiconSize(hicon);
icon->SetSize(size.x, size.y);
icon->SetHICON((WXHICON)hicon);
icon->SetSize(size.x, size.y);
icon->SetHICON((WXHICON)hicon);
// private functions
// ----------------------------------------------------------------------------
// private functions
// ----------------------------------------------------------------------------
-static wxSize GetHiconSize(HICON hicon)
+wxSize wxGetHiconSize(HICON hicon)
{
wxSize size(32, 32); // default
{
wxSize size(32, 32); // default
#ifdef __WXMSW__
#include "wx/msw/registry.h"
#ifdef __WXMSW__
#include "wx/msw/registry.h"
+ #include "wx/msw/private.h"
#endif // OS
#include "wx/msw/mimetype.h"
#endif // OS
#include "wx/msw/mimetype.h"
default:
icon->SetHICON((WXHICON)hIcon);
default:
icon->SetHICON((WXHICON)hIcon);
+ wxSize size = wxGetHiconSize(hIcon);
+ icon->SetSize(size);
if ( iconIndex )
*iconIndex = nIndex;
if ( iconFile )
if ( iconIndex )
*iconIndex = nIndex;
if ( iconFile )