CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 1999
    Location
    Philippines
    Posts
    46

    CDateTimeCtrl problem

    Good Day!
    what header file should i include when i want to use the CDateTimeCtrl?
    thanks!


  2. #2
    Join Date
    Apr 1999
    Posts
    306

    Re: CDateTimeCtrl problem

    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.


  3. #3
    Join Date
    Apr 1999
    Location
    Philippines
    Posts
    46

    Re: CDateTimeCtrl problem

    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.


  4. #4
    Join Date
    May 1999
    Location
    Republic of Korea
    Posts
    100

    Re: CDateTimeCtrl problem

    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


  5. #5
    Join Date
    May 1999
    Posts
    318

    Re: CDateTimeCtrl problem

    I thing adding "AFXDTCTL.H" include in your stdafx.h will do the thing.

    Hop this help.


  6. #6
    Join Date
    Apr 1999
    Posts
    306

    Re: CDateTimeCtrl problem

    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.


  7. #7
    Join Date
    Apr 1999
    Location
    Philippines
    Posts
    46

    Re: CDateTimeCtrl problem

    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!



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured