Pointers
-
There are two pointers, both points on controls of type IDC_DATETIMEPICKER. COleDateTime* pIN = (COleDateTime*) GetDlgItem(IDC_DATETIMEPICKER1); The second control is on another dialog window COleDateTime* pDest = (COleDateTime*) (m_pParent->GetDlgItem(IDC_DATETIMEPICKER1)); The first pointer to point date ’27.05.1953’ How do with help the second pointer receive date ’27.05.1953’ ? Thank you.
-
There are two pointers, both points on controls of type IDC_DATETIMEPICKER. COleDateTime* pIN = (COleDateTime*) GetDlgItem(IDC_DATETIMEPICKER1); The second control is on another dialog window COleDateTime* pDest = (COleDateTime*) (m_pParent->GetDlgItem(IDC_DATETIMEPICKER1)); The first pointer to point date ’27.05.1953’ How do with help the second pointer receive date ’27.05.1953’ ? Thank you.
Is this your real code ? Because you cannot cast a CDateTimeCtrl (which is the control on your dialog) to a COleDateTime. You can't do something like that, you will end up will something totally invalid (it strange that it didn't even crash). So, cast it to a CDateTimeCtrl instead of a COleDateTime.
Cédric Moonen Software developer
Charting control [v2.0] OpenGL game tutorial in C++