vc ++中的多个无模式对话框 [英] multiple modeless dialogs in vc++

查看:112
本文介绍了vc ++中的多个无模式对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我尝试按照
步骤创建两个无模式对话框 WWW.functionx.com/visualc/controls/dialogbox.htm

当我运行时,只会打开一个无模式对话框.
如何也打开其他对话框.
请详细说明该过程.
请帮忙.

预先感谢,
vandana

hello,

I have tried creating two modeless dialogs following procedure of
WWW.functionx.com/visualc/controls/dialogbox.htm

When I run only one modeless dialog is opened.
How do I open other dialog also.
please do elaborate the procedure.
Please do help.

Thanks in advance,
vandana

推荐答案

这是因为它使用了模态"对话框:在对话框被用户关闭之前,什么也不会发生.
而是使用 CDialog :: Create [
That is because it uses a Modal dialog: nothing else happens until the dialog is dismissed by the user.

Instead, use CDialog::Create[^] then ShowWindow - the link has an example.



我认为您指的是包含对话框合并对话框"和该部分的示例

Hi,
I think you are refering to the example containing the dialog "Combining Dialog Boxes" and the section

void CDialog2aDlg::OnLButtonDblClk(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	CSecondDlg Dlg;
	Dlg.DoModal();

	CDialog::OnLButtonDblClk(nFlags, point);
}



如果是这样,那么以下可能是解决方案,
在消息映射中包含ON_WM_LBUTTONDBLCLK(),就像这样



If it is, then the following may be the solution,
Include ON_WM_LBUTTONDBLCLK() in Message map, like this

BEGIN_MESSAGE_MAP(CDialog2aDlg, CDialog)
    //other messagemaps

    //L button Double click message map
    ON_WM_LBUTTONDBLCLK()
END_MESSAGE_MAP()


这篇关于vc ++中的多个无模式对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆