Solved

Loading and merging a menu from a form

Posted on 1997-09-02
3
168 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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 Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

803 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