Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem With API Call
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00662553
Message ID:
00662620
Views:
23
>aha!
>
>I'm trying to activate a menu item in an EXE from within
>my application. Am I going the right way with this?
>
>Thanks

Kevin,

Wouldn't it just be easier to reference the desired programming. Further, if it's part of the VFP system menu (such as Cut, Copy, etc.), you can activate these with SYS(1500).

Just a little more info for you on GetMenuItemID(). Using your code, you'll get a handle to the main VFP menu. When you call GetMenuItemID(), you'll get back -1. This means that there's a sub-menu involved. For example, using the handle returned from GetMenu(), if you call GetMenuItemCount(), you should get back 8 in some circumstances. This would correspond with the File, Edit, View, Format, Tools, Program, Window, and Help.

You'd then need to call GetSubMenu() in order to get a handle to the particular menu pad item.

This help?
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform