我在一个dialog类下建立OnInitDialog()函数
然后重载CDialog::OnInitDialog();
可是当我的OnInitDialog()返回FALSE时,这个窗口也会出现,程序没有终止~问什么??
然后重载CDialog::OnInitDialog();
可是当我的OnInitDialog()返回FALSE时,这个窗口也会出现,程序没有终止~问什么??
解决方案 »
- 急~~~~C++ 对远程登录的账号,设置不活动断连时间为15分钟
- 如何发送消息?
- VS2005 新建项目里面怎么什么都没有了。
- 创天中文C++装了VS6SP6后成英文了,怎么办?
- 现在市面上有哪些64位的os? 可以买到么
- WNetEnumResource列举出错的问题,我快疯了!!!!
- 200分求助,以MainFrame做父窗口的Dailaog,收不到鼠标消息?在线等待!
- 如何在对话框上放置一个“分割视图”
- 哪位给讲讲onDraw()、 onPaint()、onCtlColor()的关系?
- 怎样让一个项目,编译成32位和编译成64位时用的函数不同?
- 如何得到查询执行的进度 access
- 怎样读取网页内容传到VC做的数据库管理软件里???
Return Value
Specifies whether the application has set the input focus to one of the controls in the dialog box. If OnInitDialog returns nonzero, Windows sets the input focus to the first control in the dialog box. The application returns zero only if it has explicitly set the input focus to a control in the dialog box.
CDialog::OnOK();
BOOL CMyDialog::OnInitDialog( );
{
CDialog::OnInitDialog();
........ if(flag)
{
使对话框出现;
}
else
{
不让对话框出现直接退出此程序;
}
}
{
CDialog::OnInitDialog();
........ if(flag)
{
使对话框出现;
}
else
{
OnOK();
}
}
直接return
因为,onInitDialog时,CreateWindowEx已经调用了,窗口已经存在了。所以.........
初始化的时候最多能让窗口不显示