PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Robert Rioja on July 09, 2010, 01:36:56 PM

Title: Menus in tab forms
Post by: Robert Rioja on July 09, 2010, 01:36:56 PM
I have a form with a tab control.  For each tab, there is a tab child form.  I used the Menu Editor to create menus in one of the tab forms.  Everything compiles and runs with no errors.  But the menu bar does not appear in the tab child form (or anywhere else).  Why not?

Thanks,
Robert
Title: Re: Menus in tab forms
Post by: Paul Squires on July 09, 2010, 03:04:28 PM
Because forms that have the WS_CHILD style can not have menus. I guess that technically FF3 should somehow test to see if the Form has the WS_CHILD style set and then disallow access to the menu editor.

Here is what Microsoft has to say about this:
http://msdn.microsoft.com/en-us/library/ms632600(VS.85).aspx

WS_CHILD:  The window is a child window. A window with this style cannot have a menu bar. This style cannot be used with the WS_POPUP style.

You would have to build your own kind of menu custom control, or fake it with a Label with text and test where the mosue clicks and display a popup menu, etc....

Title: Re: Menus in tab forms
Post by: Robert Rioja on July 13, 2010, 09:40:10 AM
OK.  I understand why it does not work.  It was just confusing because FireFly allows you to place menus in the child form.

Thanks,
Robert