码迷,mamicode.com
首页 > 其他好文 > 详细

mfc menu用法一

时间:2014-05-19 09:58:20      阅读:251      评论:0      收藏:0      [点我收藏+]

标签:c   ext   a   string   set   new   

#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用法一

标签:c   ext   a   string   set   new   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!