Click to See Complete Forum and Search --> : CDateTimeCtrl problem


Tonio
May 26th, 1999, 09:32 PM
Good Day!
what header file should i include when i want to use the CDateTimeCtrl?
thanks!

ric
May 27th, 1999, 07:27 AM
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.

Tonio
May 28th, 1999, 03:44 AM
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.

Walter I An
May 28th, 1999, 05:57 AM
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

eric33
May 28th, 1999, 06:42 AM
I thing adding "AFXDTCTL.H" include in your stdafx.h will do the thing.

Hop this help.

ric
May 28th, 1999, 07:15 AM
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.

Tonio
May 28th, 1999, 06:03 PM
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!