Here is the constructor of the CExtDateTimeWnd
class:
CExtDateTimeWnd::CExtDateTimeWnd()
: CExtDurationWnd()
, m_bBlankYear( false )
, m_bBlankMonth( false )
, m_bBlankDay( false )
, m_bBlankHour( false )
, m_bBlankMinute( false )
, m_bBlankSecond( false )
, m_bBlankDesignator( false )
, m_bAutoSelectNext( false )
{
m_eMode = CExtDateTimeWnd::all;
m_eTimeFormat = CExtDateTimeWnd::automatic;
m_dtDate = COleDateTime::GetCurrentTime();
SetStatus( CExtDurationWnd::null );
}
As you can see it does not use
CDateTimeCtrl
at all, so the problem has nothing to do with
CExtDateTimeWnd
. We can guess that you may incorrectly create the
CExtDateTimeWnd
control. In the dialog resource editor you put the
Date Time Picker standard control on the form. But actually the
CExtDateTimeWnd
control is not based on the
CDateTimeCtrl
control, it is a control coded from the scratch, so the
Custom Control type should be used instead. Please take a look at the
IDD_PAGE_DATE_TIME_DURATION
form in the
ProfUIS_Controls sample. There you can see the
IDC_DATETIME
custom control which is used for creating the
CExtDateTimeWnd
control.