开发者

How to hide menu? lpszMenuName

I managed to make the menu with this piece of code and using Visual Studio 2008:

WNDCLASS    wc; 
...
wc.lpszMenuName = MAKEINTRESOURCE(IDR_MENU1);
...
if(!RegisterClass(&wc))
...

But how i can hide the menu by just pressing a button of my choice? There is ShowWindow() 开发者_如何学JAVAfunction, but it doesnt work on menus... so what function i use to hide menu...?


I think you can do something like this:

// save the menu
HMENU hMenuOld = GetMenu(hWnd);
// hide the menu
SetMenu(hWnd, NULL);
// show the menu
SetMenu(hWnd, hMenuOld);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜