首页上一页 1 下一页尾页 2 条记录 1/1页
VC++从入门到精通第8章范例8.1运行没有错误,结果出错
发表在VC++答疑区
2015-05-05
是否精华
是
否
版块置顶:
是
否
按照书本上操作,运行没问题,出来结果是出错
Debug Assertion Failed
Program:D:、、
File:afxwin.inl
Line:1023
For information on how your progran can cause an assertion failure,see the Visual C++ documentation
on asserts
Press Retry to debug the application
我看到光盘范例8.1程序里面最后还有这几条
BOOL CCreateMenuDlg::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
// TODO: Add your specialized code here and/or call the base class
WPARAM MenuID = GetCurrentMessage()->wParam;
if(MenuID >= 1001)
{
if(MenuID == nID && nCode == CN_COMMAND)
{
CString Name;
GetMenu()->GetMenuString(MenuID,Name,MF_STRING);
MessageBox(Name);
}
}
return CDialog::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
但是书本上面没有这段代码
Debug Assertion Failed
Program:D:、、
File:afxwin.inl
Line:1023
For information on how your progran can cause an assertion failure,see the Visual C++ documentation
on asserts
Press Retry to debug the application
我看到光盘范例8.1程序里面最后还有这几条
BOOL CCreateMenuDlg::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
// TODO: Add your specialized code here and/or call the base class
WPARAM MenuID = GetCurrentMessage()->wParam;
if(MenuID >= 1001)
{
if(MenuID == nID && nCode == CN_COMMAND)
{
CString Name;
GetMenu()->GetMenuString(MenuID,Name,MF_STRING);
MessageBox(Name);
}
}
return CDialog::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
但是书本上面没有这段代码