Locked WTL and CDateTimePickerCtrl Question

  • Saturday, April 14, 2012 9:31 PM
     
     
    I've created a simple dialog and moved over from the toolbox a DateTimePicker object.  The problem is...i have no idea and cannot find any function to retrieve the current value within this item.  Is there something special i need to do in order to get this item?  Im using a CDateTimePickerCtrl object as a member variable to my dialog but it seems to have no member functions for obtaining this value.

All Replies

  • Sunday, April 15, 2012 1:58 AM
     
     Answered

    I think you use GetSystemTime().  I haven't used that in a very long time.

    I found this article that may be useful for you.  It is unrelated really, but it uses the control in one of the property sheets.

    http://www.codeproject.com/Articles/910/PropertySheet-Shell-Extension-AppWizard

    Tom

  • Saturday, October 06, 2012 8:15 PM
     
     

    Hello lochnesse

    Set a handler or function to   DTN_DATETIMECHANGE   notification message for the control in question... Once this done you would see (pDTChange) inside the new function body..

    Use this variable to get the selected date .. something like this

                 nDay = pDTChange->st.wDay;

                 nMonth = pDTChange->st.wMonth:           etc.... etc....

    I hope this would  help

    Best Wishes

    Lagarto