]>
git.saurik.com Git - wxWidgets.git/blob - src/msw/icon.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxIcon class
4 // Author: Julian Smart
5 // Modified by: 20.11.99 (VZ): don't derive from wxBitmap any more
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
21 #pragma implementation "icon.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
39 #include "wx/msw/private.h"
41 #if wxUSE_RESOURCE_LOADING_IN_MSW
42 #include "wx/msw/curico.h"
43 #include "wx/msw/curicop.h"
46 // ----------------------------------------------------------------------------
48 // ----------------------------------------------------------------------------
50 #if !USE_SHARED_LIBRARIES
51 IMPLEMENT_DYNAMIC_CLASS(wxIcon
, wxIconBase
)
54 // ============================================================================
56 // ============================================================================
58 // ----------------------------------------------------------------------------
60 // ----------------------------------------------------------------------------
62 void wxIconRefData::Free()
66 ::DestroyIcon((HICON
) m_hIcon
);
72 // ----------------------------------------------------------------------------
74 // ----------------------------------------------------------------------------
80 wxIcon::wxIcon(const char WXUNUSED(bits
)[],
86 wxIcon::wxIcon(const wxString
& iconfile
,
92 LoadFile(iconfile
, flags
, desiredWidth
, desiredHeight
);
99 bool wxIcon::LoadFile(const wxString
& filename
,
101 int desiredWidth
, int desiredHeight
)
105 wxGDIImageHandler
*handler
= FindHandler(type
);
113 return handler
->Load(this, filename
, type
, desiredWidth
, desiredHeight
);