Changeset 52
- Timestamp:
- Apr 12, 2018, 9:12:11 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gotcha.cpp
r50 r52 154 154 #ifdef _QUIET_ 155 155 bool fPrtScr = FALSE; 156 // always turn it off while running 157 WinSetSysValue(HWND_DESKTOP, SV_PRINTSCREEN , fPrtScr); 158 // WinSet does not effect the ini setting 156 159 ULONG ulDataSize = 0; 157 158 rc = PrfQueryProfileSize( HINI_PROFILE, "PM_ControlPanel", "PrintScreen", 160 rc = PrfQueryProfileSize(HINI_USERPROFILE, "PM_ControlPanel", "PrintScreen", 159 161 &ulDataSize ); 160 162 rc = PrfQueryProfileData(HINI_USERPROFILE, "PM_ControlPanel", "PrintScreen", 161 163 &fPrtScr, &ulDataSize); 162 bool temp = FALSE;// always turn it off while running 163 PrfWriteProfileData(HINI_USERPROFILE, "PM_ControlPanel", 164 "PrintScreen", &temp, sizeof(bool)); 165 PrfQueryProfileSize(pset->QueryPrfHandle (), "PM", 166 "PrintScreen", &ulDataSize ); 167 int rc1 = PrfQueryProfileData(pset->QueryPrfHandle (), "PM", 168 "PrintScreen", &temp, &ulDataSize); 169 bool temp2 = TRUE; 170 PrfQueryProfileData(pset->QueryPrfHandle (), "PM", 171 "PrintScreen", &temp2, &ulDataSize); 172 if (!rc1 || (temp2 && (temp != fPrtScr))) { // no entry or user has changed PM setting 173 if (!rc) // Print screen is on by default (no ini entry) 174 fPrtScr = TRUE; 175 PrfWriteProfileData(pset->QueryPrfHandle (), "PM", 176 "PrintScreen", &fPrtScr, sizeof(bool)); 177 } 178 temp = FALSE; 179 PrfWriteProfileData(pset->QueryPrfHandle (), "PM", 180 "Exited", &temp, sizeof(bool)); 164 if (!rc) // Print screen is on by default (no ini entry) 165 fPrtScr = TRUE; 181 166 #endif 182 167 // check cmd line args and if "-a" found take screenshot and exit … … 259 244 260 245 #ifdef _QUIET_ 261 PrfQueryProfileSize(pset->QueryPrfHandle (), "PM", 262 "PrintScreen", &ulDataSize ); 263 PrfQueryProfileData(pset->QueryPrfHandle (), "PM", 264 "PrintScreen", &fPrtScr, &ulDataSize); 265 PrfWriteProfileData(HINI_USERPROFILE, "PM_ControlPanel", "PrintScreen", 266 &fPrtScr, sizeof(bool)); 267 temp = TRUE; 268 PrfWriteProfileData(pset->QueryPrfHandle (), "PM", 269 "Exited", &temp, sizeof(bool)); 270 246 // Reset to user PM print screen choice 247 WinSetSysValue(HWND_DESKTOP, SV_PRINTSCREEN , fPrtScr); 271 248 StopInputHook (); 272 249 DosCloseMutexSem(hmtx); … … 383 360 VOID SetIdlePriority (BOOL f) 384 361 { 385 #if 0 //#ifndef _QUEIT_362 #ifndef _QUEIT_ 386 363 if (f) 387 364 DosSetPriority(PRTYS_PROCESS, PRTYC_IDLETIME, 0, 0);
Note:
See TracChangeset
for help on using the changeset viewer.