DATETIMEPICK_CLASS pre-load

Started by tpekar, July 08, 2014, 04:12:19 PM

Previous topic - Next topic

tpekar

I am trying to load a DATETIMEPICK_CLASS control with my own default date but it keeps replacing it with today's date.  Is there a way to keep it from doing that?  Thanks in advance.

jj2007

In line 44, right under "WM_CREATE", put the DTM_SETSYSTEMTIME message.

JohnF

This seems to work but it was not clear which macro to use at first.


SYSTEMTIME st;
GetSystemTime(&st);
st.wYear = 2000; // set any
st.wMonth = 2;
st.wDay   = 3;

MonthCal_SetCurSel(hwndCal, &st);



John

JohnF

tpekar,

You can also turn off the today stuff at the bottom. Use the style MCS_NOTODAY when creating the control.

John

tpekar