Solved

Taskbar Icon Question

Posted on 1998-07-19
1
177 Views
Last Modified: 2013-12-03
I have added an icon to the taskbar and can respond to mouse messages using the callback function.
But when I use the TrackPopupMenu function, I need to get the position of the mouse to put into the third & fourth fields of TrackPopupMenu function. Otherwise the menu will appear in the top left of the screen.
How can I get these coordinates of the mouse when it over the taskbar icon so that the menu will be adjacent to the mouse when clicked.
Thanks for help
dsch
0
Comment
Question by:dsch
[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
1 Comment
 
LVL 4

Accepted Solution

by:
agreen earned 80 total points
ID: 1410616
   POINT Mouse;

    .....

        case WM_RBUTTONUP:
                GetCursorPos(&Mouse);
                SetForegroundWindow(hWnd);

                TrackPopupMenu(CNemoPopupMenu, TPM_LEFTALIGN,
                    Mouse.x, Mouse.y, 0, hWnd, NULL);
            break;

   .....
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

707 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