Changeset 89 for trunk/gotcha.cpp
- Timestamp:
- Aug 24, 2020, 11:57:26 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gotcha.cpp
r65 r89 114 114 HMQ hmq = WinCreateMsgQueue (hab, 0); 115 115 116 // Load settings move up here so the string table is available for the already running error 117 pset = new SETTINGS; 116 118 //DisplayError("DEBUG", "%d", Version()); 117 119 #ifdef _QUIET_ … … 127 129 int rc; 128 130 HMTX hmtx = NULLHANDLE; 129 // running multiple instances orphans all but the first closedhook unloaded131 // running multiple instances orphans all but the first hook unloaded 130 132 rc = DosOpenMutexSem("\\SEM32\\GOTCHA", &hmtx); 131 133 if (!rc) { 132 DisplayError("GOTCHA QUIET Already running", 133 "Another instance of Gotcha Quiet is running. You can " 134 "open Gotcha Quiet's settings using the Alt+PrintScreen " 135 "key combination"); 134 DisplayError(RSTR (IDS_ERROR_ALREADYRUNNING), 135 RSTR (IDS_ERROR_ALREADYRUNNINGMSG)); 136 136 exit (0); 137 137 } … … 147 147 WinRegisterClass (hab, "thth.wc.gotcha.main", WindowProcedure, 0L, 148 148 sizeof (ULONG)*2L); 149 #ifndef _QUIET_ 149 150 WinRegisterClass (hab, "thth.wc.gotcha.snapshot", wpSnapshot, 150 151 CS_SIZEREDRAW, sizeof (ULONG)*2L); 151 152 #endif 152 153 // load the settings 153 pset = new SETTINGS;154 //pset = new SETTINGS; 154 155 155 156 pset->idleSetInIni = pset->QueryFlag(SEI_IDLEPRIORITY); … … 175 176 // create the windows 176 177 hwndFrame = CreateMainWindow (); 178 #ifndef _QUIET_ 177 179 hwndSnapshot = CreateSnapshotWindow (); 178 180 #endif 179 181 SWP swp; 180 182 USHORT us[7]; … … 196 198 StartInputHook (); 197 199 #endif 198 200 #ifndef _QUIET_ 199 201 // position snapshot window 200 202 pset->QueryWindowData (&swp, us); … … 207 209 else 208 210 WinShowWindow (hwndSnapshot, TRUE); 209 211 #endif 210 212 WinSetWindowPos (hwndFrame, NULLHANDLE, 0,0, 0,0, SWP_SHOW); 211 213 WinSetWindowPos (WinWindowFromID (hwndFrame, FID_CLIENT), NULLHANDLE, … … 231 233 pset->SetNumSaveDir (pset->pNumSaveDir); 232 234 } 235 #ifndef _QUIET_ 233 236 // save size, etc. of snapshot window 234 237 WinQueryWindowPos (hwndSnapshot, &swp); 235 238 pset->SetWindowData (&swp); 236 239 #endif 237 240 // save size, etc. of main window 238 241 WinQueryWindowPos (hwndFrame, &swp); … … 240 243 241 244 // goodbye windows! 245 #ifndef _QUIET_ 242 246 WinDestroyWindow (hwndSnapshot); 247 #endif 243 248 WinDestroyWindow (hwndFrame); 244 249
Note:
See TracChangeset
for help on using the changeset viewer.