]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/button.cpp
added some missing mac headers
[wxWidgets.git] / src / msw / button.cpp
index 422386516934a68d9c7a98db2ca9413d1d604cd5..84bcc4d7485d36534bf808f498f8bf1327aa97b8 100644 (file)
@@ -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;