X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8318f30f10c8c5f354d945a2842fdd99c6afb920..bdebb379299aaf1ee588dbe15968829df49ccedc:/src/msw/datectrl.cpp diff --git a/src/msw/datectrl.cpp b/src/msw/datectrl.cpp index 2928307558..4b6c8c6e61 100644 --- a/src/msw/datectrl.cpp +++ b/src/msw/datectrl.cpp @@ -104,7 +104,7 @@ wxDatePickerCtrl::Create(wxWindow *parent, static bool s_initDone = false; // MT-ok: used from GUI thread only if ( !s_initDone ) { - if ( wxTheApp->GetComCtl32Version() < 470 ) + if ( wxApp::GetComCtl32Version() < 470 ) { wxLogError(_("This system doesn't support date picker control, please upgrade your version of comctl32.dll")); @@ -141,7 +141,7 @@ wxDatePickerCtrl::Create(wxWindow *parent, if ( !MSWCreateControl(DATETIMEPICK_CLASS, wxEmptyString, pos, size) ) return false; - if ( dt.IsValid() ) + if ( dt.IsValid() || (style & wxDP_ALLOWNONE) ) SetValue(dt); return true; @@ -153,7 +153,7 @@ WXDWORD wxDatePickerCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const // although MSDN doesn't mention it, DTS_UPDOWN doesn't work with // comctl32.dll 4.72 - if ( wxTheApp->GetComCtl32Version() > 472 && (style & wxDP_SPIN) ) + if ( wxApp::GetComCtl32Version() > 472 && (style & wxDP_SPIN) ) styleMSW |= DTS_UPDOWN; //else: drop down by default