按照书上的说明加了代码和Dialog对话框,按钮,编辑框。。现在就是运行后点Pen菜单下的Pen Widths没有对话框弹出。
触发该菜单弹出框的函数为:
在上面函数int iDlg = dlg.DoModal();处设置断点调试,F10运行过该断点后无对话框弹出,请教下这会是啥原因引起的。。
触发该菜单弹出框的函数为:
void CScribbleDoc::OnPenWidths()
{
// TODO: Add your command handler code here
CPenWidthsDlg dlg;
// Initialize dialog data
dlg.m_nThinWidth = m_nThinWidth;
dlg.m_nThickWidth = m_nThickWidth;
// Invoke the dialog box
int iDlg = dlg.DoModal();
if ( iDlg == IDOK)
{
// retrieve the dialog data
m_nThinWidth = dlg.m_nThinWidth;
m_nThickWidth = dlg.m_nThickWidth;
// Update the pen that is used by views when drawing new strokes,
// to reflect the new pen width definitions for "thick" and "thin".
ReplacePen();
}
}
在上面函数int iDlg = dlg.DoModal();处设置断点调试,F10运行过该断点后无对话框弹出,请教下这会是啥原因引起的。。