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
Solved

popupmenu control

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand macro to include alternate header placement and naming 5 75
Pressing cancel button with C# UI Automation 3 81
post4 challenge 28 104
Making an alias 7 101
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 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