]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/datectrl.h
added copy ctor to wxCStrData to fix crashes when passing to vararg functions
[wxWidgets.git] / include / wx / msw / datectrl.h
index 2faab5ac34e7156734122cbb31ba437cb7af00d9..c4078c6f6893edb7f64534a0109e465e8c1684f5 100644 (file)
@@ -27,7 +27,7 @@ public:
                      const wxDateTime& dt = wxDefaultDateTime,
                      const wxPoint& pos = wxDefaultPosition,
                      const wxSize& size = wxDefaultSize,
-                     long style = 0,
+                     long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
                      const wxValidator& validator = wxDefaultValidator,
                      const wxString& name = wxDatePickerCtrlNameStr)
     {
@@ -39,7 +39,7 @@ public:
                 const wxDateTime& dt = wxDefaultDateTime,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
-                long style = 0,
+                long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxDatePickerCtrlNameStr);
 
@@ -53,15 +53,18 @@ public:
     virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2);
     virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const;
 
-protected:
     virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
 
     virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
 
+protected:
     virtual wxSize DoGetBestSize() const;
 
+    // the date currently shown by the control, may be invalid
+    wxDateTime m_date;
+
 
-    DECLARE_NO_COPY_CLASS(wxDatePickerCtrl)
+    DECLARE_DYNAMIC_CLASS_NO_COPY(wxDatePickerCtrl)
 };
 
 #endif // _WX_MSW_DATECTRL_H_