system tray
-
Umm I have no idea where to look to find out how to make my MFC program run in the system tray, can someone please point me in a general direction, much appreciated
-
Umm I have no idea where to look to find out how to make my MFC program run in the system tray, can someone please point me in a general direction, much appreciated
-
If you want an icon in the system tray then go here[^] :-D JohnJ Time for a :java::java::java: but no :vegemite: http://www.rainbow-innov.co.uk[^]
I searched through the stuff but nothing came up, who feels like a loser now :P
-
I searched through the stuff but nothing came up, who feels like a loser now :P
Does the code you need? ////////////////////// #define WM_SYSTRAY WM_USER +100 BEGIN_MESSAGE_MAP(CAppDlg, CDialog) //{{AFX_MSG_MAP(CAppDlg) ON_MESSAGE(WM_SYSTRAY,OnNotifyMsg) END_MESSAGE_MAP() /////////////////////////////////////////////////////////// // add to systray NOTIFYICONDATA niData; HICON hIcon; hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); niData.cbSize = sizeof(NOTIFYICONDATA); niData.hWnd = m_hWnd; niData.uID = 100; niData.uFlags = NIF_ICON|NIF_MESSAGE|NIF_TIP; niData.hIcon = hIcon; niData.uCallbackMessage = WM_SYSTRAY; sprintf(niData.szTip,"app name"); Shell_NotifyIcon(NIM_DELETE ,&niData); /////////////////////////////////////////////////////////// // message handle afx_msg LRESULT CAppDlg::OnNotifyMsg(WPARAM wParam, LPARAM lParam) { switch(lParam) { case WM_LBUTTONDOWN: break; case WM_LBUTTONDBLCLK: this->OnRestore(); break; case WM_RBUTTONDOWN: .... } Our way isn't a soft-glass It is a mountain with path is rock But it goes towards, forward upward the sun.