Solved

Taskbar Icon Question

Posted on 1998-07-19
1
172 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now