?
Solved

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

Posted on 1998-11-06
3
Medium Priority
?
165 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
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…
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.
Suggested Courses

762 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