无法更改菜单项的文本 [英] Unable to change text of menu item

查看:67
本文介绍了无法更改菜单项的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试了所有这些,但我看不到菜单项的文字发生变化!

I have tried everything to do this, but I can't see the text of menu item changing at all!!!

我尝试过ModifyMenu,ChangeMenu,GetMenuItemInfo, SetMenuItemInfo甚至是DrawMenuBar,但没什么用呢!

I tried ModifyMenu, ChangeMenu, GetMenuItemInfo, SetMenuItemInfo and even DrawMenuBar, but nothing works!

我不明白为什么我不能这么简单的任务!?我哪里错了?请给我一个简单的工作代码来更改菜单项的文本。

I don't understand why I can't to do so simple task!? Where do I wrong? Please give me a simple work code that changes a text of a menu item.

推荐答案

您好ExpertProgrammer,

Hi ExpertProgrammer,

>>我尝试过ModifyMenu,ChangeMenu,GetMenuItemInfo,SetMenuItemInfo甚至DrawMenuBar,但没有任何作用!

>>I tried ModifyMenu, ChangeMenu, GetMenuItemInfo, SetMenuItemInfo and even DrawMenuBar, but nothing works!

你是如何编写代码的?你能解释一下你的情景吗?如果不了解更多细节信息,我们很难帮助你。例如,你的代码是什么,你当前的测试环境是什么,代码在其他环境下工作正常,
等。

How did you write your code? Could you explain more on your scenario, we can hardly help you without knowing more detail information. For instance what is your code, what is your current test environment, is the code works fine on the other environment and etc..

基本上我有一些我自己的代码片段并且工作正常,没有别的,只是简单地修改菜单代码,它工作正常。

Basically I have some my own code snippet and works fine, nothing else, really simply modify menu code and it works fine.

menu.LoadMenu(IDR_MENU_BLANK);

menu.GetSubMenu(0) - > ModifyMenu(0,MF_BYPOSITION | MF_STRING,ID_VIEW,LoadStringEx(ID_VIEW));

menu.GetSubMenu(0)->ModifyMenu(0, MF_BYPOSITION | MF_STRING, ID_VIEW, LoadStringEx(ID_VIEW));

- 詹姆斯


这篇关于无法更改菜单项的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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