在单击按钮来调用菜单时需要帮助 [英] Need help in invoking a menu from a button click

查看:59
本文介绍了在单击按钮来调用菜单时需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在MFC中创建了一个对话框appln.对话框中有一个确定"按钮.单击确定"按钮后,我需要调用菜单,但对话框应该消失.请帮助我,我是初学者.

Hi,

I created a Dialog box appln in MFC. There''s a OK button in the dialog box.I need to invoke a Menu when OK button is clicked but the dialog box should disappear.pls help me, im a beginner.

推荐答案

我不太熟悉Microsoft Foundation Class,但是我想下面的示例应该阐明一些解决方案准则.
让我们假设当单击一个按钮时,一个名为(dialog_d)的对话框将消失,并且将显示一个名为(menu_m)的菜单.

代码:
受保护的无效按钮OK_Click(对象发送者,Eventargs e)
{
dialog_d.visible = false;
menu_m.visible = true
}

注意:在设计表单时,菜单必须将其visible属性设置为false.
I am not that conversant with Microsoft Foundation Class but I guess the following Example should illuminate some kinda solution guideline.
Let us assume that when a button is clicked a dialogue box called (dialog_d) will disappear and a menu called (menu_m) will show.

CODE:
Protected void buttonOK_Click(object sender, Eventargs e)
{
dialog_d.visible = false;
menu_m.visible = true
}

NOTE: The menu must have it visible property set to false when designing the form.


这篇关于在单击按钮来调用菜单时需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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