Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Get Menu Item Text from other app

28 views
Skip to first unread message

David Engler

unread,
Sep 4, 2008, 2:48:29 PM9/4/08
to
Hi,

I'm using SendMessage(WM_GETTEXT,...) to get text of controls from another
application, but seems to have problem with menus.

What I have is the handler to the menu, and the point on the screen where
the menu item appears.

Thank you


AliR (VC++ MVP)

unread,
Sep 4, 2008, 3:19:41 PM9/4/08
to
I don't see how the screen coordinates of the item will help anything, but
have you tried calling GetMenuItemInfo?

AliR.


"David Engler" <dav...@cpvegas.com> wrote in message
news:OquuT7r...@TK2MSFTNGP06.phx.gbl...

Jeffrey Tan[MSFT]

unread,
Sep 5, 2008, 5:46:24 AM9/5/08
to
Hi David,

I am curious how do you get the menu handle of another application? I am
not sure if menu handle works across process boundary(as you may know, the
kernel handle does not work across process boundary). But if you could tell
us how you get the handle of another application, I think we can understand
it and help you better.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

David Ching

unread,
Sep 5, 2008, 9:13:14 PM9/5/08
to

"David Engler" <dav...@cpvegas.com> wrote in message
news:OquuT7r...@TK2MSFTNGP06.phx.gbl...

The menu handle won't do you any good, but you can use the point and call
WindowFromPoint() to get the HWND. Since the menu is a topmost window, you
should receive the menu window, and not any other window that covers the
same location.

I don't know what the menu will return when you send the WM_GETTEXT, but
give it a shot.

-- David


Jeffrey Tan[MSFT]

unread,
Sep 10, 2008, 11:25:10 PM9/10/08
to
Hi David ,

How about this issue now? Have you reviewed our replies to you? If you
still need any help, please feel free to feedback, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support

=========================================


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.

0 new messages