Good Day!
what header file should i include when i want to use the CDateTimeCtrl?
thanks!
Printable View
Good Day!
what header file should i include when i want to use the CDateTimeCtrl?
thanks!
As soon as CDateTimeCtrl is a MFC you should try to include some of the MFC headers. Try afxstd.h or generate a wizzard application and see which files are included.
Hi!
"stdafx.h" is already included in my code, and
I have declared 'm_cdtTransmissionDate' as
DDX_Control(pDX, IDC_TRANSMISSIONDATE, m_cdtTransmissionDate);
but, same errors were detected:
error C2146: syntax error : missing ';' before identifier 'm_cdtTransmissionDate'
error C2501: 'CDateTimeCtrl' : missing storage-class or type specifiers
error C2501: 'm_cdtTransmissionDate' : missing storage-class or type specifiers
thnks.
Wouldn't "#include <afxcmn.h>" do?
I think this is the header file for common ctrls.
If U still get errors, try to include "commctrl.h" explicitly.
IF U STILL GET ERRORS, MAYBE U HAVE AN OLD HEADER.
IF IT IS THE CASE, DOWNLOAD NEW PLATEFORM SDK!!
Hope for help and good luck. :-)
Walter
I thing adding "AFXDTCTL.H" include in your stdafx.h will do the thing.
Hop this help.
This errors means that the compiler cannot recognize CDateTime as a class type. Look, I cannot see your whole code and because of this I cannot be of a great help, but why do not you use the class wizzard to attach a member variable to you control.
Good Day!
including the "AFXDTCTL.H" in my stdafx.h file made my day!
many thanks to ric,walter i an and ERIC33 for the support!