Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Menu on non-toplevel form
Message
 
À
10/06/2003 15:34:56
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00798293
Message ID:
00798627
Vues:
35
>Hi larry,
>
>>>I´ve drawn the conclusion that this is a major design flaw in VFP. I think I´ve got to go for a solution where I use command buttons as menupads to activate the menupopups. Certainly not easy and perfect, but I see no other solution than this.
>>>
>>
>>Walter,
>>You came to obviously incorrect conclusion. VFP creates menus using the Windows API functions. As Anatoliy posted, menus can not be associated with child forms, only top-level forms.
>
>Look at the Active Directory Users and Computers panel in Win2K. Tell me why do I see a menu (and toolbar) for each childform I create in here ?
>
>If you consider this to be a design flaw (which I disagree with you on), then point the finger at the correct MS group, the OS designers.
>
>If it were impossible in previous OS versions, it certainly like it is possible in W2K.
>
>>If you want linked menus, you could create a series of pads, not necessarily an entire menu. These pads could be created as part of the main menu in your form's Init and released upon destruction. The designers (Form, Report, etc.) work this way within VFP.
>
>I want to create a NT explorer like application that resides in the main VFP window. It has to have its own menu, one way or another. It also has to have a toolbar, but I certainly can workarround it by just putting toolbar butcons at the top of the form.
>
>>Just my $0.02.

Walter,

I think that there are really two things going on as to why you can't do this.

First, I think the problem in understanding may be due to perhaps some understated documentation. The Window's Platform SDK does state that the window may not be a child window. If you look at the properties (via Spy++) of the Console Root window in the SQL Server Enterprise Manager, you can see that it's clearly WS_CHILDWINDOW, yet it has it has a menu as does the Manager. Looking at the Extended Styles, it also has WS_EX_MDICHILD. This may be the reason why it can display a menu. This is a guess.

Unfortunately, VFP does not (at least in 8.0) create any windows with this extended style. You might want to try a test by setting the MDIForm property to true. Even with this property set this way, the extended style above is not utilized.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform