473,382 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

systray menu overlaps

I wrote an MFC program whose icon, tooltip and menus are available in systray.
When I right-click on the icon, not only my popup menus but also the taskbar
popup menu, such as, "Toolbars", "Adjust Date/Time", etc. are displayed.
If I right-click one more time, then only my menus are displayed. This
happens alternatively. In other words, if I click again, then both menus are
displayed.
I followed the exact steps that were posted on MSDN, such as,
afx_msg LONG CAutoUpdatesDlg::OnSysTrayIconClick( WPARAM wParam, LPARAM
lParam )
{
switch (lParam){
case WM_LBUTTONDOWN:
OnSysTrayInstallupdates();
break;
case WM_RBUTTONDOWN:
ShowTrayPopupMenu();
break ;
}
// PostMessage( WM_NULL, 0, 0 );
return 0;
}

void CAutoUpdatesDlg::ShowTrayPopupMenu()
{
CMenu mnTrayPopup;
mnTrayPopup.LoadMenu(IDR_TRAY_POPUP);

POINT CurPos;
GetCursorPos (&CurPos);
CMenu *mnItem1 = mnTrayPopup.GetSubMenu(0);
SetForegroundWindow();
mnItem1->TrackPopupMenu( TPM_RIGHTBUTTON | TPM_RIGHTALIGN,
CurPos.x, CurPos.y, this );
PostMessage( WM_NULL, 0, 0 );
}

Is this a VC7 bug? Or am I missing anything?

TIA.
Nov 19 '05 #1
1 912
I realized that this is my machine specific. In other words, it only happens
on my XP development machine where all kinds of developement tools are
installed.
I downloaded a program from
http://www.thecodeproject.com/shell/...00&msg=1285812
and the sample EXE also behaved same. Also Palm Desktop icon too.
However, Outlook2003 icon, Volume Control icon, Winzip icon, McAfee icon and
pcAnywhere icon behave correctly.

When those problematic programs were tested on the test machines, e.g.
Win2000 Server / Win2003 Server / XP, that overlapping doesn't occur.

Anyone know what could cause that problem?

Thanks!
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jon Bosker | last post by:
I have written an application that lives in the systray but when I try to close windows or logout it does not close my application and therefore prevents windows from shutting down or logging me...
2
by: Rosanne | last post by:
I have a menu written in javascript. I include that menu on an asp page. The aspx page contains both a listbox and a datagrid. There i one drop down menu that overlaps the place where the...
0
by: kapcreations | last post by:
I have a system tray app which gets the status of a windows service, and displays the appropriate icon for the status of the service in the systray. the problem I am having is the icon disapears...
0
by: kapcreations | last post by:
I have a system tray app which gets the status of a windows service, and displays the appropriate icon for the status of the service in the systray. the problem I am having is the icon disapears...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.