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);
精彩评论