🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#13274
From: Remy Lebeau (TeamB)
Date: Fri, 17 Oct 2003 21:03
31 lines
2575 bytes
"Marc" <Bukwheat@axess.com> wrote in message
news:3f9049a2$1@newsgroups.borland.com...

> 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

You still don't have access to the parent menu from that message.  You would
have to keep track of every item that is being selected, and then if you
receive a WM_INITMENUPOPUP message, you will already have the HMENU for the
menu item who is about to display a submenu, and can store that HMENU
accordingly for later use.

> 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.

What does that have to do is determining the parent menu of a given item
when it is actually clicked on?  Isn't that what you were originally asking
for?  What you propose will not work, because the HMENU of the item you
actually click on will not match the HMENU of the submenu itself which you
obtained when the submenu was being opened.

I'm getting lost in what you are trying to actually accomplish.  Please
start over and try to explain more details about what exactly you are trying
to do.  Please provide an actual example.


Gambit
Technical Details
Message-ID: <3f905898$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!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> <3f9049a2$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 14:09:26 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
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> <3f9049a2$1@newsgroups.borland.com>
Subject: Re: How to get parent menu of sub menu??
Date: Fri, 17 Oct 2003 14:03:21 -0700
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.137.75
Message-ID: <3f905898$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1066424472 67.22.137.75 (17 Oct 2003 14:01:12 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail