?
Solved

Taskbar Icon Question

Posted on 1998-07-19
1
Medium Priority
?
179 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 320 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

770 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