Article View: borland.public.cppbuilder.nativeapi
Article #1534Re: Displaying menu after using CreatePopupMenu()
From: Kris
Date: Fri, 27 Jul 2007 17:42
Date: Fri, 27 Jul 2007 17:42
30 lines
2159 bytes
2159 bytes
Remy Lebeau (TeamB) wrote: >> I'm wondering if my arbitrary 0x1234 WParamLo value >> that isn't going to potentially run into conflicts with other >> UI actions (e.g. menu items generated by VCL). > > VCL menu items use their own provide HWND to handle their actions. The > WM_COMMAND for them will never go through your message handler. However, my WndProc() does receive WM_COMMAND messages other than the one that I am explicitly generating when my pop-up menu item is clicked. My test application has, besides a button that triggers the pop-up in question, also some additional buttons that generate some output in a TMemo. Clicking on those buttons does generate several other WM_COMMAND events such as: Message=00000111 - WParam=0000064E - LParam=0004064E While clicking my Unicode Popup menu with 0x1234 WParamLo (the value is set via AppendMenuW) generates a WM_COMMAND like this: Message=00000111 - WParam=00001234 - LParam=00000000 As you can see I am going to have potential problems with distinguishing between events from my own popup menu and from other events. I am hoping you can clarify this behavior. Thanks, Kris
Technical Details
Message-ID:
<46aa2e75@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<46a9b224$1@newsgroups.borland.com> <46a9c918$1@newsgroups.borland.com> <46a9e711$1@newsgroups.borland.com> <46aa2786$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,36d1a4e51ed2600d X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Fri, 27 Jul 2007 19:42:26 +0200 From: Kris <ks@ks.com> User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Displaying menu after using CreatePopupMenu() References: <46a9b224$1@newsgroups.borland.com> <46a9c918$1@newsgroups.borland.com> <46a9e711$1@newsgroups.borland.com> <46aa2786$1@newsgroups.borland.com> In-Reply-To: <46aa2786$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 83.134.86.235 Message-ID: <46aa2e75@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1185558133 83.134.86.235 (27 Jul 2007 10:42:13 -0700) Lines: 34 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail