Solved

popupmenu control

Posted on 2000-03-20
2
188 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
2 Comments
 
LVL 4

Accepted Solution

by:
Alex Curylo earned 100 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Folder Comparison 12 53
Complete beginner needs help making a cron job 9 109
sumHeights  challenge 17 65
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 242
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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

919 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now