| View previous topic :: View next topic |
| Author |
Message |
CarlosTheTackle
Joined: 19 Oct 2004 Posts: 102
|
Posted: Fri Mar 25, 2005 7:37 am Post subject: WinMenuSelectItem - what about context menus? |
|
|
I really like being able to invoke Menu options with 'WinMenuSelectItem' - it's so much more elegant than programming the keystrokes.
I was wondering: how involved would it be to be able to do a similar thing with right-click context menus? It'd be really useful as far as I was concerned.
Cheers,
C |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Fri Mar 25, 2005 12:08 pm Post subject: |
|
|
That's a good question and I've made a note to look into it.
In the meantime, you can probably automate some context menus via Send/PostMessage. Rajat's Message Tutorial can help you discover which messages to send.
If you find out a fairly universal way to automate context menus, please post it here. |
|
| Back to top |
|
 |
Serenity
Joined: 07 Nov 2004 Posts: 1276
|
Posted: Fri Mar 25, 2005 4:02 pm Post subject: |
|
|
This would be wonderful. The problem I'm having is how to call the menu *and* be able to drag the Winspector target onto it. As soon as you left-click or focus another window the menu disappears. _________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Fri Mar 25, 2005 5:24 pm Post subject: |
|
|
| It might be more fruitful to monitor the window that owns the menu rather than the menu itself. Usually, that will will receive a message in response to your selection of one of its menu items. Such a message could then be simulated with PostMessage. |
|
| Back to top |
|
 |
Serenity
Joined: 07 Nov 2004 Posts: 1276
|
Posted: Fri Mar 25, 2005 6:53 pm Post subject: |
|
|
Thanks for the tip Chris. So far I've tried Explorer and Mozilla window classes and neither come up with any WM_COMMAND messages when right-clicking/selecting something from the context menus. _________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
|