X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fcf90ee1b10d41b4ddfbfa537481a9c64e30348f..052d2fc5818243dadbc1ec54b1120e295304fc55:/src/msw/button.cpp diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 4223865169..84bcc4d748 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -40,6 +40,7 @@ #include "wx/dcscreen.h" #endif +#include "wx/stockitem.h" #include "wx/msw/private.h" // ---------------------------------------------------------------------------- @@ -121,13 +122,17 @@ IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) bool wxButton::Create(wxWindow *parent, wxWindowID id, - const wxString& label, + const wxString& lbl, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name) { + wxString label(lbl); + if (label.empty() && wxIsStockID(id)) + label = wxGetStockLabel(id); + if ( !CreateControl(parent, id, pos, size, style, validator, name) ) return false;