1,非模态对话框的创建
void CModelessDlg::OnButton1()
{
// TODO: Add your control notification handler code here
// 防止模态对话框重复创建
CWnd* pWnd = FindWindow(0, "非模态对话框的名称");
if(NULL == pWnd)
{
CDlgModeless* dlg = new CDlgModeless();
dlg->Create(IDD_MODELESS, this);
dlg->ShowWindow(SW_SHOW);
}
else