MDI Forms and Enabled Menu Items 
Author Message
 MDI Forms and Enabled Menu Items

I have an MDI parent form which has 5 menu items on it.
I have two MDI child forms - they do not have menus - I want to
contain the menus to the MDI parent form.

At start up - mnuFile, mnuEdit and mnuInsert are enabled
When Form1 starts - I would like to have mmuModules, enabled
When Form2 starts - I would like to have mnuModules and mnuTutorials
enabled

Since I also have a toolbar, the code that will work for the menu
should be very close to that for the toolbar - that is why I am
choosing to leave the menu items on the parent form instead of using
the child menu to replace the parent menu

I am having a tough time with this one so any code would be great.

Thanks in advance - Don



Wed, 21 Jul 1999 03:00:00 GMT  
 MDI Forms and Enabled Menu Items

Quote:

> I have an MDI parent form which has 5 menu items on it.
> I have two MDI child forms - they do not have menus - I want to
> contain the menus to the MDI parent form.

> At start up - mnuFile, mnuEdit and mnuInsert are enabled
> When Form1 starts - I would like to have mmuModules, enabled
> When Form2 starts - I would like to have mnuModules and mnuTutorials
> enabled

> Since I also have a toolbar, the code that will work for the menu
> should be very close to that for the toolbar - that is why I am
> choosing to leave the menu items on the parent form instead of using
> the child menu to replace the parent menu

> I am having a tough time with this one so any code would be great.

> Thanks in advance - Don

There are two dirty ways to do that.

(1) Make a normal form and make it child at run time. In form load or somewhere else,
say
Call SetParent(CHild.hwnd, MDIForm1.hwnd)

(2) Make your child form MDI child at design time. Make a dummy normal form with menus.
At run time, make that dummy form a child of your MDI child form.
Call SetParent(Dummy.Hwnd, Child.Hwnd)

Both are dirty . What I mean dirty? Try both and then you see.

Jeff Hong YAN



Wed, 21 Jul 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How do I enable and disable menu items on the parent form

2. Loop Thru Menu Items on main MDI form

3. MDI form Menu Items

4. VB Bug? - Menu Items when using MDI Form

5. icons/bmps onto menu items on a MDI menu

6. Disable Menu item in MDI system Menu?

7. How to make menu in MDI child appear together with MDI form

8. Menu, MDI form and MDI child

9. MDI Form's menu replaced by MDI Child

10. New menu item never enable

11. menu item enabled property

12. problem with enabled property on inherited menu item

 

 
Powered by phpBB® Forum Software