Valhalla Legends Forums Archive | Battle.net Bot Development | Menubar

AuthorMessageTime
Blade_360
How do you add a menu to a system tray icon (i.e. when you right click it how do you add your own custom menubar?)
January 18, 2003, 4:00 PM
Skywing
When you call Shell_NotifyIcon, you can specify a "callback message" and an HWND for it to be sent to.  Here's where this comes in handy... the shell sends you the "callback message" when a user right-clicks your tray icon, double clicks it, and so on.  You should test the lParam value when you receive this message for WM_RBUTTONDOWN to determine if you should display a pop-up menu.  If you receive this message, call SetForegroundWindow(hwnd_passed_to_wndproc) and then use TrackPopupMenu to display your menu.

You can check for WM_LBUTTONDBLCLK if you want to perform an action when the user double-clicks your tray icon.
January 18, 2003, 4:14 PM
Blade_360
Thanks I can't belive I didn't think of that on my own
>:( (Punches self)
January 20, 2003, 2:04 AM
JaMi
lol i can! everything skywing responds to takes reading atleast 3 times before its understood to me :p
January 20, 2003, 8:58 AM
Zakath
That's because you aren't familiar with how Windows actually deals with user interaction.
January 20, 2003, 12:16 PM
JaMi
this is correct, im not complaining though, Just stating that he actually makes me think, which in turn helps me learn :p
January 20, 2003, 4:17 PM

Search