void CTetrisWindow::CreateMenu ()
{
//CMenu* old_menu = CMenu::FromHandle(m_hMenuDefault);
SetMenu(NULL);
//old_menu->DestroyMenu();
CMenu m, game, help;
game.CreatePopupMenu ();
game.AppendMenu (0, 101, "&New");
game.AppendMenu (MF_SEPARATOR, 102, "");
game.AppendMenu (0, 103, "&Quit");
help.CreatePopupMenu ();
help.AppendMenu (0, 151, "&Instructions");
help.AppendMenu (MF_SEPARATOR, 152, "");
help.AppendMenu (0, 153, "&About");
m.CreateMenu ();
m.AppendMenu (MF_POPUP, (UINT) (game.m_hMenu), "Game");
m.AppendMenu (MF_POPUP, (UINT) (help.m_hMenu), "Help");
SetMenu(&m);
//m_hMenuDefault = m.m_hMenu;
}
for some reason this doesn''t work, instead of showing the menu, it just shows what was behind the window before it was shown.
can someone please tell me how i am supposed to do it before i go insane and place a bomb under the microsoft headquarters?
how to use CMenu
i have the following code:
OT.. there seems to be something wrong with the [ source ] box. It doesn''t like the string length to be 0 between "". Hmmm.... someone outghto fix that...
-Chris Bennett ("Insanity" of Dwarfsoft)
Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)
-Chris Bennett ("Insanity" of Dwarfsoft)
Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)
theres a lot of things it doesnt like . im surprised this is has gone on so long as it has in flipcode it was fixed within a week, after all this is meant to be a site for programmers!!!
Edited by - zedzeek on August 4, 2000 9:40:37 AM
Edited by - zedzeek on August 4, 2000 9:40:37 AM
AAAAARGH
TWO USELESS ANSWERS
anyway my question has changed now
what i have now is
and this works better, since it loads the menu and draws it so that all ok... problem is that all the menu items are disabled for some reason...?
someone please help me... and forget the sodding thing about the source syntax colorer
TWO USELESS ANSWERS
anyway my question has changed now
what i have now is
void CTetrisWindow::CreateMenu (){ SetMenu(NULL); CMenu* pMenu = GetMenu(); if (pMenu) pMenu->DestroyMenu(); HMENU hMenu = LoadMenu (g_cApp.m_hInstance, MAKEINTRESOURCE(IDR_MENU)); pMenu = CMenu::FromHandle(hMenu); SetMenu(pMenu); m_hMenuDefault = hMenu;}
and this works better, since it loads the menu and draws it so that all ok... problem is that all the menu items are disabled for some reason...?
someone please help me... and forget the sodding thing about the source syntax colorer
AAAAARGH
TWO USELESS ANSWERS
anyway my question has changed now
what i have now is
and this works better, since it loads the menu and draws it so that all ok... problem is that all the menu items are disabled for some reason...?
someone please help me... and forget the sodding thing about the source syntax colorer
TWO USELESS ANSWERS
anyway my question has changed now
what i have now is
void CTetrisWindow::CreateMenu (){ SetMenu(NULL); CMenu* pMenu = GetMenu(); if (pMenu) pMenu->DestroyMenu(); HMENU hMenu = LoadMenu (g_cApp.m_hInstance, MAKEINTRESOURCE(IDR_MENU)); pMenu = CMenu::FromHandle(hMenu); SetMenu(pMenu); m_hMenuDefault = hMenu;}
and this works better, since it loads the menu and draws it so that all ok... problem is that all the menu items are disabled for some reason...?
someone please help me... and forget the sodding thing about the source syntax colorer
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement