• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 407
  • Last Modified:

Modifying MDIChild System Menu

Hello Delphi Gurus...

I would like to modify the System Menu of a MDIChild form. I have done this previously on a "Normal" form, and I can also do it on the MDI Parent form. I have tried using AppendMenu, InsertMenu, SetMenuItemInfo etc... but none of these work on the MDIChild form. I am using Delphi 7.0 PRO.

Thanks for your help.
0
CSXADMIN
Asked:
CSXADMIN
1 Solution
 
LRHGuyCommented:
Here's what I do in the CREATE method of the MDI child form:

var
  SM:HMenu;
begin
  { These don't seem to work when edit window is MAXIMIZED }
  { because, WMSYSCOMMAND doesn't get called! }
  SM:=GetSystemMenu(Handle,False);
  AppendMenu(SM,MF_Separator,0,'');
  AppendMenu(SM,MF_String,c_another,'Open Another');
end;

It works for me.
0
 
CSXADMINAuthor Commented:
Thanks LRHGuy...

That is what I had too.... The only problem was that after appending the menu, I was also calling BorderIcons := [biSystemMenu, biMinimize]; ( I wanted to prevent the user from Maximizing the forms also)... As it turns out... a call to BorderIcons := [biSystemMenu] most likelly initializes the system menu back to its original state...

Thanks for you help...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now