dubae524
May 24th, 2002, 03:22 PM
Let's say I have two windows (windows like the Internet Explorer window, or a dialog box window; it's that main parent container window with a title bar and an icon, along with the minimize maximize and close boxes), alright? I am trying to append a menu to each of them:
case WM_CREATE:
hMenu1 = CreateMenu();
hSubmenu1 = CreatePopupMenu();
AppendMenu(hSubmenu1, MF_STRING, ID_MNU_OK, "OK");
AppendMenu(hMenu1, MF_STRING | MF_POPUP, (UINT) hSubmenu1, "File1");
SetMenu(hwnd1, hMenu1);
hMenu2 = CreateMenu();
hSubmenu2 = CreatePopupMenu();
AppendMenu(hSubmenu2, MF_STRING, ID_MNU_YESMAN, "YESMAN");
AppendMenu(hMenu2, MF_STRING | MF_POPUP, (UINT) hSubmenu2, "File2");
SetMenu(hwnd2, hMenu2);
break;
That is the code. The first window's menu appears fine, but the second one's doesn't even appear. Can you help me out with this?
case WM_CREATE:
hMenu1 = CreateMenu();
hSubmenu1 = CreatePopupMenu();
AppendMenu(hSubmenu1, MF_STRING, ID_MNU_OK, "OK");
AppendMenu(hMenu1, MF_STRING | MF_POPUP, (UINT) hSubmenu1, "File1");
SetMenu(hwnd1, hMenu1);
hMenu2 = CreateMenu();
hSubmenu2 = CreatePopupMenu();
AppendMenu(hSubmenu2, MF_STRING, ID_MNU_YESMAN, "YESMAN");
AppendMenu(hMenu2, MF_STRING | MF_POPUP, (UINT) hSubmenu2, "File2");
SetMenu(hwnd2, hMenu2);
break;
That is the code. The first window's menu appears fine, but the second one's doesn't even appear. Can you help me out with this?