Solved

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

Posted on 1998-11-06
3
148 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
  • 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

Read about why website design really matters in today's demanding market.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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:
An overview of how to create reports in Adobe Analytics (formerly Omniture Site Catalyst) using pageNames, events, eVars and props. This video will show you how to install the Omniture Debugger tool so can see (and test) what is being passed int…

948 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

17 Experts available now in Live!

Get 1:1 Help Now