Solved

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

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Talking avitars 11 123
viewing source code from eclipse 13 74
bigDiff challenge 17 75
Need to make a quick brochure in the next one hour 3 86
The most recent Google Panda algorithm update that I wrote about was Panda 2.5 (http://www.experts-exchange.com/Web_Development/Internet_Marketing/A_8112-Google-s-Panda-Algorithm-Update-Panda2-5.html), and there have been several iterations of the P…
Read about how to choose the best possible content marketing agency to suit your needs. Content marketing has become an integral part of running a successful tech business, so it is wise to be informed.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
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.

757 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

16 Experts available now in Live!

Get 1:1 Help Now