#include <afxwin.h>
#include <afxdlgs.h>
#include "resource1.h"
class CWindowApp : public CWinApp
{
public:
BOOL InitInstance();
};
class CWindowDlg : public CDialog
{
public:
enum { IDD = IDD_DIALOG1 };
CWindowDlg();
~CWindowDlg();
DECLARE_MESSAGE_MAP()
afx_msg void OnBnClickedButton1();
};
CWindowDlg::CWindowDlg() : CDialog(CWindowDlg::IDD)
{
}
CWindowDlg::~CWindowDlg()
{
}
class CWindowDlg2 : public CDialog
{
public:
enum { IDD = IDD_DIALOG2 };
CWindowDlg2();
~CWindowDlg2();
DECLARE_MESSAGE_MAP()
afx_msg void OnBnClickedButton2();
};
CWindowDlg2::CWindowDlg2() : CDialog(CWindowDlg2::IDD)
{
}
CWindowDlg2::~CWindowDlg2()
{
}
class CWindowDlg3 : public CDialog
{
public:
enum { IDD = IDD_DIALOG3 };
CWindowDlg3();
~CWindowDlg3();
};
CWindowDlg3::CWindowDlg3() : CDialog(CWindowDlg3::IDD)
{
}
CWindowDlg3::~CWindowDlg3()
{
}
BOOL CWindowApp::InitInstance()
{
CWindowDlg Dlg;
m_pMainWnd = &Dlg;
Dlg.DoModal();
return TRUE;
}
CWindowApp theApp;
BEGIN_MESSAGE_MAP(CWindowDlg, CDialog)
ON_BN_CLICKED(IDC_BUTTON1, &CWindowDlg::OnBnClickedButton1)
END_MESSAGE_MAP()
void CWindowDlg::OnBnClickedButton1()
{
// TODO: Add your control notification handler code here
CDialog dlg(IDD_DIALOG2);
dlg.DoModal();
}
BEGIN_MESSAGE_MAP(CWindowDlg2, CDialog)
ON_BN_CLICKED(IDC_BUTTON2, &CWindowDlg2::OnBnClickedButton2)
END_MESSAGE_MAP()
void CWindowDlg2::OnBnClickedButton2()
{
// TODO: Add your control notification handler code here
CDialog dlg2(IDD_DIALOG3);
dlg2.DoModal();
}