From d88736b74b9f71980c7d1f882e179c4ef4902d58 Mon Sep 17 00:00:00 2001 From: dimitr Date: Fri, 17 Jan 2003 08:47:01 +0000 Subject: [PATCH] Cleanup. --- src/iscguard/iscguard.cpp | 18 +++++++++--------- src/iscguard/iscguard.h | 9 ++++----- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/iscguard/iscguard.cpp b/src/iscguard/iscguard.cpp index 5eefe9b18d..a1199d0831 100644 --- a/src/iscguard/iscguard.cpp +++ b/src/iscguard/iscguard.cpp @@ -211,18 +211,18 @@ static int WINDOW_main(int option) unsigned long thread_id; /* Make sure that there is only 1 instance of the guardian running */ - hWnd = FindWindow(CLASS_NAME, APP_NAME); + hWnd = FindWindow(GUARDIAN_CLASS_NAME, GUARDIAN_APP_NAME); if (hWnd) { char szMsgString[256]; LoadString(hInstance_gbl, IDS_ALREADYSTARTED, szMsgString, 256); - MessageBox(NULL, szMsgString, APP_LABEL, MB_OK | MB_ICONHAND); + MessageBox(NULL, szMsgString, GUARDIAN_APP_LABEL, MB_OK | MB_ICONHAND); gds__log(szMsgString); return 0; } /* initialize main window */ wcl.hInstance = hInstance_gbl; - wcl.lpszClassName = CLASS_NAME; + wcl.lpszClassName = GUARDIAN_CLASS_NAME; wcl.lpfnWndProc = WindowFunc; wcl.style = 0; wcl.hIcon = LoadIcon(hInstance_gbl, MAKEINTRESOURCE(IDI_IBGUARD)); @@ -235,13 +235,13 @@ static int WINDOW_main(int option) if (!RegisterClass(&wcl)) { char szMsgString[256]; LoadString(hInstance_gbl, IDS_REGERROR, szMsgString, 256); - MessageBox(NULL, szMsgString, APP_LABEL, MB_OK); + MessageBox(NULL, szMsgString, GUARDIAN_APP_LABEL, MB_OK); return 0; } hWnd = CreateWindowEx(0, - CLASS_NAME, - APP_NAME, + GUARDIAN_CLASS_NAME, + GUARDIAN_APP_NAME, WS_DLGFRAME | WS_SYSMENU | WS_MINIMIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, @@ -261,7 +261,7 @@ static int WINDOW_main(int option) /* error starting server thread */ char szMsgString[256]; LoadString(hInstance_gbl, IDS_CANT_START_THREAD, szMsgString, 256); - MessageBox(NULL, szMsgString, APP_LABEL, MB_OK); + MessageBox(NULL, szMsgString, GUARDIAN_APP_LABEL, MB_OK); gds__log(szMsgString); DestroyWindow(hWnd); return (FALSE); @@ -436,7 +436,7 @@ static LRESULT CALLBACK WindowFunc( nid.uFlags = NIF_TIP | NIF_ICON | NIF_MESSAGE; nid.uCallbackMessage = ON_NOTIFYICON; nid.hIcon = hIcon; - lstrcpy(nid.szTip, APP_LABEL); + lstrcpy(nid.szTip, GUARDIAN_APP_LABEL); /* This will be true if we are using the explorer interface */ bInTaskBar = Shell_NotifyIcon(NIM_ADD, &nid); @@ -777,7 +777,7 @@ HWND DisplayPropSheet(HWND hParentWnd, HINSTANCE hInst) PSHdr.hwndParent = hParentWnd; PSHdr.hInstance = hInstance; PSHdr.pszIcon = MAKEINTRESOURCE(IDI_IBGUARD); - PSHdr.pszCaption = (LPSTR) APP_LABEL; + PSHdr.pszCaption = (LPSTR) GUARDIAN_APP_LABEL; PSHdr.nPages = FB_NELEM(PSPages); PSHdr.nStartPage = 0; PSHdr.ppsp = (LPCPROPSHEETPAGE) & PSPages; diff --git a/src/iscguard/iscguard.h b/src/iscguard/iscguard.h index d24df8a73a..53bbe50480 100644 --- a/src/iscguard/iscguard.h +++ b/src/iscguard/iscguard.h @@ -16,9 +16,9 @@ * All Rights Reserved. * Contributor(s): ______________________________________. */ -#define APP_NAME "Firebird Guardian" -#define APP_LABEL "Firebird Guardian" -#define CLASS_NAME "IB_Guard" +#define GUARDIAN_APP_NAME "Firebird Guardian" +#define GUARDIAN_APP_LABEL "Firebird Guardian" +#define GUARDIAN_CLASS_NAME "FB_Guard" #define FBSERVER "fbserver.exe" #define GUARDIAN_HELP_FILE "fbserver.hlp" @@ -27,8 +27,7 @@ #define ibs_guard_version 8080 #define ibs_guard_log 8090 -#define ON_NOTIFYICON WM_USER+2 -#define WM_SWITCHICONS WM_USER+3 +#define WM_SWITCHICONS WM_USER + 3 #define START_ONCE 0 #define START_FOREVER 1