]>
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()
65 ::DestroyIcon((HICON
) m_hIcon
);
68 // ----------------------------------------------------------------------------
70 // ----------------------------------------------------------------------------
76 wxIcon::wxIcon(const char WXUNUSED(bits
)[],
82 wxIcon::wxIcon(const wxString
& iconfile
,
88 LoadFile(iconfile
, flags
, desiredWidth
, desiredHeight
);
95 bool wxIcon::LoadFile(const wxString
& filename
,
97 int desiredWidth
, int desiredHeight
)
101 wxGDIImageHandler
*handler
= FindHandler(type
);
109 return handler
->Load(this, filename
, type
, desiredWidth
, desiredHeight
);