对话框中获取Month Calendar的当前日期

//添加MSN_SELECT消息

void CAddOut::OnSelectMonthcalendar(NMHDR* pNMHDR, LRESULT* pResult)

{
   // TODO: Add your control notification handler code here
   CWnd* mc = GetDlgItem(IDC_MONTHCALENDAR);
   LPSYSTEMTIME st = new SYSTEMTIME;
   MonthCal_GetCurSel(mc->m_hWnd, st);
   char a[256] = "111";
   sprintf(a, "%d", st->wDay);
   AfxMessageBox(a);
   *pResult = 0;
}

你可能感兴趣的:(calendar)