新建类步骤:请自行百度,以下仅为窗口调用
主窗口类:usb_testDlg,子窗口类:MyNewDlg
1、MyNewDlg.cpp定义:CMyNewDlg *p_MyNewDlg = NULL;
2、usb_testDlg.h声明:
class Cusb_testDlg : public CDialog
{
public:
void New_Init(void);
}
3、usb_testDlg.cpp定义:
extern CMyNewDlg *p_MyNewDlg;
Cusb_testDlg::~Cusb_testDlg(void)
{
delete p_MyNewDlg; //释放指针
}
void Cusb_testDlg::New_Init(void)
{
p_MyNewDlg = new CMyNewDlg();
}
void Cusb_testDlg::OnBnClickedButtonConfigruation()
{
// TODO: 在此添加控件通知处理程序代码
New_Init();
p_MyNewDlg->DoModal(); //生成配置窗口
}
新手,描述有错或是不到位的地方,请大神指出