我用单文档截面, 加了一个登录窗口,可总和主界面一起出现,我刚接触VC,请问如何解决,多谢指点.
登录窗口instance中 CLoginDlg dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow(); return TRUE;
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
return false;
}
登录窗口instance中 CLoginDlg dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow(); return TRUE;
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
return false;
}
解决方案 »
- 关于贴图的效率问题
- 请教大家一个关于CFile类的问题??????????????
- 新鲜出炉!!! 2004上海程序员生存现状调查!!! 答者有分!!! (续帖9)
- 两台电脑共享IP上网,需要集线器吗
- MFC 中RadioButton 的使用问题
- 上手指路,高分相送
- 请问com中如何得到com的dll文件存放的目录呢?
- 怎样将十六进制的字符串转成整形?
- 关于RecordSet的m_strFilter 的问题!100(3次)
- 菜鸟问题:我在编辑resource文件时,不小心改成了文本编辑状态,请问各位老大,如何重新回到图形编辑状态??
- 怎样下载这个地址: "rtsp://61.180.216.25/mov/lxj/此处为汉字/GTO01.RM"
- “贺岁华东行”--与技术总监和Borland产品专家面对面2004元旦期间课程简介
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
}把这行代码放到你的APP类的InitInstance里面
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{}
else //密码错误的话,退出系统
{
AfxGetMainWnd()->sendmessage(WM_CLOSE,0m,0); //这样就可以了
}
.