X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c140b7e7c9aabb61ab5e6e017cfb768c05373502..b5cf8234c683f80d207fc8e96cd364eff122a025:/include/wx/msw/button.h diff --git a/include/wx/msw/button.h b/include/wx/msw/button.h index 8e5a62461e..3ee9145ae9 100644 --- a/include/wx/msw/button.h +++ b/include/wx/msw/button.h @@ -36,6 +36,27 @@ public: Create(parent, id, label, pos, size, style, validator, name); } + wxButton(wxWindow *parent, wxWindowID id, wxStockItemID stock, + const wxString& descriptiveLabel = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Create(parent, id, stock, descriptiveLabel, pos, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, wxStockItemID stock, + const wxString& descriptiveLabel = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + return CreateStock(parent, id, stock, descriptiveLabel, + pos, style, validator, name); + } + bool Create(wxWindow *parent, wxWindowID id, const wxString& label, @@ -54,6 +75,12 @@ public: virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); virtual bool MSWCommand(WXUINT param, WXWORD id); + virtual void ApplyParentThemeBackground(const wxColour& bg) + { + // avoide switching into owner-drawn mode + wxControl::SetBackgroundColour(bg); + } + #ifdef __WIN32__ // coloured buttons support virtual bool SetBackgroundColour(const wxColour &colour); @@ -66,7 +93,7 @@ private: #endif // __WIN32__ protected: - // send a notification event, return TRUE if processed + // send a notification event, return true if processed bool SendClickEvent(); // default button handling