?
Solved

popupmenu control

Posted on 2000-03-20
2
Medium Priority
?
202 Views
Last Modified: 2013-12-26
Now that I created the PopUpMenu Control using NewControl(), how do I get the results of a mouseDown in the popUpMenu? I tried this but doesn't seem to work, value doesn't change

if(hitControlHdl == gWindowPeek->popUpControl) {
                      if(dummy = TrackControl(hitControlHdl,myPoint, nil)) {
                            beep;
                            value = GetControlValue((ControlHandle)gWindowPeek->popUpControl);                                  
                      }
                }
0
Comment
Question by:dwp090598
[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
2 Comments
 
LVL 4

Accepted Solution

by:
Alex Curylo earned 400 total points
ID: 2638507
It does get as far as beeping, right? If not then "myPoint" is probably not the same point you passed to FindControl(), which it should be.

But if it is beeping, and you saw the menu item flash appropriately, hmmmm, that really ought to work. About the only reason it wouldn't is that the Control Manager is confused about how many items are in the menu. Try setting

SetControlMaximum(gWindowPeek->popUpControl, CountMItems(itsMenu));

right after creating the control -- AND after any change you make to the contents of the menu while it's part of the control, because the Control Manager does NOT automatically know about any change to the menu.

Hope that helps.
0
 

Author Comment

by:dwp090598
ID: 2641887
SetControlMaximum() did the trick.

Thanks Again
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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…
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

771 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