Account Options

  1. Sign in
Google Groups Home
« Groups Home
Get HMENU of popup menu from containing window handle?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
kuc...@gmail.com  
View profile  
 More options Mar 23 2006, 6:25 am
Newsgroups: microsoft.public.win32.programmer.ui
From: kuc...@gmail.com
Date: 23 Mar 2006 03:25:55 -0800
Local: Thurs, Mar 23 2006 6:25 am
Subject: Get HMENU of popup menu from containing window handle?
I wrote a hook for MSN Messenger, I'm catching context menu opening
(WM_INITMENUPOPUP), get menu handle (HMENU) and add my own menu items.
>From version 8.0 MSN Messenger stopped to send WM_INITMENUPOPUP.

Maximum I can get - I'm catching WM_ENTERIDLE with parameter MSGF_MENU
- so I get a handle of the window containing this popup menu. I've
checked - it's the correct window (tried to call DestroyWindow and it
worked correctly). Now the question - how can I get menu handle (HMENU)
if I know its container window handle?

P.S. People told me that version 8.0 was written in C# and uses WinFX -
maybe somebody is familiar with it and can tell me if there's a chance
to get menu handle by using WinFX functions?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kellie Fitton  
View profile  
 More options Mar 23 2006, 11:57 am
Newsgroups: microsoft.public.win32.programmer.ui
From: "Kellie Fitton" <KELLIEFIT...@YAHOO.COM>
Date: 23 Mar 2006 08:57:41 -0800
Local: Thurs, Mar 23 2006 11:57 am
Subject: Re: Get HMENU of popup menu from containing window handle?
Hi,

Use the following APIs to retrieve the handle of the menu,
and get menu information:

        GetMenu()
        GetSubMenu()
        GetMenuInfo()
        GetMenuBarInfo()

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winu...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winu...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winu...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winu...

Hope these suggestions helps,

Kellie.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian ASTOR  
View profile  
 More options Mar 23 2006, 12:47 pm
Newsgroups: microsoft.public.win32.programmer.ui
From: "Christian ASTOR" <casto...@club-internet.fr>
Date: 23 Mar 2006 09:47:04 -0800
Local: Thurs, Mar 23 2006 12:47 pm
Subject: Re: Get HMENU of popup menu from containing window handle?
kuc...@gmail.com a écrit :

> Now the question - how can I get menu handle (HMENU)
> if I know its container window handle?

Not sure if I have understood, but there is eg MN_GETHMENU...

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
r_z_a...@pen_fact.com  
View profile  
 More options Mar 23 2006, 2:41 pm
Newsgroups: microsoft.public.win32.programmer.ui
From: r_z_aret@pen_fact.com
Date: Thu, 23 Mar 2006 14:41:59 -0500
Local: Thurs, Mar 23 2006 2:41 pm
Subject: Re: Get HMENU of popup menu from containing window handle?
If you are going to ask the same question in multiple newsgroups,
please post to all at once so everyone can see/participate in the
whole discussion. I provided an answer in
comp.os.ms-windows.programmer.win32

On 23 Mar 2006 03:25:55 -0800, kuc...@gmail.com wrote:

>I wrote a hook for MSN Messenger, I'm catching context menu opening
>(WM_INITMENUPOPUP), get menu handle (HMENU) and add my own menu items.
>>From version 8.0 MSN Messenger stopped to send WM_INITMENUPOPUP.
>Maximum I can get - I'm catching WM_ENTERIDLE with parameter MSGF_MENU
>- so I get a handle of the window containing this popup menu. I've
>checked - it's the correct window (tried to call DestroyWindow and it
>worked correctly). Now the question - how can I get menu handle (HMENU)
>if I know its container window handle?

>P.S. People told me that version 8.0 was written in C# and uses WinFX -
>maybe somebody is familiar with it and can tell me if there's a chance
>to get menu handle by using WinFX functions?

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kuc...@gmail.com  
View profile  
 More options Mar 26 2006, 12:17 pm
Newsgroups: microsoft.public.win32.programmer.ui
From: kuc...@gmail.com
Date: 26 Mar 2006 09:17:32 -0800
Local: Sun, Mar 26 2006 12:17 pm
Subject: Re: Get HMENU of popup menu from containing window handle?
No, unfortunately this doesn't help at all. I'm aware of GetMenu
function subset, it relates to menus for window. I'm talking about
different situation. Context menu is a window itself, it doesn't belong
to any window as regular menu. Correct answer was below - and it is
MN_GETHMENU.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kuc...@gmail.com  
View profile  
 More options Mar 26 2006, 12:18 pm
Newsgroups: microsoft.public.win32.programmer.ui
From: kuc...@gmail.com
Date: 26 Mar 2006 09:18:05 -0800
Local: Sun, Mar 26 2006 12:18 pm
Subject: Re: Get HMENU of popup menu from containing window handle?
Thank you very much, this is exactly what I needed!

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kuc...@gmail.com  
View profile  
 More options Mar 26 2006, 12:27 pm
Newsgroups: microsoft.public.win32.programmer.ui
From: kuc...@gmail.com
Date: 26 Mar 2006 09:27:05 -0800
Local: Sun, Mar 26 2006 12:27 pm
Subject: Re: Get HMENU of popup menu from containing window handle?
No, unfortunately your solution this doesn't help at all. I'm aware of
GetMenu
function subset, it relates to menus for window. I'm talking about
different situation. Context menu is a window itself, it doesn't belong
to any window as regular menu. Correct answer was above - and it is
MN_GETHMENU.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »