Solved

How to find the parent menu of a popup menu?

Posted on 1998-01-11
3
680 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 100 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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

617 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