对话框调用问题,急! 一定给分!
我定义了两个对话框,一是主对话框(自己生成的,为TestDialog),另一个是InsertDialog
我在TestDialogDlg.h中做如下定义:
#include "insertDialog.h"
class CTestDialogDlg : public CDialog
{
....
public:
CInsertDialog insertDlg;
}
然后在TestDialogDlg.cpp中的按钮响应函数中添加:
insertDlg->Create(IDD_DIALOG_INSERT);
insertDlg->ShowWindow(SW_SHOW);
但是运行的时候就弹出错误,如果把 InsertDialog insertDlg; 到类外面去定义(还在TestDialogDlg.h中)好了