X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/51317496171b33f2abb155a1214f567b79d66e43..cf516c2bb2b8bc462f6f0cb852fb2fc2d86c9c66:/include/wx/msw/private/datecontrols.h diff --git a/include/wx/msw/private/datecontrols.h b/include/wx/msw/private/datecontrols.h index 3d5a865646..08889d51c5 100644 --- a/include/wx/msw/private/datecontrols.h +++ b/include/wx/msw/private/datecontrols.h @@ -11,6 +11,10 @@ #ifndef _MSW_PRIVATE_DATECONTROLS_H_ #define _MSW_PRIVATE_DATECONTROLS_H_ +#include "wx/datetime.h" + +#include "wx/msw/wrapwin.h" + // namespace for the helper functions related to the date controls namespace wxMSWDateControls { @@ -20,32 +24,8 @@ namespace wxMSWDateControls // happen with a very old version of common controls DLL, i.e. before 4.70) extern bool CheckInitialization(); -// convert SYSTEMTIME to wxDateTime -inline void FromSystemTime(wxDateTime *dt, const SYSTEMTIME& st) -{ - dt->Set(st.wDay, - wx_static_cast(wxDateTime::Month, wxDateTime::Jan + st.wMonth - 1), - st.wYear, - 0, 0, 0); -} - -// convert wxDateTime to SYSTEMTIME -inline void ToSystemTime(SYSTEMTIME *st, const wxDateTime& dt) -{ - const wxDateTime::Tm tm(dt.GetTm()); - - st->wYear = (WXWORD)tm.year; - st->wMonth = (WXWORD)(tm.mon - wxDateTime::Jan + 1); - st->wDay = tm.mday; - - st->wDayOfWeek = - st->wHour = - st->wMinute = - st->wSecond = - st->wMilliseconds = 0; -} - } // namespace wxMSWDateControls #endif // _MSW_PRIVATE_DATECONTROLS_H_ +