diff options
author | Hennes Rohling <hro@openoffice.org> | 2001-09-18 12:36:53 +0000 |
---|---|---|
committer | Hennes Rohling <hro@openoffice.org> | 2001-09-18 12:36:53 +0000 |
commit | f76b8f7d95cf7571519de2531d7798ad6c996ce4 (patch) | |
tree | 0582ca510677883982a412ee5dda00e53b7582d0 /sysui/source | |
parent | 8349cdfd5e8042edf7cb92a21b75c62c282440ea (diff) |
#88505# Quickstart.exe param -killtray terminates system tray icon
Diffstat (limited to 'sysui/source')
-rw-r--r-- | sysui/source/win32/QuickStart/QuickStart.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sysui/source/win32/QuickStart/QuickStart.cpp b/sysui/source/win32/QuickStart/QuickStart.cpp index 43fb0455ea8e..07fef24402e5 100644 --- a/sysui/source/win32/QuickStart/QuickStart.cpp +++ b/sysui/source/win32/QuickStart/QuickStart.cpp @@ -12,6 +12,8 @@ #define TERMINATIONVETO_MESSAGE "SO TerminationVeto" #define TERMINATE_MESSAGE "SO Terminate" #define LISTENER_WINDOWCLASS "SO Listener Class" +#define KILLTRAY_MESSAGE "SO KillTray" + static UINT aTerminationVetoMessage = 0x7FFF; static UINT aTerminateMessage = 0x7FFF; static HMENU popupMenu = NULL; @@ -113,6 +115,24 @@ int APIENTRY WinMain(HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow) { + // Look for -killtray argument + + for ( int i = 1; i < __argc; i++ ) + { + if ( 0 == strcmp( __argv[i], "-killtray" ) ) + { + HWND hwndTray = FindWindow( LISTENER_WINDOWCLASS, NULL ); + + if ( hwndTray ) + { + UINT uMsgKillTray = RegisterWindowMessage( KILLTRAY_MESSAGE ); + SendMessage( hwndTray, uMsgKillTray, 0, 0 ); + } + + return 0; + } + } + launchSoffice(); return 0; |