8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 10:43:03 +01:00
This commit is contained in:
dimitr 2003-01-17 08:47:01 +00:00
parent 63920135d6
commit d88736b74b
2 changed files with 13 additions and 14 deletions

View File

@ -211,18 +211,18 @@ static int WINDOW_main(int option)
unsigned long thread_id; unsigned long thread_id;
/* Make sure that there is only 1 instance of the guardian running */ /* 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) { if (hWnd) {
char szMsgString[256]; char szMsgString[256];
LoadString(hInstance_gbl, IDS_ALREADYSTARTED, 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); gds__log(szMsgString);
return 0; return 0;
} }
/* initialize main window */ /* initialize main window */
wcl.hInstance = hInstance_gbl; wcl.hInstance = hInstance_gbl;
wcl.lpszClassName = CLASS_NAME; wcl.lpszClassName = GUARDIAN_CLASS_NAME;
wcl.lpfnWndProc = WindowFunc; wcl.lpfnWndProc = WindowFunc;
wcl.style = 0; wcl.style = 0;
wcl.hIcon = LoadIcon(hInstance_gbl, MAKEINTRESOURCE(IDI_IBGUARD)); wcl.hIcon = LoadIcon(hInstance_gbl, MAKEINTRESOURCE(IDI_IBGUARD));
@ -235,13 +235,13 @@ static int WINDOW_main(int option)
if (!RegisterClass(&wcl)) { if (!RegisterClass(&wcl)) {
char szMsgString[256]; char szMsgString[256];
LoadString(hInstance_gbl, IDS_REGERROR, 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; return 0;
} }
hWnd = CreateWindowEx(0, hWnd = CreateWindowEx(0,
CLASS_NAME, GUARDIAN_CLASS_NAME,
APP_NAME, GUARDIAN_APP_NAME,
WS_DLGFRAME | WS_SYSMENU | WS_MINIMIZEBOX, WS_DLGFRAME | WS_SYSMENU | WS_MINIMIZEBOX,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
@ -261,7 +261,7 @@ static int WINDOW_main(int option)
/* error starting server thread */ /* error starting server thread */
char szMsgString[256]; char szMsgString[256];
LoadString(hInstance_gbl, IDS_CANT_START_THREAD, 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); gds__log(szMsgString);
DestroyWindow(hWnd); DestroyWindow(hWnd);
return (FALSE); return (FALSE);
@ -436,7 +436,7 @@ static LRESULT CALLBACK WindowFunc(
nid.uFlags = NIF_TIP | NIF_ICON | NIF_MESSAGE; nid.uFlags = NIF_TIP | NIF_ICON | NIF_MESSAGE;
nid.uCallbackMessage = ON_NOTIFYICON; nid.uCallbackMessage = ON_NOTIFYICON;
nid.hIcon = hIcon; 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 */ /* This will be true if we are using the explorer interface */
bInTaskBar = Shell_NotifyIcon(NIM_ADD, &nid); bInTaskBar = Shell_NotifyIcon(NIM_ADD, &nid);
@ -777,7 +777,7 @@ HWND DisplayPropSheet(HWND hParentWnd, HINSTANCE hInst)
PSHdr.hwndParent = hParentWnd; PSHdr.hwndParent = hParentWnd;
PSHdr.hInstance = hInstance; PSHdr.hInstance = hInstance;
PSHdr.pszIcon = MAKEINTRESOURCE(IDI_IBGUARD); PSHdr.pszIcon = MAKEINTRESOURCE(IDI_IBGUARD);
PSHdr.pszCaption = (LPSTR) APP_LABEL; PSHdr.pszCaption = (LPSTR) GUARDIAN_APP_LABEL;
PSHdr.nPages = FB_NELEM(PSPages); PSHdr.nPages = FB_NELEM(PSPages);
PSHdr.nStartPage = 0; PSHdr.nStartPage = 0;
PSHdr.ppsp = (LPCPROPSHEETPAGE) & PSPages; PSHdr.ppsp = (LPCPROPSHEETPAGE) & PSPages;

View File

@ -16,9 +16,9 @@
* All Rights Reserved. * All Rights Reserved.
* Contributor(s): ______________________________________. * Contributor(s): ______________________________________.
*/ */
#define APP_NAME "Firebird Guardian" #define GUARDIAN_APP_NAME "Firebird Guardian"
#define APP_LABEL "Firebird Guardian" #define GUARDIAN_APP_LABEL "Firebird Guardian"
#define CLASS_NAME "IB_Guard" #define GUARDIAN_CLASS_NAME "FB_Guard"
#define FBSERVER "fbserver.exe" #define FBSERVER "fbserver.exe"
#define GUARDIAN_HELP_FILE "fbserver.hlp" #define GUARDIAN_HELP_FILE "fbserver.hlp"
@ -27,8 +27,7 @@
#define ibs_guard_version 8080 #define ibs_guard_version 8080
#define ibs_guard_log 8090 #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_ONCE 0
#define START_FOREVER 1 #define START_FOREVER 1