|
-
May 24th, 2002, 03:22 PM
#1
Thread Starter
Lively Member
Menus in multiple parent windows
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?
- Justin Patrick Butler
Comme je trouve. "As I find."
- Butler family quote
Beneficia sumptos procul superant. "The benefits far exceed the costs."
- Myself
-
May 27th, 2002, 07:50 AM
#2
I don't really understand what the second window is, but I think menus only apply for top-level windows.
But maybe you just need to call DrawMenuBar to make the menu visible.
Last edited by CornedBee; May 27th, 2002 at 08:04 AM.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
May 27th, 2002, 11:13 AM
#3
Thread Starter
Lively Member
Never mind, don't worry about it. I already figured it out. But thanks anyway.
BTW I did mean multiple top-level windows.
- Justin Patrick Butler
Comme je trouve. "As I find."
- Butler family quote
Beneficia sumptos procul superant. "The benefits far exceed the costs."
- Myself
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|