[EMAIL PROTECTED] wrote:
Ok. Here is what I think is a clearer explaination.
My application requires a feature which allows you to go outside the application (store application status and give the impression of background process) and capture a screenshot of any screen/form and come back to the application with it. Now, to capture a screenshot, there's a button that I display on the current form (of an application which the user randomly selects). On hitting the button, a menu or a list should pop up giving some image editing options to the user.
In order to achieve the last step, I tried the following 2 methods.
1. Created a menu resource in my application and tried accessing it via DmGetResource and then using FrmSetMenu and EvtEnqueueKey(vchrMenu, 0, commandKeyMask), tried to bring up the menu. Didn't work.
2. Created a list dynamically using LstNewList and tried popping it up. That didn't work either.
What I need to know is -
1. How do I access a menu resource that's in my application and use
it in another application?
Simple Answer :- You dont.
long answer :-
Menus are loaded the first time thay are accessed. as with all resources
the OS will look through the chain of open resource databases, starting
with the most recently opened working back to the oldest opened. Usualy
the application's resource database is the most recently opened (By the
OS to lanch the app).
To 'replace' a resource you would have to make sure that your resource
database is the most recently opened (Just call DmOpenDatabase) AND you
have a resource of the correct type AND id.
However even this is likly to cause lots of problems, as you don't know
what id each application has used, nor do you know what menu items the
application has.
Alternative answers:-
1) Look into MenuAddItem. You have to call it when the menu is first
opened, but it does allow you to add to an existing menu.
2) Look into sysNotifyMenuCmdBarOpenEvent. It is the notification used
when the '/' is entered, opening up the small action bar at the bottom
with cut/copy/paste etc. You can add a button(s) to that. Unfortunatly
the command bar is not (easly) available on treo devices as the don't
have graffitie.
3) Trigger of some combination of hard keys
2. How do I create a list dynamically and associate it with the current form
irrespective of the application it belongs to?
Thanks.
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/