出自《Visual C++6.0从入门到精通》里的一个问题 下面这段代码在编译时出现 1 error(s), 0 warning(s) error : 'MB_INFORMATION' : undeclared identifier 望好心人帮个忙,为什么会出现这样 AfxMessageBox("You double-clicked on:" + cSelectedDate , MB_OK | MB_INFORMATION, 0); 中的MB_OK | MB_INFORMATION 是什么意思?为什么没有定义?(我刚学不久) void CDialogDlg::OnDblClickCalendar1() { // TOD Add your control notification handler code here CString cSelectedDate; // Date selected by user. char * cDay = " "; // Selected day. char * cYear = " "; // Selected year.
// Get day from calendar control. itoa (m_Calendar1.GetDay(), cDay,10); cSelectedDate = cDay;
// Get month from calendar control. 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 + " October "; break; case 11: cSelectedDate = cSelectedDate + " November "; break; case 12: cSelectedDate = cSelectedDate + " December "; break; }
// Get the year. itoa(m_Calendar1.GetYear(), cYear,10); cSelectedDate = cSelectedDate + cYear;
//Display the date. AfxMessageBox("You double-clicked on:" + cSelectedDate , MB_OK | MB_INFORMATION, 0); }