CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
山寨机中的战斗机! 程序优化工程师到底对IT界有没有贡献
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VC/MFC >  界面

菜单恢复(我灰化了菜单后怎么恢复呀?)

楼主rockjz_zhang(阿中)2005-05-16 17:37:52 在 VC/MFC / 界面 提问

CMenu   *   pMenu=this->GetMenu();    
  pMenu->EnableMenuItem(IDC_KH,MF_BYCOMMAND|   MF_DISABLED   |   MF_GRAYED);  
  我将菜单灰化后怎么恢复呀?谢谢高手! 问题点数:40、回复次数:4Top

1 楼xiao_xiao_zi(笑小子)回复于 2005-05-16 17:48:11 得分 10

pMenu->EnableMenuItem(IDC_KH,MF_BYCOMMAND|   MF_ENABLED);Top

2 楼cnwolf(独狼)回复于 2005-05-16 17:57:04 得分 15

查看msdn  
   
  CMenu::EnableMenuItem    
  UINT   EnableMenuItem(   UINT   nIDEnableItem,   UINT   nEnable   );  
   
  Return   Value  
   
  Previous   state   (MF_DISABLED,   MF_ENABLED,   or   MF_GRAYED)   or   –1   if   not   valid.  
   
  Parameters  
   
  nIDEnableItem  
   
  Specifies   the   menu   item   to   be   enabled,   as   determined   by   nEnable.   This   parameter   can   specify   pop-up   menu   items   as   well   as   standard   menu   items.  
   
  nEnable  
   
  Specifies   the   action   to   take.   It   can   be   a   combination   of   MF_DISABLED,   MF_ENABLED,   or   MF_GRAYED,   with   MF_BYCOMMAND   or   MF_BYPOSITION.   These   values   can   be   combined   by   using   the   bitwise   OR   operator.   These   values   have   the   following   meanings:    
   
  MF_BYCOMMAND       Specifies   that   the   parameter   gives   the   command   ID   of   the   existing   menu   item.   This   is   the   default.  
   
   
  MF_BYPOSITION       Specifies   that   the   parameter   gives   the   position   of   the   existing   menu   item.   The   first   item   is   at   position   0.  
   
   
  MF_DISABLED       Disables   the   menu   item   so   that   it   cannot   be   selected   but   does   not   dim   it.  
   
   
  MF_ENABLED       Enables   the   menu   item   so   that   it   can   be   selected   and   restores   it   from   its   dimmed   state.  
   
   
  MF_GRAYED       Disables   the   menu   item   so   that   it   cannot   be   selected   and   dims   it.    
  Top

3 楼oyljerry(【勇敢的心】→ ㊣提拉米苏√㊣)回复于 2005-05-16 21:27:52 得分 5

EnableMenuItem的参数改一下就可以了Top

4 楼liu_aq(qq)回复于 2005-05-16 21:46:17 得分 10

pMenu->EnableMenuItem(IDC_KH,MF_BYCOMMAND|   MF_ENABLED);Top

相关问题

  • 菜单不能灰化!
  • 怎么恢复菜单条?
  • 如何使主菜单灰化?
  • 请问如何恢复系统菜单?
  • 怎样恢复word菜单功能?
  • 如何恢复ACCESS的菜单
  • 如何恢复启动菜单???
  • 请问如何使对话框程序中的主菜单某项变灰或恢复?
  • 我的程序菜单里的启动菜单被删了,怎样恢复它?
  • win2000任务管理器没有菜单,如何恢复?

关键词

  • mf
  • 菜单
  • 恢复
  • bycommand
  • enablemenuitem
  • grayed
  • pmenu
  • disables
  • menu item
  • enabled

得分解答快速导航

  • 帖主:rockjz_zhang
  • xiao_xiao_zi
  • cnwolf
  • oyljerry
  • liu_aq

相关链接

  • Visual C++类图书
  • Visual C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo