BOOL CURLGatherApp::InitInstance()
{
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need. //CURLGatherDlg dlg;
CDlgConnToDB dlg;
CURLGatherDlg dlgMain;
dlg.m_pDlgMain = &dlgMain;
//m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
m_pMainWnd = &dlgMain;
int nMainResponse = dlgMain.DoModal();
if (nMainResponse == IDOK)
{
}
else
{
} // TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
m_pMainWnd = &dlgMain; } // Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}在CDlgConnToDB窗体上点取消后报错,不知道如何处理?
{
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need. //CURLGatherDlg dlg;
CDlgConnToDB dlg;
CURLGatherDlg dlgMain;
dlg.m_pDlgMain = &dlgMain;
//m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
m_pMainWnd = &dlgMain;
int nMainResponse = dlgMain.DoModal();
if (nMainResponse == IDOK)
{
}
else
{
} // TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
m_pMainWnd = &dlgMain; } // Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}在CDlgConnToDB窗体上点取消后报错,不知道如何处理?
解决方案 »
- 用ReadDirectorychanges监控文件夹下doc文件速度不匹配
- P2PServer* pThisP2PServer = (P2PServer*)lpParam;( *)什么意思?
- vc6.0+ado+mssql 存储数据出错
- CPropertyPage 的奇怪问题,请熟悉的帮忙
- 在163发表的一篇新闻后面发泄了对广州治安的不满,居然被封了通行证。现在的制度还那么“孔乙己”,三分抗议!
- 大家来分享一下看MSDN的经验好吗?
- VC中如何设置背景颜色?
- 电脑方面为什么没有诺贝尔奖获得者
- 谁会算空间三角形面积?
- 为什么我在对话框中放置了一个Rich Edit后,编译后对话框就不能显示了?
- 头晕眼花......基于对话框的程序中如何获得文件的指针?
- 请问如何将一个回车符赋值给一个字符串
????else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
m_pMainWnd = &dlgMain; //??????????????
}
这句话是没有的
CDlgConnToDB另外的窗体
????????啥子东西哦
我认为将m_pMainWnd = &dlgMain,mask 后就OK了 !
有道理,放到哪里比较合适?
如果加上这句dlgMain这个窗体就显示出来了