[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

multi-level menu

Posted on 2000-03-23
7
Medium Priority
?
208 Views
Last Modified: 2013-11-20
when i create a multi-level popup menu,
it returns only when i click the menu item which has a command ID,but i want it also can returns when i click the item which contains a submenu.

how can i do this? any suggestion is appreciated. thank you.

0
Comment
Question by:Mike2000
[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
  • 4
  • 2
7 Comments
 
LVL 31

Expert Comment

by:Zoppo
ID: 2652605
Hi Mike2000,

I don't understand.

>'but i want it also can returns when i click the item which contains a submenu'

how would you then be able to open the sub-menu???

ZOPPO
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2652730
Indeed .. what is the point of a submenu if the popup returns (and so disappears) when you click on that item.

Only thing I can think that you are trying to do is to have an item on the menu that LOOKS like a submenu, and when you click on it, you (say) generate the submenu andpop it up.

In this case, if you want to make a menu LOOK like it is a submenu, then you'll want to owner-draw your menu so that you draw the little triangle that indicates a submenu.  When first popped up, you'd make the pseudo-submenu itme a regular menu item with a command id.  When the user clicks on it, do whatever work you want, set that item to be a real submenu item and redisplay the menu.  Even this would probably be a bit 'clunky' nd ugly, but is all I can think of for you.

This would be tricky, because
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 2652954
Hi Mike2000,

if that (what RONSLOW sayd) is what you want then you can simply create an empty popup menu and handle the WM_INITMENUPOPUP message to dynamically create items for the popup menu.

ZOPPO
0
Technology Partners: 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!

 
LVL 10

Expert Comment

by:RONSLOW
ID: 2653145
good idea Zoppo
0
 

Author Comment

by:Mike2000
ID: 2655872
i want it to be a normal menu item as well as a submenu item,when you click on it, it returns it's commamd ID,and when your mouse move over it,popup the submenu .the whole menu is dynamically
created.
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 300 total points
ID: 2656422
changing default behaviour like that is a bad idea .. it confuses the user.

How do you expect to click on it without hovering over it (unless you are really quick).

And clicking on a submenu item should pop up the submenu anyway, so your users are going to wonder what on earth is going on.

I'd reconsider my design / requirements if I were you.

0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2659196
I've got your code to compile and link.

I use <iostream> instead or <iostream.h>

AND I included "using namespace std;" in each .h file (after the #include of iostream, iomanip etc).

All works fine.

The problem was that you had both the std:ostream and ostream defined, and the compiler didn't know which one you meant.  Consistent usage of the namespace in the header files, and the use of <iostream> instead or <iostream.h> fixes all that.

Can I submit this as an aswer please???


0

Featured Post

Technology Partners: 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: 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…
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.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

656 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