CMonthCalCtl::GetCurSel(CTime)不能返回正确日期? — Win...
来源:百度文库 编辑:神马文学网 时间:2024/04/30 23:42:29
CMonthCalCtl::GetCurSel(CTime)不能返回正确日期?
SYMPTOMSWhen you use the CMonthCalCtrl::GetCurSel(CTime) to get the date selected from the Month Calendar Common control, the date in the CTime class is incorrect. CAUSEMFC's implementation of CMonthCalCtrl::GetCurSel() for the CTime class calls SendMessage(MCM_GETCURSEL, &sysTime) where sysTime is a SYSTEMTIME structure. The MCM_GETCURSEL message does not fill in the hours, minutes, and seconds part of the sysTime Structure with valid values. However, the constructor for CTime class takes these values into consideration, so the date in CTime class is incorrect. RESOLUTIONThe workaround is to use the CMonthCalCtrl::GetCurSel(SYSTEMTIME*) version of GetCurSel for this class to get the correct date. The code will look like the following example: SYSTEMTIME sysTime; m_MonthCal.GetCurSel(&sysTime); sysTime.wHour = sysTime.wMinute = sysTime.wSecond = sysTime.wMilliseconds = 0; CTime l_time(sysTime);
CMonthCalCtl::GetCurSel(CTime)不能返回正确日期? — Win...
FANUC增量方式不能返回参考点原因与对策
正确设置Win XP家庭或小型办公网络
正确设置Win XP家庭或小型办公网络
Oracle中正确利用Rownum来限制查询所返回的行数
[精华] [转贴]如何正确利用Rownum来限制查询所返回的行数?
CTime::Format - 狼窝 - 51CTO技术博客
dns设置正确但不能上网
返回古典
返回古典
返回古典
返回地球
AS入门第八课:日期与时间—Flash教程
CSDN技术中心 正确解决Visual Studio不能安装
WORD中文档结构图不能正确显示项目编号的解决办法
流鼻血不能仰头 正确应对7大家庭“意外”(组图)
流鼻血不能仰头 正确应对7大家庭“意外”
点击返回并刷新返回页面
返回古典就是返回我的六经
win+r
Win键
Win + DOS
win 7
win+u和win+x