标题:[求助]关于《Visual C++6.0从入门到精通》里的一个问题
只看楼主
hooligan637
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2005-1-25
 问题点数:0 回复次数:3 
[求助]关于《Visual C++6.0从入门到精通》里的一个问题

出自《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); }

搜索更多相关主题的帖子: Visual 入门 
2005-01-26 00:09
FreeSky
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2005-1-12
得分:0 
MB_INFORMATION   应该是   MB_ICONINFORMATION
2005-01-26 16:01
hooligan637
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2005-1-25
得分:0 
谢谢,楼上的回答使上面代码通过编译
2005-01-27 12:42
acetuo
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-9-12
得分:0 
但后面双击日期,又不对呀,总说:Dilog mfc application错误!!!
这是为啥呀
2009-10-28 12:40



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-11721-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.120837 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved