主题:一个简单的问题
void CDialogDlg::OnDblClickCalendar1()
{
// TODO: Add your control notification handler code here
CString cSelectedDate="";
char* cDay="";
//char* cYear="book";
itoa(m_Calendar1.GetDay(),cDay,10);
cSelectedDate=cSelectedDate+cDay;
//itoa(m_Calender.GetDay(),cDay,10);
switch(m_Calendar1.GetMonth())
{
case 1:
cSelectedDate=cSelectedDate+"January";
break;
case 2:
cSelectedDate=cSelectedDate+"February";
break;
case 3:
cSelectedDate=cSelectedDate+"March";
break;
case 4:
cSelectedDate=cSelectedDate+"April";
break;
case 5:
cSelectedDate=cSelectedDate+"May";
break;
case 6:
cSelectedDate=cSelectedDate+"June";
break;
case 7:
cSelectedDate=cSelectedDate+"July";
break;
case 8:
cSelectedDate=cSelectedDate+"August";
break;
case 9:
cSelectedDate=cSelectedDate+"September";
break;
case 10:
cSelectedDate=cSelectedDate+"Octomber";
break;
case 11:
cSelectedDate=cSelectedDate+"November";
break;
case 12:
cSelectedDate=cSelectedDate+"December";
break;
}
//itoa(m_Calendar1.GetYear(),cYear,10);
//cSelectedDate+=cYear;
//MessageBox("You");*/
MessageBox(cSelectedDate);
}
[[size=6]color=FF0000]以上的这个函数会导致如下问题:见附件jpg[/color][/size]
double click mouse on calendar时。
{
// TODO: Add your control notification handler code here
CString cSelectedDate="";
char* cDay="";
//char* cYear="book";
itoa(m_Calendar1.GetDay(),cDay,10);
cSelectedDate=cSelectedDate+cDay;
//itoa(m_Calender.GetDay(),cDay,10);
switch(m_Calendar1.GetMonth())
{
case 1:
cSelectedDate=cSelectedDate+"January";
break;
case 2:
cSelectedDate=cSelectedDate+"February";
break;
case 3:
cSelectedDate=cSelectedDate+"March";
break;
case 4:
cSelectedDate=cSelectedDate+"April";
break;
case 5:
cSelectedDate=cSelectedDate+"May";
break;
case 6:
cSelectedDate=cSelectedDate+"June";
break;
case 7:
cSelectedDate=cSelectedDate+"July";
break;
case 8:
cSelectedDate=cSelectedDate+"August";
break;
case 9:
cSelectedDate=cSelectedDate+"September";
break;
case 10:
cSelectedDate=cSelectedDate+"Octomber";
break;
case 11:
cSelectedDate=cSelectedDate+"November";
break;
case 12:
cSelectedDate=cSelectedDate+"December";
break;
}
//itoa(m_Calendar1.GetYear(),cYear,10);
//cSelectedDate+=cYear;
//MessageBox("You");*/
MessageBox(cSelectedDate);
}
[[size=6]color=FF0000]以上的这个函数会导致如下问题:见附件jpg[/color][/size]
double click mouse on calendar时。