Click here to Skip to main content
16,005,389 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Problem with System Tray Icons Pin
Perspx10-Jul-07 9:30
Perspx10-Jul-07 9:30 
GeneralRe: Problem with System Tray Icons Pin
jamestheprogrammer10-Jul-07 10:11
jamestheprogrammer10-Jul-07 10:11 
GeneralRe: Problem with System Tray Icons Pin
Perspx10-Jul-07 11:05
Perspx10-Jul-07 11:05 
AnswerRe: Problem with System Tray Icons Pin
Mark Salsbery10-Jul-07 10:12
Mark Salsbery10-Jul-07 10:12 
AnswerRe: Problem with System Tray Icons Pin
JudyL_MD10-Jul-07 10:26
JudyL_MD10-Jul-07 10:26 
GeneralRe: Problem with System Tray Icons Pin
jamestheprogrammer10-Jul-07 10:47
jamestheprogrammer10-Jul-07 10:47 
GeneralRe: Problem with System Tray Icons Pin
Mark Salsbery10-Jul-07 11:58
Mark Salsbery10-Jul-07 11:58 
GeneralRe: Problem with System Tray Icons Pin
Mark Salsbery10-Jul-07 12:02
Mark Salsbery10-Jul-07 12:02 
You're not receiving any messages from the icon, right?

In your code you show

/* in the callback for HiddenWindow */
...

What is the callback? You should be looking for the MSG_STATUSICON message in the windowproc for
the HWND passed to Shell_NotifyIcon().
LRESULT CALLBACK MyWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
   if (MSG_STATUSICON == uMsg)
   {
      UINT IconID = (UINT)wParam;
 
      switch((UINT)lParam)
      {
         case WM_RBUTTONUP:
         ...
         case WM_CONTEXTMENU:
         ...
         case WM_LBUTTONDBLCLK:
         ...
         case WM_LBUTTONDOWN:
         ...
         case WM_RBUTTONDOWN:
         ...
         default:
         ...
      }
   }
...
}


Mark




Mark Salsbery
Microsoft MVP - Visual C++


This episode brought to you by the number 3

GeneralRe: Problem with System Tray Icons Pin
jamestheprogrammer10-Jul-07 12:20
jamestheprogrammer10-Jul-07 12:20 
GeneralRe: Problem with System Tray Icons Pin
Mark Salsbery10-Jul-07 12:39
Mark Salsbery10-Jul-07 12:39 
AnswerRe: Problem with System Tray Icons Pin
jamestheprogrammer10-Jul-07 13:07
jamestheprogrammer10-Jul-07 13:07 
AnswerRe: Resource leaks Pin
David Crow10-Jul-07 8:06
David Crow10-Jul-07 8:06 
GeneralRe: Resource leaks Pin
tom groezer10-Jul-07 8:17
tom groezer10-Jul-07 8:17 
GeneralRe: Resource leaks Pin
Hamid_RT10-Jul-07 8:51
Hamid_RT10-Jul-07 8:51 
QuestionDeviceIoControl fails Pin
VC_RYK10-Jul-07 6:46
VC_RYK10-Jul-07 6:46 
AnswerRe: DeviceIoControl fails Pin
James R. Twine10-Jul-07 7:01
James R. Twine10-Jul-07 7:01 
QuestionAdding Pictures in Excel via Automation in VC++ Pin
priyankalakhe10-Jul-07 6:08
priyankalakhe10-Jul-07 6:08 
QuestionUnable to execute MFC Application on a machine where that app hasn't been built(Strange) Pin
Mushtaque Nizamani10-Jul-07 5:46
Mushtaque Nizamani10-Jul-07 5:46 
AnswerRe: Unable to execute MFC Application on a machine where that app hasn't been built(Strange) Pin
DevMentor.org10-Jul-07 6:06
DevMentor.org10-Jul-07 6:06 
GeneralRe: Unable to execute MFC Application on a machine where that app hasn't been built(Strange) Pin
Mushtaque Nizamani10-Jul-07 6:20
Mushtaque Nizamani10-Jul-07 6:20 
GeneralRe: Unable to execute MFC Application on a machine where that app hasn't been built(Strange) Pin
David Crow10-Jul-07 7:03
David Crow10-Jul-07 7:03 
GeneralRe: Unable to execute MFC Application on a machine where that app hasn't been built(Strange) Pin
Mushtaque Nizamani10-Jul-07 20:29
Mushtaque Nizamani10-Jul-07 20:29 
AnswerRe: Unable to execute MFC Application on a machine where that app hasn't been built(Strange) Pin
Mark Salsbery10-Jul-07 6:13
Mark Salsbery10-Jul-07 6:13 
AnswerRe: Unable to execute MFC Application on a machine where that app hasn't been built(Strange) Pin
James R. Twine10-Jul-07 6:32
James R. Twine10-Jul-07 6:32 
GeneralRe: Unable to execute MFC Application on a machine where that app hasn't been built(Strange) Pin
DevMentor.org11-Jul-07 12:33
DevMentor.org11-Jul-07 12:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.