如何获得这里的那个时间值啊?

解决方案 »

  1.   

    是日历控件,类名就是这个,msdn上基本我看不懂
      

  2.   

    他的类是COleDateTime可以这么做:
    SYSTEMTIME st;
    COleDateTime::GetAsSystemTime(&st);
    CTime ct(st);
      

  3.   

    to:tacchinardi(tacchinardi) 
    这个就是你要的时间,只不过是先转化一下罢了。
    这是msdn的原文:
    你看一下,就知道了COleDateTime::GetAsSystemTime
    BOOL GetAsSystemTime( SYSTEMTIME& sysTime ) const;Return ValueTRUE if successful; FALSE if the conversion fails, or if the COleDateTime object is NULL or invalid.ParameterssysTimeA reference to aSYSTEMTIME structure to be converted to a date/time value and copied into the new COleDateTime object.ResCall this member function to convert the time in the COleDateTime object to be represented as a SYSTEMTIME data structure. GetAsSystemTime stores the resulting time in the referenced sysTime object. The SYSTEMTIME data structure initialized by this function will have its wMilliseconds member set to zero.
      

  4.   

    在ClassWizard里为Month Calender控件设置value类型为CTime的关联变量(比如m_tDate),则m_tDate就是你所要的时间值,是CTime类型的