🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to get parent menu of sub menu??

#13272
From: Marc
Date: Fri, 17 Oct 2003 19:57
39 lines
2703 bytes

true, which is why my problem remains unresolved.

Here is a new avenue I am investigating.  Decause I am already 
a system wide hook, I can trap the WM_MENUSELCT and see if the 
menu item I am selecting is a submenu and get the HMENU off of 
the Parent menu, keep this HMENU in a var and when the menu is 
actually created I can trap that to see if the HMENU matches 
the one in my var and then manipulate it as a child of the parent menu.

Does this sound like a feasible option, I am currently trying 
to implement this but the wparam keep on returning 0.

Thanks
Marc

WM_MENUSELECT "Taken from MSDN"
wParam
The low-order word specifies the menu item or submenu index. If the selected item is a command item, this parameter contains the identifier of the menu item. If the selected item opens a drop-down menu or submenu, this parameter contains the index of the drop-down menu or submenu in the main menu, and the lParam parameter contains the handle to the main (clicked) menu; use the GetSubMenu function to get the menu handle to the drop-down menu or submenu. 


"Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> wrote:
>
>"Marc" <Bukwheat@axess.com> wrote in message
>news:3f8ff395$1@newsgroups.borland.com...
>
>> Also this may have worked, because their is a GetMenu()
>> function that returns a HMENU from a HWND the function
>> returns NULL if not a menu.  Also their is a IsMenu() function
>> that return true or false if Hmenu is valid or not.
>
>None of that gets you access to the parent menu of a given menu item,
>however.
>
>
>Gambit
>
>
Technical Details
Message-ID: <3f9049a2$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3f8efec0$1@newsgroups.borland.com> <3f8f0a1e$1@newsgroups.borland.com> <3f8f2738$1@newsgroups.borland.com> <j9fuovor136t3v9bteu3g60qr4bad44kqr@4ax.com> <3f8f3f26$1@newsgroups.borland.com> <3f8ff395$1@newsgroups.borland.com> <3f901bdc$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e3f721bd1049e517
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-17 13:04:54 PST
From: "Marc" <Bukwheat@axess.com>
Sender: "Marc" <Bukwheat@axess.com>
Reply-To: "Marc" <Bukwheat@axess.com>
Subject: Re: How to get parent menu of sub menu??
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 138.11.254.204     
X-Forwarded-For: 192.168.152.223
References: <3f8efec0$1@newsgroups.borland.com> <3f8f0a1e$1@newsgroups.borland.com> <3f8f2738$1@newsgroups.borland.com> <j9fuovor136t3v9bteu3g60qr4bad44kqr@4ax.com> <3f8f3f26$1@newsgroups.borland.com> <3f8ff395$1@newsgroups.borland.com> <3f901bdc$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <3f9049a2$1@newsgroups.borland.com>
Date: 17 Oct 2003 12:57:22 -0700
X-Trace: newsgroups.borland.com 1066420642 207.105.83.66 (17 Oct 2003 12:57:22 -0700)
Lines: 40
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail