I did a tray icon, with a popup menu.
after I pressed the right click button, the popup menu showed,

but usually I left click anywhere else other than inside the popup menu will make my popup menu go away,,

but this time it won't go away,, I must click one of the items in the popup menu inorder for it to hide itself,,

can someone tell me y???

sorry for the bad english,,

thankx in adv,
Posted on 2002-07-10 21:47:44 by Yanda
This may be your problem:

From the Microsoft Knowledge Base article ID: Q135788 "Menus for
Notification Icons Do Not Work Correctly"
When you display a context menu for a notification icon (see
Shell_NotifyIcon), clicking anywhere besides the menu or the window
that created the menu (if it is visible) doesn't cause the menu to
disappear. When this behavior is corrected, the second time this menu
is displayed, it displays and then immediately disappears.

To correct the first behavior, you need to make the current window the
foreground window before calling TrackPopupMenu or TrackPopupMenuEx.

The second problem is caused by a problem with TrackPopupMenu. It is
necessary to force a task switch to the application that called
TrackPopupMenu at some time in the near future. This can be
accomplished by posting a benign message to the window or thread.

The following code will take care of all of this:

// Display the menu
TrackPopupMenu( hSubMenu,
PostMessage(hDlg, WM_NULL, 0, 0);

Posted on 2002-07-10 22:38:38 by Kayaker
thankx alots!!
Posted on 2002-07-11 00:20:53 by Yanda
It's most likely a windows bug. The windows mixer does this on all versions of windows.
Posted on 2002-07-12 09:01:18 by grv575