首页 > 其他 > 详细

mfc menu用法一

时间:2014-05-19 09:54:44      阅读:525      评论:0      收藏:0      [点我收藏+]

#define IDM_NEW 0x1002
#define IDM_EXIT 0x1003
#define IDM_HELP 0x1004
#define IDM_ABOUT 0x1005

hMenu = CreateMenu();
hFileMenu = CreateMenu();
hHelpMenu = CreateMenu();

AppendMenu(hFileMenu, MF_STRING, IDM_NEW, TEXT("新建"));
AppendMenu(hFileMenu, MF_STRING, IDM_EXIT, TEXT("退出"));
AppendMenu(hMenu, MF_POPUP, (LONG)hFileMenu, TEXT("游戏(G)"));

AppendMenu(hHelpMenu, MF_STRING, IDM_HELP, TEXT("查看帮助"));
AppendMenu(hHelpMenu, MF_STRING, IDM_ABOUT, TEXT("关于"));
AppendMenu(hMenu, MF_POPUP, (LONG)hHelpMenu, TEXT("帮助"));

SetMenu(hwnd, hMenu);

mfc menu用法一,布布扣,bubuko.com

mfc menu用法一

原文:http://www.cnblogs.com/lidabo/p/3731934.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!