]>
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 IMPLEMENT_DYNAMIC_CLASS(wxIcon
, wxIconBase
)
52 // ============================================================================
54 // ============================================================================
56 // ----------------------------------------------------------------------------
58 // ----------------------------------------------------------------------------
60 void wxIconRefData::Free()
64 ::DestroyIcon((HICON
) m_hIcon
);
70 // ----------------------------------------------------------------------------
72 // ----------------------------------------------------------------------------
78 wxIcon::wxIcon(const char WXUNUSED(bits
)[],
84 wxIcon::wxIcon(const wxString
& iconfile
,
90 LoadFile(iconfile
, flags
, desiredWidth
, desiredHeight
);
97 bool wxIcon::LoadFile(const wxString
& filename
,
99 int desiredWidth
, int desiredHeight
)
103 wxGDIImageHandler
*handler
= FindHandler(type
);
111 return handler
->Load(this, filename
, type
, desiredWidth
, desiredHeight
);