资 源 简 介
点击按钮,弹出另一个对话框的Demo
第一步:添加(Insert Dialog)要弹出的Dialog,根据自己需要可以设计界面,因为我是一个简单Demo,所以很简单!
第二步:为添加的Dialog添加建立成一个继承DLG的类,class CDialog1 : public CDialog
第三步:在主对话框中为按钮添加函数。如下:
void CClickDialogDlg::OnButton1()
{
// TODO: Add your control notification handler code here
CDialog1 dlg
dlg.DoModal()
}
不要忘记#include "Dialog1.h"-Click of a button, another dialog box pop Demo of the first step: add (Insert Dialog) to the pop-up Dialog, according to their own needs can be designed interface, because I am a simple Demo, so very simple! Step two: add Dialog to add the establishment of a succession of DLG class, class CDialog1: public CDialog third step: in the main dialog box for the button to add the function. As follows: void CClickDialogDlg:: OnButton1 () (//TODO: Add your control notification handler code here CDialog1 dlg dlg.DoModal ()) do not forget# Include