Solved

popupmenu control

Posted on 2000-03-20
2
190 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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
bobThere java chalenge 45 92
repeatEnd java challenge 42 84
no14 challenge 14 67
Detect file exist or not 3 157
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…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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 video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

773 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