CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VC/MFC >  界面

怎么在菜单栏的空白地方加入一个logo位图?

楼主siren_()2006-06-03 16:54:16 在 VC/MFC / 界面 提问

怎么在菜单栏的空白地方加入一个logo位图? 问题点数:40、回复次数:3Top

1 楼Snow_Ice11111(雪上加冰)回复于 2006-06-04 13:00:32 得分 0

http://www.codeproject.com/menu/menuicon.aspTop

2 楼lixiaosan(小三)回复于 2006-06-04 13:58:29 得分 0

SetMenuItemBitmapsTop

3 楼Gelim(Gelim)回复于 2006-06-15 22:25:51 得分 0

SetMenuItemBitmaps   Function  
   
  --------------------------------------------------------------------------------  
   
  The   SetMenuItemBitmaps   function   associates   the   specified   bitmap   with   a   menu   item.   Whether   the   menu   item   is   selected   or   clear,   the   system   displays   the   appropriate   bitmap   next   to   the   menu   item.    
   
  Syntax  
   
  BOOL   SetMenuItemBitmaps(                     HMENU   hMenu,  
          UINT   uPosition,  
          UINT   uFlags,  
          HBITMAP   hBitmapUnchecked,  
          HBITMAP   hBitmapChecked  
  );  
  Parameters  
   
  hMenu  
  [in]   Handle   to   the   menu   containing   the   item   to   receive   new   check-mark   bitmaps.    
  uPosition  
  [in]   Specifies   the   menu   item   to   be   changed,   as   determined   by   the   uFlags   parameter.    
  uFlags  
  [in]   Specifies   how   the   uPosition   parameter   is   interpreted.   The   uFlags   parameter   must   be   one   of   the   following   values.    
  MF_BYCOMMAND  
  Indicates   that   uPosition   gives   the   identifier   of   the   menu   item.   If   neither   MF_BYCOMMAND   nor   MF_BYPOSITION   is   specified,   MF_BYCOMMAND   is   the   default   flag.  
  MF_BYPOSITION  
  Indicates   that   uPosition   gives   the   zero-based   relative   position   of   the   menu   item.  
  hBitmapUnchecked  
  [in]   Handle   to   the   bitmap   displayed   when   the   menu   item   is   not   selected.    
  hBitmapChecked  
  [in]   Handle   to   the   bitmap   displayed   when   the   menu   item   is   selected.    
  Return   Value  
   
  If   the   function   succeeds,   the   return   value   is   nonzero.  
   
  If   the   function   fails,   the   return   value   is   zero.   To   get   extended   error   information,   call   GetLastError.    
   
   
   
   
  Remarks  
   
  If   either   the   hBitmapUnchecked   or   hBitmapChecked   parameter   is   NULL,   the   system   displays   nothing   next   to   the   menu   item   for   the   corresponding   check   state.   If   both   parameters   are   NULL,   the   system   displays   the   default   check-mark   bitmap   when   the   item   is   selected,   and   removes   the   bitmap   when   the   item   is   not   selected.    
   
  When   the   menu   is   destroyed,   these   bitmaps   are   not   destroyed;   it   is   up   to   the   application   to   destroy   them.    
   
  The   selected   and   clear   bitmaps   should   be   monochrome.   The   system   uses   the   Boolean   AND   operator   to   combine   bitmaps   with   the   menu   so   that   the   white   part   becomes   transparent   and   the   black   part   becomes   the   menu-item   color.   If   you   use   color   bitmaps,   the   results   may   be   undesirable.  
   
  Use   the   GetSystemMetrics   function   with   the   CXMENUCHECK   and   CYMENUCHECK   values   to   retrieve   the   bitmap   dimensions.  
   
  Example  
   
   
  For   an   example,   see   Simulating   Check   Boxes   in   a   Menu.  
   
   
  Function   Information  
   
  Minimum   DLL   Version   user32.dll    
  Header   Declared   in   Winuser.h,   include   Windows.h    
  Import   library   User32.lib    
  Minimum   operating   systems   Windows   95,   Windows   NT   3.1    
  Unicode   Implemented   as   Unicode   version.    
   
  See   Also  
   
  Menus  
   
  --------------------------------------------------------------------------------  
   
  ©   2005   Microsoft   Corporation.   All   rights   reserved.Top

相关问题

关键词

得分解答快速导航

  • 帖主:siren_

相关链接

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

广告也精彩

反馈

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