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?)
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.
Thanks I can't belive I didn't think of that on my own
>:( (Punches self)
lol i can! everything skywing responds to takes reading atleast 3 times before its understood to me :p
That's because you aren't familiar with how Windows actually deals with user interaction.
this is correct, im not complaining though, Just stating that he actually makes me think, which in turn helps me learn :p