Solved

Dynamic menu functionality

Posted on 1998-12-11
4
242 Views
Last Modified: 2013-11-20
This may be out there, but I have an MFC application that exposes an automation interface and I would like to be able to expose dynamic menu functionality.  What I mean by that, is I would like users to be able to be able to setup an automation script to be executed on that application and associate it with a menu on the app.  Similar to the "User defined tools" that can be setup on the "Tools" menu of Developer Studio.  Can an automation script be run on itself?  Can it be saved in a file and be executed by a menu selection?  This would really be cool.
Thanks,
Anne
0
Comment
Question by:amkel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Expert Comment

by:plaroche
ID: 1326053
Is your question to know how to code a dynamic menu or is it how to do an automation script execution from a menu command?
If it's the former I can help, I've done a Layout which works like the Window menu, I could post sample code depending on what really is your question.
0
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1326054
Yes, it is possible, but you will need to design your application and expose the right objects to make this work. Let's say that you expose a CustomizeMenu object. As long as you provide enough methods to manipulate the menu items, there isn't any problem with this.
0
 

Author Comment

by:amkel
ID: 1326055
How do I run automation on myself?  Assuming I reserve a couple of menus for user defined operations.  I would want each user to be able to automate operation by associating serveral automation commands with one menu operation.  Does this make sense?
Thank you,
Anne
0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 200 total points
ID: 1326056
What Microsoft Word does is whenever you generate a macro either through a recorder or script, a macro processor converts the scripts into automation code (In this case, the VBA runtime parses the script and invokes the correct object.method calls). You would have to either use JScript or VBScript as your engine and then you can arbitrarily create a script for the engine to parse. The only thing you need to do is to register your objects with the scripting engine. Then the engine does the rest.
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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adapt this command to show who installed 29 112
Unix / Linux grid computing 5 169
sumHeights2  challenge 7 131
Bartender label printing - switch on and off graphics 3 74
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

733 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