[comp.windows.ms] Menu's and Captions

marco@hpmcaa.mcm.hp.com (Marco Dalla-Gasperina) (07/08/89)

Hello,

    Here's a grabber...

What I need is a child window with a menu... I couldn't find anything
that showed me how I could do it so my first guess is to try something
else.  (I know about LoadMenu and DrawMenuBar but they don't seem to have
the right stuff).

My attempt was to use a POPUP with a Parent... Ahh! this allows me to
specify a menu... but there's a catch.  For some reason, a menu needs
a caption bar to function properly, otherwise it gets drawn weird and 
(in my case) only responds to the first click attempted on the popup's
menu bar. (If you click on the parents menu first, the popup's menu gets
hosed like before you even try it).

I don't want a caption, because (1) it takes up space, and (2) I don't
want the window to be moved.

Any ideas?

marco

bturner@hpcvlx.HP.COM (Bill Turner) (07/10/89)

> What I need is a child window with a menu...

Well, as you noticed you will need a WS_POPUP window rather than
WS_CHILD, since WS_CHILD windows cannot have menus.  (The hMenu
is used as the child window ID number for WS_CHILD.)

I have no idea about requiring a caption if you have a menu.  Perhaps
you should contact Microsoft about this?

--Bill Turner (bturner@hp-pcd.hp.com)