Solved

Loading and merging a menu from a form

Posted on 1997-09-02
3
167 Views
Last Modified: 2010-04-04
I am trying to create a customizable toolbar for my project which uses an MDI form and children. To be able to customize the toolbar I would like to list the items available in the menus and have the user select one. I would also like the user to be able to edit the toolbar without having opened a child window. To do this I need to load the contents of a child window menu and merge it with the current menu and use the results. Creating a new child window and setting visible to false isn't allowed for MDI children. Any suggestions?
0
Comment
Question by:khenr29j
3 Comments
 

Expert Comment

by:boabyte
ID: 1343482
Do you want the toolbar a floating one (aka PaintShop Pro style)
or a fixed one like Word etc?
0
 

Author Comment

by:khenr29j
ID: 1343483
I am using the TToolbar component of Delphi 3.0, but it's not really important to the question. I would like to examine the contents of the menus on the MDI child. For example, I keep the Edit menu item on the child so that it's only available when a child window is open. But this also means that I don't know what's on that menu until I actually create a child window.
0
 
LVL 3

Accepted Solution

by:
d4jaj1 earned 150 total points
ID: 1343484
It sounds like you understand how to merge the two forms windows together, but your having a problem merging the two because you dont have access to one.  You can have access to teh child window by creating it, but not showiing it.  To hide a MDI child, use the API call;

showwindow(THE_NAME_OF_YOUR_FORM.handle,SW_Hide);

Now you access to your childs components and you can merge the menus like you would for any visible form.  Any questions, please ask.

PS: - To show a hidden MDI Child window use;

showwindow(THE_NAME_OF_YOUR_FORM.handle,SW_SHOWMAXIMIZED);  // or SW_SHOWNORMAL
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now