Solved

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

Posted on 1998-11-06
3
162 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 50 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Read about why website design really matters in today's demanding market.
In this blog, I will share you some basic tips for content marketing and to rank your website on Google.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

688 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