]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/button.h
use MSWAlwaysDrawBg() to fix the problem with black background; rewrote/cleaned up...
[wxWidgets.git] / include / wx / msw / button.h
index 8e5a62461ef971cf02f3cc05a7ec9ac71e6ce098..2728b707394aac52b67771d58d79b916f87a2442 100644 (file)
@@ -26,7 +26,7 @@ public:
     wxButton() { }
     wxButton(wxWindow *parent,
              wxWindowID id,
-             const wxString& label,
+             const wxString& label = wxEmptyString,
              const wxPoint& pos = wxDefaultPosition,
              const wxSize& size = wxDefaultSize,
              long style = 0,
@@ -38,7 +38,7 @@ public:
 
     bool Create(wxWindow *parent,
                 wxWindowID id,
-                const wxString& label,
+                const wxString& label = wxEmptyString,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
@@ -54,6 +54,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 +72,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