如何在'cchildframe'上创建菜单? [英] How to create the menu on 'cchildframe' ?

查看:109
本文介绍了如何在'cchildframe'上创建菜单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。



我想在'CChildFrame'上创建菜单。 (在MDI中)



但我真的不知道..



请告诉我..谢谢。 :)



我尝试了什么:



我用过这段代码。

但它不起作用。



CMenu * pMenu;

pMenu = LoadMenu(IDR_MYMENU) ;



SetMenu(pMenu);

Hi all.

I want to create the menu on 'CChildFrame'. (in MDI)

But really I don't know..

Please advise me.. Thank you. :)

What I have tried:

I used this code.
But it doesn't work.

CMenu *pMenu;
pMenu = LoadMenu(IDR_MYMENU);

SetMenu(pMenu);

推荐答案

在MDI中使用子菜单菜单的传统方式应用程序是修改父框架或主框架窗口的菜单。



一种策略是在创建子项时创建包含所需项目的菜单(比如孩子的一个成员)当它得到焦点时,你将它附加到主窗口的菜单。
The traditional way of having child specific menus in an MDI application is to modify the parent or main frame window's menu.

One strategy is to create the menu with the items you want on it when you create the child (say as a member of the child) and when it gets focus you append it to the main window's menu.


这篇关于如何在'cchildframe'上创建菜单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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