🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Displaying menu after using CreatePopupMenu()

#1531
From: Kris
Date: Fri, 27 Jul 2007 12:36
24 lines
1880 bytes
Remy Lebeau (TeamB) wrote:
> 
> TrackMenuPopup() or TrackMenuPopupEx(), which is clearly stated in
> CreatePopupMenu()'s documentation.

Thanks. I can now properly display a Unicode menu and detect when menu 
items are clicked. However, I'm still wondering about one thing...

#define IDM_MENU_ITEM1 0x00001234
AppendMenuW(MyPopUpMenu,MF_STRING,IDM_MENU_ITEM1,MyWideString);

So, intercepting WM_COMMAND in WndProc when the menu item is clicked 
results in WParamLo containing 0x1234. Based on this value I can 
determine which menu item was actually clicked.

This works great. But 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).

Are there any rules as to which values I can use safely use for WParamLo  ?

Thanks,

Kris
Technical Details
Message-ID: <46a9e711$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46a9b224$1@newsgroups.borland.com> <46a9c918$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 14:36:52 +0200
From: Kris <test@test.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>
In-Reply-To: <46a9c918$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.242.6.168
Message-ID: <46a9e711$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1185539857 81.242.6.168 (27 Jul 2007 05:37:37 -0700)
Lines: 25
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail