🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6334

Re: "use" menu item in another app?

#6334
From: Bob Gonder
Date: Tue, 17 May 2005 15:49
13 lines
1402 bytes
Segal wrote:

>   hwnd = FindWindowEx(NULL, hwnd, NULL, "Target App");
>
>   MENUITEMINFO menuinfo;
>   if (GetMenuItemInfo(hmenu, 2, true, &menuinfo))
>
>This gets me the caption of the item, but how to I simulate a click?

I'm not certain, but it looks like what you want is the wID member of
menuinfo.

Then just PostMessage( hwnd, WM_COMMAND, menuinfo.wID, 0);
Technical Details
Message-ID: <v54k81lu0gb49sp76ri3ecjhb37gfbcatq@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!news.maxwell.syr.edu!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4289b235@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,de4107a245e3b3a8
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: "use" menu item in another app?
Date: Tue, 17 May 2005 08:49:31 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <v54k81lu0gb49sp76ri3ecjhb37gfbcatq@4ax.com>
References: <4289b235@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.77.144.171
X-Trace: newsgroups.borland.com 1116344971 67.77.144.171 (17 May 2005 08:49:31 -0700)
Lines: 15
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!news.maxwell.syr.edu!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail