MFC tray icon
-
Hi folks! I want to program a tool that only stays as a tray-icon. My problem is how to design it in MFC. The application is a CWinApp, but without a Window in m_pMainWnd it closes immediately. How do I build an application that runs without a window? Do I need a valid hwnd for Shell_NotifyIcon()? (I tryed with NULL as hwnd and it seemed to work..) One solution may be to create a window but never show it. But perhaps there is a better way out there... :) Thanks! constantin
-
Hi folks! I want to program a tool that only stays as a tray-icon. My problem is how to design it in MFC. The application is a CWinApp, but without a Window in m_pMainWnd it closes immediately. How do I build an application that runs without a window? Do I need a valid hwnd for Shell_NotifyIcon()? (I tryed with NULL as hwnd and it seemed to work..) One solution may be to create a window but never show it. But perhaps there is a better way out there... :) Thanks! constantin
You could actually search this site... One of the very first articles here was a Tray icon application by Chris Maunder. Just search for tray icon etc. Iain.