]>
git.saurik.com Git - wxWidgets.git/blob - src/msw/bmpbuttn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/msw/bmpbuttn.cpp
3 // Purpose: wxBitmapButton
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
20 #include "wx/bmpbuttn.h"
24 #include "wx/dcmemory.h"
28 #include "wx/msw/private.h"
29 #include "wx/msw/dc.h" // for wxDCTemp
31 #include "wx/msw/uxtheme.h"
34 // no need to include tmschema.h
36 #define BP_PUSHBUTTON 1
41 #define PBS_DISABLED 4
42 #define PBS_DEFAULTED 5
44 #define TMT_CONTENTMARGINS 3602
46 #endif // wxUSE_UXTHEME
48 #ifndef ODS_NOFOCUSRECT
49 #define ODS_NOFOCUSRECT 0x0200
52 // ----------------------------------------------------------------------------
54 // ----------------------------------------------------------------------------
56 BEGIN_EVENT_TABLE(wxBitmapButton
, wxBitmapButtonBase
)
57 EVT_SYS_COLOUR_CHANGED(wxBitmapButton::OnSysColourChanged
)
63 long "style" , wxBU_AUTODRAW
70 bool wxBitmapButton::Create(wxWindow
*parent
,
72 const wxBitmap
& bitmap
,
74 const wxSize
& size
, long style
,
75 const wxValidator
& validator
,
78 if ( !wxBitmapButtonBase::Create(parent
, id
, pos
, size
, style
,
83 SetBitmapLabel(bitmap
);
85 if ( !size
.IsFullySpecified() )
87 // As our bitmap has just changed, our best size has changed as well so
88 // reset the initial size using the new value.
95 #endif // wxUSE_BMPBUTTON