Solved

Loading and merging a menu from a form

Posted on 1997-09-02
3
166 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
Comment Utility
Do you want the toolbar a floating one (aka PaintShop Pro style)
or a fixed one like Word etc?
0
 

Author Comment

by:khenr29j
Comment Utility
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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

772 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

10 Experts available now in Live!

Get 1:1 Help Now