Kaydet (Commit) 238108c5 authored tarafından Andras Timar's avatar Andras Timar

use defines from systools/win32/qswin32.h instead of duplication

Change-Id: I3d52308087412d1250b8ad64ffc308ca7cc414fd
üst d0bbbfde
...@@ -5,16 +5,13 @@ ...@@ -5,16 +5,13 @@
#include "StdAfx.h" #include "StdAfx.h"
#include "resource.h" #include "resource.h"
#include <systools/win32/uwinapi.h> #include <systools/win32/uwinapi.h>
#include <systools/win32/qswin32.h>
#include <stdio.h> #include <stdio.h>
// message used to communicate with soffice
#define LISTENER_WINDOWCLASS "SO Listener Class"
#define KILLTRAY_MESSAGE "SO KillTray"
bool SofficeRuns() bool SofficeRuns()
{ {
// check for soffice by searching the communication window // check for soffice by searching the communication window
return ( FindWindowEx( NULL, NULL, LISTENER_WINDOWCLASS, NULL ) == NULL ) ? false : true; return ( FindWindowEx( NULL, NULL, QUICKSTART_CLASSNAME, NULL ) == NULL ) ? false : true;
} }
bool launchSoffice( ) bool launchSoffice( )
...@@ -57,11 +54,11 @@ int APIENTRY WinMain(HINSTANCE /*hInstance*/, ...@@ -57,11 +54,11 @@ int APIENTRY WinMain(HINSTANCE /*hInstance*/,
{ {
if ( 0 == strcmp( __argv[i], "--killtray" ) ) if ( 0 == strcmp( __argv[i], "--killtray" ) )
{ {
HWND hwndTray = FindWindow( LISTENER_WINDOWCLASS, NULL ); HWND hwndTray = FindWindow( QUICKSTART_CLASSNAME, NULL );
if ( hwndTray ) if ( hwndTray )
{ {
UINT uMsgKillTray = RegisterWindowMessage( KILLTRAY_MESSAGE ); UINT uMsgKillTray = RegisterWindowMessage( SHUTDOWN_QUICKSTART_MESSAGE );
SendMessage( hwndTray, uMsgKillTray, 0, 0 ); SendMessage( hwndTray, uMsgKillTray, 0, 0 );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment