?
Solved

HELP!!!: Pop-up menu not align!!!

Posted on 1998-11-06
3
Medium Priority
?
167 Views
Last Modified: 2013-11-28
Hi

I'm using a CTreeCtrl on a wizard mode ...(e.g. property page)

I have written an event-handler to catch the right-click event on the Tree control....

=========================================
void CEditTreeCtrl::OnRButtonDown(UINT nFlags, CPoint point)
{
      CMenu menu;
      CMenu *pPopup;

      menu.LoadMenu(IDR_POPUP_TOPIC);
      pPopup = menu.GetSubMenu(0);
      pPopup->TrackPopupMen(TPM_LEFTALIGN|TPM_RIGHTBUTTON,
                                    point.x,
                                                point.y,
                                                this);                  
    CTreeCtrl::OnRButtonDown(nFlags, point);
}
=============

The menu do "pop-up" but NOT at the mouse cursor location.... It is at some where else....

How to make the menu pop-up by the mouse cursor location??
0
Comment
Question by:samyee
[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
3 Comments
 

Author Comment

by:samyee
ID: 1324290
Edited text of question
0
 
LVL 2

Accepted Solution

by:
cyrilbdt earned 100 total points
ID: 1324291
...
ClientToScreen(point);
pPopup->TrackPopupMen(TPM_LEFTALIGN|TPM_RIGHTBUTTON,
point.x, point.y, this);
..

0
 

Author Comment

by:samyee
ID: 1324292
Thanks

Correct answer should be ClientToScreen(&point);
0

Featured Post

Sign your company up to try the MB 660 headset now

Take control and stay focused in noisy open office environments with the MB 660. By reducing background noise, you can revitalize your office and improve concentration.

Question has a verified solution.

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

There are many other benefits to creating an inbound marketing strategy. Let’s take a look at five of the biggest and how they'll affect your business.
We aren’t perfect, just like everyone else.  Check out the email errors our community caught and learn the top errors every email marketer should avoid.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

649 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