System Tray Zugriff
-
Hallo!
Ich möchte gerne auf ein Programm zugreifen, das im System Tray ist.
Wie kann man das in MFC 6.0 am besten realisieren.Danke
werna
-
Dein Programm ist nicht im Systray. Es wir lediglich dort ein ICON eingeblendet.
Dein Programm kannst du dabei auf WindowEnable(false) setzen.Das Systraynachrichten bekommt man in OnTrayMessage.
Da kann man z.B. abfangen:switch (lparam) { case WM_RBUTTONDOWN: {// The user clicked the right mouse button. // Let's give them a menu so they can start/stop //// the animation. //CMenu oMenu; //if (oMenu.LoadMenu(IDR_MENU1)) //{ // CMenu* pPopup = oMenu.GetSubMenu(0); // ASSERT(pPopup != NULL); // CPoint oPoint; // // Figure out where the mouse is so we // // can display the menu near it. // GetCursorPos(&oPoint); // SetForegroundWindow(); // pPopup->TrackPopupMenu( // TPM_LEFTALIGN | TPM_RIGHTBUTTON, // oPoint.x, oPoint.y, this); //} } break; case WM_LBUTTONDBLCLK: { ShowWindow(SW_SHOW); ShowWindow(SW_RESTORE); } }Shreib mal genauer was du willst.
-
Er möchte auf ein anderes Programm zugreifen, welches im Systray liegt.
Devil