00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef LAUNCHUTIL_H
00016 #define LAUNCHUTIL_H
00017
00018 #include "CString.h"
00019
00020 #define WINDOWS_LEAN_AND_MEAN
00021 #include <windows.h>
00022 #include <sys/types.h>
00023 #include <sys/stat.h>
00024
00025 #define CLIENT_APP "synergyc.exe"
00026 #define SERVER_APP "synergys.exe"
00027 #define CONFIG_NAME "synergy.sgc"
00028
00029 class CConfig;
00030
00031
00032 extern HINSTANCE s_instance;
00033
00034 CString getString(DWORD id);
00035 CString getErrorString(DWORD error);
00036
00037 void showError(HWND hwnd, const CString& msg);
00038 void askOkay(HWND hwnd, const CString& title,
00039 const CString& msg);
00040 bool askVerify(HWND hwnd, const CString& msg);
00041 bool isShowingDialog();
00042
00043 void setWindowText(HWND hwnd, const CString& msg);
00044 CString getWindowText(HWND hwnd);
00045
00046 HWND getItem(HWND hwnd, int id);
00047 void enableItem(HWND hwnd, int id, bool enabled);
00048
00049 void setItemChecked(HWND, bool);
00050 bool isItemChecked(HWND);
00051
00052 CString getAppPath(const CString& appName);
00053
00054 bool isConfigNewer(time_t&, bool userConfig);
00055 bool loadConfig(CConfig& config, time_t&, bool& userConfig);
00056 bool saveConfig(const CConfig& config,
00057 bool sysOnly, time_t&);
00058
00059 const TCHAR* const* getSettingsPath();
00060
00061 #endif