CWinApp Tray Application
Posted on 1998-12-08
I have a standard C App using WinMain and a dispatch function, but I want to convert into using a CWinApp, and the class wizard, for dialogs and stuff. I have 2 menus IDR_LEFT_MENU and IDR_RIGHT_MENU, for use when the user uses the left and right buttons on the tray icon.
I have had a go at converting my ShellNotify stuff, but it doesn't stay in the tray. I don't know where to put the MenuHandler either.
Thoereticaly (as far as I can work out), I just need 3 functions (maybe 4)
On InitInstance() - create a NOTIFYICON thingy and NIM_ADD it. (need to create an hwnd??)
On ExitInstance NIM_DELETE NOTIFYICON thingy.
On left button pressed on icon - trackMenuEx(LeftMenu)
On rightbutton pressed on icon - trackMenuEx(RightMenu)
How wrong is this?
Can anyone provide a very simple shell and explanation?