Changeset 55 for trunk/gotcha.cpp


Ignore:
Timestamp:
Jun 2, 2018, 12:45:45 AM (7 years ago)
Author:
Gregg Young
Message:

Update resources to get Gotcha! working in all languages; Reformat and update language tab in settings and about dialog; Clean up settings notebook formatting; Optimize turning PM print screen on and off. Fix screen region capture of its confirmation dialog. Move additional strings from code to the STRINGTABLE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gotcha.cpp

    r52 r55  
    109109    if ((Version() < 2))
    110110    {
    111         DisplayError("GOTCHDLL.DLL TOO OLD",
    112                      "The file gotchdll.dll is to old for this version of "
    113                      "Gotcha! Quiet As you should have received a sufficiently "
    114                      "new version with the program, check if an older "
    115                      "version of gotchdll.dll is still residing somewhere "
    116                      "in your LIBPATH. And did you actually copy the new "
    117                      "gotchdll.dll to some directory in your LIBPATH?");
     111        DisplayError("GOTCHDLL.DLL Outdated",
     112                     "The file gotchdll.dll is is outdated. You should have "
     113                     "received a new version with the program, check for an "
     114                     "older version of gotchdll.dll in your LIBPATH. Is the "
     115                     "new gotchdll.dll in a directory in your LIBPATH?");
    118116        exit (0);
    119117    }
     
    123121    rc = DosOpenMutexSem("\\SEM32\\GOTCHA", &hmtx);
    124122    if (!rc) {
    125         DisplayError("GOTCHA QUIET ALREADY RUNNING",
    126                      "Another instance of Gotcha Quiet is running."
    127                      " You can open Gotcha Quiet's settings using"
    128                      " the Alt+Print Screen key combination");
     123        DisplayError("GOTCHA QUIET Already running",
     124                     "Another instance of Gotcha Quiet is running. You can "
     125                     "open Gotcha Quiet's settings using the Alt+PrintScreen "
     126                     "key combination");
    129127        exit (0);
    130128    }
     
    155153    bool fPrtScr = FALSE;
    156154    // always turn it off while running
     155    // WinSet does not effect the ini setting
    157156    WinSetSysValue(HWND_DESKTOP, SV_PRINTSCREEN , fPrtScr);
    158     // WinSet does not effect the ini setting
    159     ULONG ulDataSize = 0;
    160     rc = PrfQueryProfileSize(HINI_USERPROFILE, "PM_ControlPanel", "PrintScreen",
    161                              &ulDataSize );
    162     rc = PrfQueryProfileData(HINI_USERPROFILE, "PM_ControlPanel", "PrintScreen",
    163                              &fPrtScr, &ulDataSize);
    164     if (!rc) // Print screen is on by default (no ini entry)
    165         fPrtScr = TRUE;
    166157#endif
    167158    // check cmd line args and if "-a" found take screenshot and exit
     
    245236#ifdef _QUIET_
    246237    // Reset to user PM print screen choice
     238    ULONG ulDataSize = 0;
     239    rc = PrfQueryProfileSize(HINI_USERPROFILE, "PM_ControlPanel", "PrintScreen",
     240                             &ulDataSize );
     241    rc = PrfQueryProfileData(HINI_USERPROFILE, "PM_ControlPanel", "PrintScreen",
     242                             &fPrtScr, &ulDataSize);
     243    if (!rc) // Print screen is on by default (no ini entry)
     244        fPrtScr = TRUE;
    247245    WinSetSysValue(HWND_DESKTOP, SV_PRINTSCREEN , fPrtScr);
    248246    StopInputHook ();
     
    301299
    302300  memset(mb2dBut, 0, sizeof(MB2D) * 3);
    303   strcpy(mb2dBut[0].achText,"Ok");
    304   strcpy(mb2dBut[1].achText,"Cancel");
    305   strcpy(mb2dBut[2].achText,"Settings");
     301  strcpy(mb2dBut[0].achText,RSTR(IDS_OK));
     302  strcpy(mb2dBut[1].achText,RSTR(IDS_CANCEL));
     303  strcpy(mb2dBut[2].achText,RSTR(IDS_SETTINGS));
    306304  mb2dBut[0].idButton = 1;
    307305  mb2dBut[1].idButton = 2;
Note: See TracChangeset for help on using the changeset viewer.