Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to find the parent menu of a popup menu?

Posted on 1998-01-11
3
Medium Priority
?
708 Views
Last Modified: 2013-11-20
Given the handle (or CMenu object) of a popup menu,
how can I get the handle (or CMenu object) of the
parent menu from which the given menu was popped?
0
Comment
Question by:mco
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1313783
I don't think it is possible because a popup menu does not necessarily have a parent menu.
0
 
LVL 1

Author Comment

by:mco
ID: 1313784
Well, you are right. But in those cases where the menu was popped
up as a submenu of another menu, the system knows about it.

0
 
LVL 7

Accepted Solution

by:
galkin earned 300 total points
ID: 1313785
It is not possible. What you actually can do if you now top menu handle( you can get it if you know menu owner window with GetMenu). Then you you can recursively enumerate all submenus each time comparing submenu handle with your menu handle. If there is match so this is parent menu.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question