如何捕获按钮控件以显示对话框 [英] How to capture button control to display dialogue box

查看:100
本文介绍了如何捕获按钮控件以显示对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我的应用程序中,当我单击关注按钮时,我想显示对话框.

对于前我的应用程序中有2个对话框,名为abc&. xyz
abc对话框包含两个按钮,分别单击下一步",确定".
每当我单击下一步按钮时,必须显示xyz对话框.

我将代码写为
xyz a;
a.DoModal();

但是我没把他放出去

任何人都可以帮助我实现这一目标.

非常感谢.

Hi,

In my application i want to display the dialogue box when ever i clicked on concern button.

For Ex. I have 2 dialogue boxes in my application named abc & xyz
abc dialogue box contains two buttons called next,ok.
whenever i click on next button xyz dialogue box has to be displayed.

i have written the code as
xyz a;
a.DoModal();

But i didn''t get the out put

Can any one help me to achieve this.

Thanks you a lot.

推荐答案

我认为这是链接 [ ^ ]将为您提供帮助.
I think this link[^] will help you.


您应该
  • 在abc中使用EndDialog(ID_BUTTON_NEXT);
  • 检查abc.DoModal()返回值是否为ID_BUTTON_NEXT并按协议调用xyz.DoModal()
You should
  • use EndDialog(ID_BUTTON_NEXT); in abc
  • check abc.DoModal() return value for ID_BUTTON_NEXT and call accordigly xyz.DoModal()



我按照您建议的方式完成了该应用程序,但它以相反的方式工作.
首先出现xyz,然后单击xyz中的按钮,仅出现abc对话框.
您建议我检查abc.domodal的返回值,它的返回值是return CDialog :: DoModal();

我需要更改返回值吗?
Hi,
I did the application in the way what you suggested me but it works in reverse way .
first xyz appears and then by clicking the button in xyz only abc dialog box appeared.
you suggested me that check the return value of abc.domodal it''s return value is return CDialog::DoModal();

Does i need to do changes in the return value?


这篇关于如何捕获按钮控件以显示对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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