Taskbar icons and menus

03-21-2003, 06:01 AM

This must be simple. but can I find it documented?

I have a little icon in the taskbar that pops up a menu when I left-click it.

There are two problems - one, having changed mind and decided not to select an option from the menu, it stays up when I move the mouse off it. It will not die. Ideally I would like it to go down the moment the mouse moves off, but will settle for losing it when I click on another window or the desktop. I can think of a couple of ways of doing this with timers, but none of them seem very elegant.

Second problem is probably even simpler - how do I refresh the taskbar to remove the icon when the program exits?



03-21-2003, 06:07 AM
To have a menu close when the mouse moves away is not normal behaviour, have you ever seen a menu do this? Having a menu close when another window is clicked is default behaviour and should be happening anyway.

As for the second problem, you just need to pass NIM_DELETE to the Shell_NotifyIcon function.

03-21-2003, 07:10 AM
Um, no this isn't working.

It doesn't matter what else I click on - the menu remains up until I click on something within it. Note that it doesn't block anything else from working but it does stay on top regardless.

Also, I am passing the NIM_DELETE to said function but this doesn't have an effect. The icon remains after termination until the mouse passes over it.


Any idea why?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum