如何在dll服务中创建无模式dilaog? [英] How to create modeless dilaog in dll service ?
问题描述
我在Windows Mobile 6上创建了一个包含其他dll文件的dll服务。在那个dll文件中,如果某些事件发生的话,我想创建一个弹出模式的无模式对话框:
确保我们使用自己的资源
确认AFX_MANAGE_STATE(AfxGetStaticModuleState());
MyDialog mydlg = new MyDialog(myDll);
mydlg-> Create(MyDialog:IDD);
mydlg-> ShowWindow(SW_SHOW);
但是它只显示mydlg的标题?!
当用domodal()创建模态对话框时,它可以正常工作,但我还有其他问题需要创建菜单栏...
谢谢。
Hi,
I have created a dll service on Windows Mobile 6 including other dll file. In that dll file i want to make a popup modeless dialog if somes event occurs like that:
////ensure we are using our own resources
AFX_MANAGE_STATE(AfxGetStaticModuleState());
MyDialog mydlg = new MyDialog(myDll);
mydlg->Create(MyDialog:IDD);
mydlg->ShowWindow(SW_SHOW);
But it shows only the title of mydlg ?!
When create the modal dialog with domodal() it works but i have other problem to create menubar ...
thanks.
推荐答案
覆盖OInitDialog方法,并将CDialog :: OnInitDialog作为第一个语句调用。
希望这适用于你br />
西瓦。
Override OInitDialog method and
call CDialog::OnInitDialog as first statement.
Hope this works for you
Siva.
这篇关于如何在dll服务中创建无模式dilaog?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!