Index: unk/about.cpp
===================================================================
--- /trunk/about.cpp	(revision 169)
+++ 	(revision )
@@ -1,81 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-
-#include "gotcha.h"
-
-#ifndef _QUIET_
-MRESULT EXPENTRY AboutWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
-{
-
-    switch (msg) {
-    case WM_INITDLG:{
-
-        HMQ hmq;
-        BOOL bUniCodeFont = FALSE;
-        CHAR ucFont[FACESIZE];
-        CHAR       ucLangStr[300];
-        INT i;
-        
-        if (pset->GetLangID() == RU) {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 866);
-            bUniCodeFont = TRUE;
-        }
-        else if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 852);
-            bUniCodeFont = TRUE;
-        }
-        else {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 850);
-        }
-
-        if (bUniCodeFont) {
-            strcpy(ucFont, "9.Times New Roman MT 30");
-            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-        }
-        for (i = 0; i < WID_ST_END - 400; i++) {
-                WinLoadString(hab, g_hmod, LANG_COPYRIGHT + i, sizeof(ucLangStr), ucLangStr);
-                WinSetDlgItemText(hwnd, WID_ST_COPYRIGHT + i, ucLangStr);
-            }
-        return (MRESULT) TRUE;
-    }
-    case WM_COMMAND:
-	switch (SHORT1FROMMP(mp1)) {
-	case DID_OK:
-	case DID_CANCEL:
-	    WinPostMsg(WinQueryWindow(hwnd, QW_OWNER), msg, mp1, mp2);
-	    break;
-	default:
-	    return WinDefDlgProc(hwnd, msg, mp1, mp2);
-	}
-	break;
-    default:
-        return WinDefDlgProc(hwnd, msg, mp1, mp2);
-    }
-    return 0;
-}
-
-VOID AboutBox (HWND hwnd)
-{
-    WinDlgBox (HWND_DESKTOP, hwnd, AboutWndProc, GETMODULE, ID_DLG_ABOUT, NULL);
-}
-
-#endif
Index: unk/bitmap.cpp
===================================================================
--- /trunk/bitmap.cpp	(revision 169)
+++ 	(revision )
@@ -1,284 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-
-// ** CaptureWindow ******************************************************* /*FOLD00*/
-#include <ctype.h>
-#define MAX_WAIT   15
-
-HBITMAP CaptureWindow (HWND hwnd, HWND hwndParent, PRECTL prcl, BOOL f)
-{
-#ifdef _DOLOGMEM_
-    LogMem("CaptureWindow", TRUE);
-#endif
-    static PSZ pszData[4] = { "Display", NULL, NULL, NULL };
-    SIZEL   sizlPage = {0, 0};
-    POINTL  aptl[3];
-    LONG    alData[2];
-    SWP     swp;
-    SHORT   sWidth, sHeight;
-    CHAR    ach[32] = {0};
-
-    // wait for the selected window to rise to the surface
-    if (f)
-    {
-        WinSetFocus(HWND_DESKTOP, hwndParent);
-        // FIXME uh, yukki! polling! but seems to be the easiest way for now.
-        for (USHORT i = 0; i < MAX_WAIT; i++)
-        {
-            DosSleep (100);
-            if (hwndParent == WinQueryFocus(HWND_DESKTOP)) {
-                break;
-            }
-            else
-            {
-                // check if topmost window is a menu
-                WinQueryClassName (WinQueryFocus(HWND_DESKTOP),
-                                   sizeof (ach), ach);
-                if (stricmp (ach, "#4") == 0)
-                    break;
-            }
-            WinQueryWindowPos (hwndParent, &swp);
-            if ((swp.hwndInsertBehind == HWND_TOP) ||
-                (swp.hwndInsertBehind == hwndSnapshot)) {
-                break;
-            }
-            else
-            {
-                // check if topmost window is a menu
-                WinQueryClassName (swp.hwndInsertBehind, sizeof (ach), ach);
-                if (stricmp (ach, "#4") == 0)
-                    break;
-            }
-        }
-    }
-
-    // if no capture rectangle given, we'll take the whole window
-    if (! prcl)
-    {
-        WinQueryWindowPos (hwnd, &swp);
-        sWidth  = swp.cx;
-        sHeight = swp.cy;
-    }
-    else
-    {
-        sWidth  = prcl->xRight-prcl->xLeft+1;
-        sHeight = prcl->yTop-prcl->yBottom+1;
-    }
-
-    /* create the memory device context and presentation space so they
-     are compatible with the screen device context and presentation space */
-    HDC hdcMem =
-        DevOpenDC (hab, OD_MEMORY, "*", 4, PDEVOPENDATA (pszData), 0);
-    HPS hpsMem =
-        GpiCreatePS (hab, hdcMem, &sizlPage, PU_PELS| GPIA_ASSOC| GPIT_MICRO);
-
-    // determine the device's plane/bit-count format
-    GpiQueryDeviceBitmapFormats (hpsMem, 2, alData);
-
-    // FIXME even if it seems to work ...
-    if (alData[1] == 16)
-        alData[1] = 24;
-
-    BITMAPINFOHEADER2 bmp;
-
-    /* load the BITMAPINFOHEADER2 and BITMAPINFO2 structures. The sWidth and
-     sHeight fields specify the width and height of the destination rect. */
-    bmp.cbFix           = ULONG (sizeof(BITMAPINFOHEADER2));
-    bmp.cx              = sWidth;
-    bmp.cy              = sHeight;
-    bmp.cPlanes         = alData[0];
-    bmp.cBitCount       = alData[1];
-
-    bmp.ulCompression   = BCA_UNCOMP;
-    /*SOME STUFF MISSING IN THIS STATEMENT: 1 << bmp.cPlanes) *
-                             (1 << bmp.cBitCount)) + 31) / 32) * sHeight;*/
-    bmp.cxResolution    = 0;
-    bmp.cyResolution    = 0;
-    bmp.cclrUsed        = 0;
-    bmp.cclrImportant   = 0;
-
-    bmp.usUnits         = BRU_METRIC;
-    bmp.usReserved      = 0;
-    bmp.usRecording     = BRA_BOTTOMUP;
-    bmp.usRendering     = BRH_NOTHALFTONED;
-    bmp.cSize1          = 0;
-    bmp.cSize2          = 0;
-    bmp.ulColorEncoding = BCE_RGB;
-    bmp.ulIdentifier    = 0;
-
-    // create a bit map that is compatible with the display
-    HBITMAP hbm = GpiCreateBitmap (hpsMem, &bmp, 0L, NULL, NULL/*pbmi*/);
-
-    // associate the bit map and the memory presentation space
-    HBITMAP hbmOld = GpiSetBitmap (hpsMem, hbm);
-
-    /* Copy the screen to the bit map.                                  */
-    aptl[0].x = 0;       /* Lower-left corner of destination rectangle  */
-    aptl[0].y = 0;       /* Lower-left corner of destination rectangle  */
-    aptl[1].x = sWidth;  /* Upper-right corner of destination rectangle */
-    aptl[1].y = sHeight; /* Upper-right corner of destination rectangle */
-
-    if (! prcl)
-    {
-        aptl[2].x = 0;       /* Lower-left corner of source rectangle       */
-        aptl[2].y = 0;       /* Lower-left corner of source rectangle       */
-    }
-    else
-    {
-        aptl[2].x = prcl->xLeft;       /* Lower-left corner of source rectangle       */
-        aptl[2].y = prcl->yBottom;       /* Lower-left corner of source rectangle       */
-    }
-
-    HPS hps;
-
-    // esp. important if serial capture enabled: window may have been closed!
-    if (WinIsWindow (GETHAB, hwnd) || (hwnd == HWND_DESKTOP))
-        hps = WinGetPS (hwnd);
-    else
-    {
-        GpiDeleteBitmap (hbm);
-        DevCloseDC (hdcMem);
-        return NULL;
-    }
-
-    GpiBitBlt (hpsMem, hps,
-               sizeof (aptl) / sizeof (POINTL), /* Number of points in aptl */
-               aptl, ROP_SRCCOPY, BBO_IGNORE);
-
-    SWCNTRL  swctl;
-    PID      pid;
-    TID      tid;
-    BOOL screen = FALSE, region = FALSE;
-    CHAR title[11];
-
-    if (!f) {
-        //hwndParent = WinQueryFocus(HWND_DESKTOP);
-        if (hwndParent == hwndFrame) {
-            hwndParent = WinQueryWindow(hwndFrame, QW_NEXTTOP );
-        }
-        screen = TRUE;
-        if (prcl)
-            region = TRUE;
-    }
-
-    int rc = WinQueryWindowProcess(hwndParent, &pid, &tid);
-    if (WinQuerySwitchEntry(WinQuerySwitchHandle(hwndParent, pid),
-                            &swctl))
-        WinQuerySwitchEntry(WinQuerySwitchHandle(NULLHANDLE, pid),
-                            &swctl);
-
-    char buffer[MAXNAMEL+4];
-    int length = strlen( swctl.szSwtitle );
-    strcpy(buffer, swctl.szSwtitle);
-    char *p;
-    p = buffer;
-    for (int i = 0; i < (length < 11 ? length : 11); i++) {
-        if ( ispunct( *p ) || *p == '\\' || isblank( *p )) {
-            *p = '_';
-        }
-        p++;
-    }
-
-    if (region)
-        snprintf( title, length < 8 ? length + 3 : 11, "SR%s", buffer);
-    else if (screen)
-        snprintf( title, length < 8 ? length + 3 : 11, "SC%s", buffer);
-    else
-        snprintf( title, length < 8 ? length + 3 : 11, "WD%s", buffer);
-
-    SaveBitmap (hbm, hpsMem, sWidth, sHeight, bmp.cBitCount, title);
-
-    // re-associate the previous bit map and the memory presentation space
-    GpiSetBitmap (hpsMem, hbmOld);
-
-    GpiDeleteBitmap (hbm);
-    WinReleasePS (hps);
-    GpiDestroyPS (hps);
-    DevCloseDC (hdcMem);
-
-#ifdef _DOLOGMEM_
-    LogMem("CaptureWindow", FALSE);
-#endif
-
-    return hbm;
-}
-
-// ** DoTracking ********************************************************** /*FOLD00*/
-
-BOOL DoTracking (RECTL *prclTrack)
-{
-    LONG       cxScreen, cyScreen, cxPointer, cyPointer;
-    TRACKINFO  ti;
-
-    cxScreen  = WinQuerySysValue (HWND_DESKTOP, SV_CXSCREEN);
-    cyScreen  = WinQuerySysValue (HWND_DESKTOP, SV_CYSCREEN);
-    cxPointer = WinQuerySysValue (HWND_DESKTOP, SV_CXPOINTER);
-    cyPointer = WinQuerySysValue (HWND_DESKTOP, SV_CYPOINTER);
-
-    ti.cxBorder = 1;
-    ti.cyBorder = 1;
-
-    ti.cxGrid = 0;
-    ti.cyGrid = 0;
-
-    ti.cxKeyboard = 4;
-    ti.cyKeyboard = 4;
-
-    ti.rclBoundary.xLeft   = 0;
-    ti.rclBoundary.yBottom = 0;
-    ti.rclBoundary.xRight  = cxScreen;
-    ti.rclBoundary.yTop    = cyScreen;
-
-    ti.ptlMinTrackSize.x = 1;
-    ti.ptlMinTrackSize.y = 1;
-    ti.ptlMaxTrackSize.x = cxScreen;
-    ti.ptlMaxTrackSize.y = cyScreen;
-
-    ti.rclTrack.xLeft   = (cxScreen-cxPointer)/2;
-    ti.rclTrack.yBottom = (cyScreen-cyPointer)/2;
-    ti.rclTrack.xRight  = (cxScreen+cxPointer)/2;
-    ti.rclTrack.yTop    = (cyScreen+cyPointer)/2;
-
-    ti.fs = TF_MOVE | TF_STANDARD | TF_SETPOINTERPOS;
-
-    if (! WinTrackRect (HWND_DESKTOP, NULL, &ti))
-        return FALSE;
-
-    WinSetPointer (HWND_DESKTOP,
-                   WinQuerySysPointer (HWND_DESKTOP, SPTR_SIZENESW, FALSE));
-
-    ti.fs = TF_RIGHT | TF_TOP | TF_STANDARD | TF_SETPOINTERPOS;
-
-    if (! WinTrackRect (HWND_DESKTOP, NULL, &ti))
-        return FALSE;
-
-    *prclTrack = ti.rclTrack;
-
-    return TRUE;
-}
-
-// ** StartSelection ****************************************************** /*FOLD00*/
-
-VOID StartSelection (HWND hwnd)
-{
-    WinSetPointer (HWND_DESKTOP, WinLoadPointer (HWND_DESKTOP, GETMODULE, 2));
-    WinSetCapture (HWND_DESKTOP, hwnd);
-}
-
-// ************************************************************************
Index: unk/config.h
===================================================================
--- /trunk/config.h	(revision 169)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-
-// enable PrtScrn capturing
-// Should normally be defined.
-#define _USEDLL_
-
-// enable file name completion in the custom file dialog
-// note: does not work ok yet ...
-// Should normally NOT be defined.
-//#define _DOFNCOMPLETION_
-
-// enable logging of free memory at checkpoints to file "gotcha.mem"
-// Should normally NOT be defined.
-//#define _DOLOGMEM_
-
-// enable debug logging
-// Should normally NOT be defined.
-//#define _DOLOGDEBUG_
-
-// Default language for resources and help.
-#ifdef _QUIET_
-#define PSZ_DEFAULTLANGUAGEMOD  "goqresen"
-#else
-#define PSZ_DEFAULTLANGUAGEMOD  "gotresen"
-#endif
-#define PSZ_DEFAULTLANGUAGEHELP  "gotcha_en"
-
Index: unk/file_id.diz
===================================================================
--- /trunk/file_id.diz	(revision 169)
+++ 	(revision )
@@ -1,8 +1,0 @@
-GOTCHA! 1.78- OS/2 screen capture utility.
-Captures either windows, window interiors,
-parts of the screen or the whole desktop and
-save them to disk or clipboard as a picture
-(bitmap format). Serial capture and batch
-mode options. Written by Thorsten Thielen
-<thth@c2226.de> Free software under the GPL.
-WWW: "http://www.c2226.de/programs/gotcha/".
Index: unk/gotcha.clp
===================================================================
--- /trunk/gotcha.clp	(revision 169)
+++ 	(revision )
@@ -1,37 +1,0 @@
-// ** Settings ************************************************************
-
-
-SETTINGS :: Settings (VOID)
-: ththSettings (apse, PSZ_PROFILENAME, L_PROFILEVERSION)
-{
-    swpMain.x = 98; swpMain.y = 66;
-
-    // get main window data
-    ULONG ul = sizeof (swpMain);
-    PrfQueryProfileData (hini, "Window", "SWP", PVOID (&swpMain), &ul);
-    ul = sizeof (usMain);
-    PrfQueryProfileData (hini, "Window", "US", PVOID (&usMain), &ul);
-
-    // get snapshot window data
-    ul = sizeof (swp);
-    PrfQueryProfileData (hini, "Snapshot", "SWP", PVOID (&swp), &ul);
-    ul = sizeof (us);
-    PrfQueryProfileData (hini, "Snapshot", "US", PVOID (&us), &ul);
-}
-
-// ** ~Settings ***********************************************************
-
-SETTINGS :: ~Settings (VOID)
-{
-    PrfWriteProfileData (hini, "Snapshot", "SWP",
-                         PVOID (&swp), sizeof (swp));
-    PrfWriteProfileData (hini, "Snapshot", "US",
-                         PVOID (&us), sizeof (us));
-
-    PrfWriteProfileData (hini, "Window", "SWP",
-                         PVOID (&swp), sizeof (swpMain));
-    PrfWriteProfileData (hini, "Window", "US",
-                         PVOID (&us), sizeof (usMain));
-
-    this->ththSettings::~ththSettings ();
-}
Index: unk/gotcha.cpp
===================================================================
--- /trunk/gotcha.cpp	(revision 169)
+++ 	(revision )
@@ -1,446 +1,0 @@
-/***
- Main source of the Gotcha! screencapture program.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-
-#define INCL_WINHOOKS
-
-#include "gotcha.h"
-#include "dll/gotchdll.h"
-#include "settings.h"
-#include "string.h"
-
-#include "io.h"
-#define INCL_EXCEPTQ_CLASS
-#define INCL_LOADEXCEPTQ
-#include "exceptq.h"
-
-HAB         hab;
-HWND        hwndFrame, hwndSnapshot;
-PFNWP       OldFrameWP, wpOldButton;
-PSETTINGS   pset;
-BOOL        g_fIdle = FALSE, g_fSetPathName = FALSE;
-HWND        g_hwndMenuSSW;
-HMODULE     g_hmod = NULLHANDLE;
-Helper      *g_phelp = NULL;
-BOOL        g_usePMps = FALSE;
-CHAR        g_installerSavePath[_MAX_PATH] = {0};
-BOOL        g_installer = FALSE;
-CHAR        g_installerINI[_MAX_PATH] = {0};
-
-#include "bitmap.cpp"
-#include "mainwin.cpp"
-#include "snapshot.cpp"
-#include "savebmp.cpp"
-
-// ** CheckCmdlineArgs **************************************************** /*FOLD00*/
-
-BOOL CheckCmdlineArgs (int argc, char *argv[])
-{
-    BOOL   fAuto = FALSE;
-
-    for (USHORT i = 1; i < argc; i++)
-    {
-#ifndef _QUIET_
-        // batch mode
-        if ((stricmp (argv[i], "-a") == 0))
-        {
-            if (pset->QuerySaveStyle () != FSS_FORCEFILE)
-                pset->SetFileSaveStyle (FSS_NUMFILES);
-                fAuto = TRUE;
-
-            if (i < argc-1)
-                if (argv[i+1][0] != '-')
-                {
-                    i++;
-                    pset->SetFileSaveStyle (FSS_NUMFILES);
-                    pset->SetNumSaveDir (argv[i]);
-                }
-        }
-        // force saving to the given file name
-        else if ((stricmp (argv[i], "-f") == 0) && (i < argc-1))
-        {
-            if (argv[i+1][0] != '-')
-            {
-                i++;
-                pset->SetFileSaveStyle (FSS_FORCEFILE);
-                pset->SetForceSaveFile (argv[i]);
-                g_fSetPathName = TRUE;
-            }
-        }
-        // set to idle priority
-        else if (stricmp (argv[i], "-i") == 0)
-        {
-            g_fIdle = TRUE;
-            pset->SetFlag (SEI_IDLEPRIORITY, TRUE);
-        }
-#else
-        // use default PM print screen
-        if (stricmp (argv[i], "-p") == 0)
-        {
-            g_usePMps = TRUE;
-        }
-        if (stricmp (argv[i], "-i") == 0 || stricmp (argv[i], "-i+") == 0)
-        {
-            CHAR * memdrv = getenv("MEMDRIVE");
-
-            g_installer = TRUE;
-            
-            if (memdrv) {
-                strcpy(g_installerSavePath, memdrv);
-                strcat(g_installerSavePath, ":\\");
-            }
-            else
-                strcpy(g_installerSavePath, "Z:\\");
-            if (stricmp (argv[i], "-i+") == 0)
-                strcpy(g_installerINI, "gotchaq.ini");
-            else {
-                strcpy(g_installerINI, g_installerSavePath);
-                strcat(g_installerINI, "gotchaq.ini");
-            }
-        }
-#endif
-    }
-
-    return fAuto;
-}
-
-// ** main **************************************************************** /*FOLD00*/
-
-int main (int argc, PSZ argv[])
-{
-    ScopedExceptqLoader sel;
-#ifdef _DOLOGDEBUG_
-    LogDebug( "Gotcha! start" );
-#endif
-#ifdef _DOLOGMEM_
-    LogMem("main", TRUE);
-#endif
-
-    // init system and msg queue
-    hab = WinInitialize (0);
-    HMQ hmq = WinCreateMsgQueue (hab, 0);
-    int rc;
-#ifdef _QUIET_  //Needed here for setting adjustments for installer version
-    CheckCmdlineArgs (argc, argv);
-#endif
-    // Load settings moved up here so the string table is available for the already running error
-    pset = new SETTINGS;
-
-    pset->idleSetInIni = pset->QueryFlag(SEI_IDLEPRIORITY);
-    pset->saveStyle = pset->QuerySaveStyle ();
-    pset->pNumSaveDir = pset->QueryNumSaveDir ();
-    pset->pForceSaveFile = pset->QueryForceSaveFile();
-    pset->bSerialCapture = pset->SerialCapture ();
-    //Reset Save style and directory for installer
-    
-#ifdef _QUIET_
-    
-    if ((Version() < 2))
-    {
-        if (! g_installer)
-            DisplayError(RSTR (IDS_ERROR_DLLOUTDATED),
-                         RSTR (IDS_ERROR_DLLOUTDATEDMSG));
-        exit (0);
-    }
-    HMTX    hmtx     = NULLHANDLE;
-    // running multiple instances orphans all but the first hook unloaded
-    rc = DosOpenMutexSem("\\SEM32\\GOTCHA", &hmtx);
-    if (!rc) { 
-        if (! g_installer)
-            DisplayError(RSTR (IDS_ERROR_ALREADYRUNNING),
-                         RSTR (IDS_ERROR_ALREADYRUNNINGMSG));
-        exit (0);
-    }
-    rc = DosCreateMutexSem("\\SEM32\\GOTCHA", &hmtx, 0, FALSE);
-    if (rc) {
-        if (! g_installer)
-            DisplayError(RSTR (IDS_ERROR_SEMAPHOREFAILED),
-                         RSTR (IDS_ERROR_SEMAPHOREFAILEDMSG));
-        exit (0);
-    }
-#endif
-
-    // register our window classes
-    WinRegisterClass (hab, "thth.wc.gotcha.main", WindowProcedure, 0L,
-                      sizeof (ULONG)*2L);
-#ifndef _QUIET_
-    WinRegisterClass (hab, "thth.wc.gotcha.snapshot", wpSnapshot,
-                      CS_SIZEREDRAW, sizeof (ULONG)*2L);
-
-    // check cmd line args and if "-a" found take screenshot and exit
-    if (CheckCmdlineArgs (argc, argv))
-    {
-        CaptureWindow (HWND_DESKTOP, HWND_DESKTOP, NULL, TRUE);
-        pset->SetFileSaveStyle(pset->saveStyle);
-        pset->SetNumSaveDir (pset->pNumSaveDir);
-        delete pset;
-        WinDestroyMsgQueue (hmq);
-        WinTerminate (hab);
-        exit (0);
-    }
-#endif
-    SetIdlePriority(pset->QueryFlag(SEI_IDLEPRIORITY));
-
-    // create the windows
-    hwndFrame = CreateMainWindow ();
-#ifndef _QUIET_
-    hwndSnapshot = CreateSnapshotWindow ();
-    SWP swp;
-    USHORT us[7];
-
-    // position main window
-    pset->QueryWindowData (&swp, us, FALSE);
-    WinSetWindowPos (hwndFrame, HWND_DESKTOP, swp.x,swp.y, 0,0,
-                     SWP_SHOW | SWP_MOVE);
-#endif
-    
-#ifdef _QUIET_
-    bool fPrtScr = FALSE;
-    if (!g_usePMps) {
-        // always turn it off while running
-        // WinSet does not effect the ini setting
-        WinSetSysValue(HWND_DESKTOP, SV_PRINTSCREEN , fPrtScr);
-    }
-    InitDLL (hab, hwndFrame, g_usePMps);
-    StartInputHook ();
-#endif
-#ifndef _QUIET_
-    // position snapshot window
-    pset->QueryWindowData (&swp, us);
-
-    // size, activate & show window
-    WinSetWindowPos (hwndSnapshot, HWND_DESKTOP, swp.x,swp.y, swp.cx,swp.cy,
-                     SWP_SHOW | SWP_SIZE | SWP_MOVE);
-    if (! pset->SnapshotWindow ())
-        WinShowWindow (hwndSnapshot, FALSE);
-    else
-        WinShowWindow (hwndSnapshot, TRUE);
-
-    WinSetWindowPos (hwndFrame, NULLHANDLE, 0,0, 0,0, SWP_SHOW);
-    WinSetWindowPos (WinWindowFromID (hwndFrame, FID_CLIENT), NULLHANDLE,
-                     0,0, 0,0, SWP_SHOW);
-#endif
-    g_phelp = new Helper(hwndFrame);
-
-    // do the main msg loop
-    QMSG   qmsg;
-    while (WinGetMsg (hab, &qmsg, 0L, 0, 0))
-        WinDispatchMsg (hab, &qmsg);
-
-
-    // Set priorty to unless user set regular since running -q sets it to idle in the ini
-    if (g_fIdle) {
-        pset->SetFlag (SEI_IDLEPRIORITY, pset->idleSetInIni);
-    }
-    // Don't change the ini stored paths if the paths were set from the command line
-    if (g_fSetPathName) {
-        pset->SetFileSaveStyle(pset->saveStyle);
-        pset->SetForceSaveFile (pset->pForceSaveFile);
-        pset->SetNumSaveDir (pset->pNumSaveDir);
-    }
-#ifndef _QUIET_
-    // save size, etc. of snapshot window
-    WinQueryWindowPos (hwndSnapshot, &swp);
-    pset->SetWindowData (&swp);
-
-    // save size, etc. of main window
-    WinQueryWindowPos (hwndFrame, &swp);
-    pset->SetWindowData (&swp, FALSE);
-#endif
-    // goodbye windows!
-#ifndef _QUIET_
-    WinDestroyWindow (hwndSnapshot);
-#endif
-    WinDestroyWindow (hwndFrame);
-
-#ifdef _QUIET_
-    // Reset to user PM print screen choice
-    if (!g_usePMps) {
-        ULONG ulDataSize = 0;
-        rc = PrfQueryProfileSize(HINI_USERPROFILE, "PM_ControlPanel",
-                                 "PrintScreen", &ulDataSize );
-        rc = PrfQueryProfileData(HINI_USERPROFILE, "PM_ControlPanel",
-                                 "PrintScreen", &fPrtScr, &ulDataSize);
-        if (!rc) // Print screen is on by default (no ini entry)
-            fPrtScr = TRUE;
-        WinSetSysValue(HWND_DESKTOP, SV_PRINTSCREEN , fPrtScr);
-    }
-    StopInputHook ();
-    DosCloseMutexSem(hmtx);
-#endif
-    
-    delete g_phelp;
-    delete pset;
-
-    WinDestroyMsgQueue (hmq);
-    WinTerminate (hab);
-
-#ifdef _DOLOGMEM_
-    LogMem("main", FALSE);
-#endif
-#ifdef _DOLOGDEBUG_
-    LogDebug( "Gotcha! end" );
-#endif
-}
-
-// ** DisplayError ******************************************************** /*FOLD00*/
-
-VOID DisplayError (PSZ pszTitle, PSZ psz, ...)
-{
-    CHAR      dstring[401];
-    va_list   valst;
-
-    va_start (valst, psz);
-    vsnprintf (dstring, 401, psz, valst);
-    va_end (valst);
-
-    WinMessageBox (HWND_DESKTOP, WinQueryActiveWindow (HWND_DESKTOP), dstring,
-                   pszTitle, 0, MB_OK | MB_ERROR | MB_APPLMODAL | MB_MOVEABLE);
-}
-
-#if 0
-// saymsg2 was adapted from code in FM/2
-APIRET saymsg2(int DefaultButton, HWND hwnd,  PCSZ pszTitle, PCSZ pszFmt, ...)
-{
-  ULONG i;
-  APIRET rc;
-  CHAR szMsg[4096];
-  va_list va;
-  MB2INFO *pmbInfo;
-  MB2D mb2dBut[3];
-  ULONG ulInfoSize = (sizeof(MB2INFO) + (sizeof(MB2D) * 2));
-
-  va_start(va, pszFmt);
-  szMsg[sizeof(szMsg) - 1] = 0;
-  vsprintf(szMsg, pszFmt, va);
-  va_end(va);
-
-  if (szMsg[sizeof(szMsg) - 1]) {
-    fprintf(stderr, "Buffer overflow in saymsg2 - need %u bytes\n", strlen(szMsg) + 1);
-    fflush(stderr);
-  }
-
-  memset(mb2dBut, 0, sizeof(MB2D) * 2);
-  strcpy(mb2dBut[0].achText,RSTR(IDS_OK));
-  strcpy(mb2dBut[1].achText,RSTR(IDS_CANCEL));
-  //strcpy(mb2dBut[2].achText,RSTR(IDS_SETTINGS));
-  mb2dBut[0].idButton = 1;
-  mb2dBut[1].idButton = 2;
-  //mb2dBut[2].idButton = 3;
-  if (DefaultButton)
-    mb2dBut[DefaultButton - 1].flStyle = BS_DEFAULT;
-  pmbInfo = (MB2INFO *) malloc(ulInfoSize);
-  memset(pmbInfo, 0, ulInfoSize);
-  if (pmbInfo) {
-    pmbInfo->cb		= ulInfoSize;
-    pmbInfo->hIcon      = 0;
-    pmbInfo->cButtons   = 2;
-    pmbInfo->flStyle    = MB_MOVEABLE | MB_ICONQUESTION ;
-    pmbInfo->hwndNotify = NULLHANDLE;
-    for (i = 0; i < 2; i++) {
-      memcpy( pmbInfo->mb2d+i , mb2dBut+i , sizeof(MB2D));
-    }
-    rc = WinMessageBox2(HWND_DESKTOP, hwnd,
-			szMsg, pszTitle, SM2_DIALOG,
-                        pmbInfo);
-    WinSetFocus(HWND_DESKTOP, SM2_DIALOG);
-    free(pmbInfo);
-    return rc;
-  }
-  return MBID_ERROR;
-}
-#endif
-// ** AddSysMenuItem ****************************************************** /*FOLD00*/
-
-VOID AddSysMenuItem (HWND hwndFrame, MENUITEM *Item, PSZ Text)
-{
-    HWND   hwndSysMenu = WinWindowFromID (hwndFrame, FID_SYSMENU);
-    USHORT idSysMenu   = SHORT1FROMMR (WinSendMsg (hwndSysMenu,
-                                                   MM_ITEMIDFROMPOSITION, NULL,
-                                                   NULL ));
-    MENUITEM   miSysMenu;
-    WinSendMsg (hwndSysMenu, MM_QUERYITEM,
-                MPFROM2SHORT (idSysMenu,FALSE), MPFROMP(&miSysMenu));
-
-    HWND   hwndSysSubMenu = miSysMenu.hwndSubMenu;
-
-    WinSendMsg (hwndSysSubMenu, MM_INSERTITEM, MPFROMP(Item), MPFROMP(Text));
-}
-
-// ** DoCountdown ********************************************************* /*fold00*/
-
-VOID DoCountdown (ULONG ul)
-{
-    if (ul > 10)
-        DosBeep (4000L-3000L, 20);
-    else
-        DosBeep (4000L-ul*300L, 20);
-}
-
-// ** SetIdlePriority **************************************************** /*FOLD00*/
-
-VOID SetIdlePriority (BOOL f)
-{
-#ifndef _QUEIT_
-    if (f)
-        DosSetPriority(PRTYS_PROCESS, PRTYC_IDLETIME, 0, 0);
-    else
-        DosSetPriority(PRTYS_PROCESS, PRTYC_REGULAR, 0, 0);
-#else
-    DosSetPriority(PRTYS_PROCESS, PRTYC_FOREGROUNDSERVER, 0, 0);
-#endif
-}
-
-// ***********************************************************************
-
-#ifdef _DOLOGMEM_
-VOID LogMem (PSZ psz, BOOL f)
-{
-    FILE *pf = fopen("gotcha.mem","ab");
-    static ULONG TotalPhysicalMemory, ul = 0;
-    ULONG i;
-    if (!f)
-        ul--;
-    DosQuerySysInfo(QSV_TOTAVAILMEM, QSV_TOTAVAILMEM, &TotalPhysicalMemory,
-                    sizeof(TotalPhysicalMemory));
-    for (i = 0; i < ul; i++)
-        fputs("  ", pf);
-    fprintf(pf,"%10ld (%s)\n", TotalPhysicalMemory, psz);
-    if (f)
-        ul++;
-    fclose(pf);
-}
-#endif
-
-#ifdef _DOLOGDEBUG_
-VOID LogDebug( PSZ psz, ... )
-{
-    CHAR      dstring[401];
-    va_list   valst;
-
-    va_start (valst, psz);
-    vsnprintf (dstring, 401, psz, valst);
-    va_end (valst);
-
-    FILE *pf = fopen( "gotcha.log", "ab" );
-    fprintf( pf, "%s\n", dstring );
-    fclose( pf );
-}
-#endif
-
-// ***********************************************************************
Index: unk/gotcha.h
===================================================================
--- /trunk/gotcha.h	(revision 169)
+++ 	(revision )
@@ -1,136 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-
-#ifndef _GOTCHA_H_
-#define _GOTCHA_H_
-
-#define INCL_PM
-#define INCL_GPI
-#define INCL_DOS
-#define INCL_DOSERRORS
-#define INCL_DOSMODULEMGR
-#define INCL_DOSRESOURCES
-#define INCL_WINHELP
-#define INCL_MMIOOS2
-
-#define OS2EMX_PLAIN_CHAR
-
-#include <os2.h>
-
-#include <memory.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "config.h"
-
-#include "id.h"
-#include "rstring.h"
-#include "version.h"
-#include "helper.h"
-#include "settings.h"
-
-#if 0
-#define  _PMPRINTF_
-#include "PMPRINTF.H"
-#endif
-
-#define PSZ_EXTENSION    ".bmp"
-
-typedef class Settings SETTINGS;
-typedef SETTINGS *PSETTINGS;
-
-enum
-{
-    STATE_IDLE, STATE_WAITFORHIDE, STATE_SELECTWINDOW, STATE_WINDOWSELECTED,
-    STATE_CAPTURE, STATE_WAITFORHIDE2,
-};
-
-enum
-{
-    CAP_SCREEN, CAP_SCREENREGION, CAP_WINDOW, CAP_WINDOWINT,
-};
-
-extern BOOL g_installer;
-extern CHAR g_installerSavePath[_MAX_PATH];
-extern CHAR g_installerINI[_MAX_PATH];
-extern HAB hab;
-#define GETHAB hab
-
-extern PSETTINGS pset;
-extern HWND hwndFrame, hwndSnapshot, g_hwndMenuSSW, g_hwndSettingsDialog, g_hwndPage0;
-
-extern HMODULE g_hmod;
-#define GETMODULE g_hmod
-
-extern class Helper *g_phelp;
-
-BOOL CheckCmdlineArgs (int argc, char *argv[]);
-
-HWND     CreateMainWindow (VOID);
-HWND     CreateSnapshotWindow (VOID);
-
-VOID     Drag (HWND hwnd);
-
-HBITMAP  CaptureWindow (HWND hwnd, HWND hwndParent, PRECTL prcl, BOOL f);
-VOID     SaveBitmap (HBITMAP hbm, HPS hps, int width, int height,
-                     int bitCount, char *title);
-VOID     SaveBitmapToClipboard (HBITMAP hbm);
-//VOID     SaveBitmapToFile (HBITMAP hbm, PSZ psz, HPS hps);
-VOID     StartSelection (HWND hwnd);
-BOOL     SelectSaveFile (char *title);
-BOOL     DoTracking (RECTL *prclTrack);
-VOID     AddSysMenuItem (HWND hwndFrame, MENUITEM *Item, PSZ Text);
-
-VOID     AboutBox (HWND hwnd);
-
-MRESULT EXPENTRY
-    WindowProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-MRESULT EXPENTRY
-    FrameProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-MRESULT EXPENTRY
-    wpSnapshot (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-MRESULT EXPENTRY
-    wpNewButton (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-
-MRESULT EXPENTRY
-    FileDLGProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-
-PSZ AddExtensionToFilename( PSZ psz );
-
-VOID     DisplayError (PSZ pszTitle, PSZ psz, ...);
-#if 0
-APIRET   saymsg2(int DefaultButton, HWND hwnd,
-                 PCSZ pszTitle, PCSZ pszFmt, ...);
-#endif
-VOID     DoCountdown (ULONG ul);
-VOID     AdjustSaveTypeButtons (BOOL f);
-
-//BOOL SetEAs (PSZ psz);
-VOID SetIdlePriority (BOOL f);
-
-#ifdef _DOLOGMEM_
-VOID LogMem (PSZ psz, BOOL f);
-#endif
-
-#ifdef _DOLOGDEBUG_
-VOID LogDebug( PSZ psz, ... );
-#endif
-
-#endif
Index: unk/gotcha.lnk.tpl
===================================================================
--- /trunk/gotcha.lnk.tpl	(revision 169)
+++ 	(revision )
@@ -1,5 +1,0 @@
-NAME Gotcha 
-
-system   os2v2_pm
-option description '@#The Netlabs Gotcha team:(GOTMAJOR).(GOTMINOR).(GOTREVISION).(GOTFIXLEVEL)#@##1##(GOTBUILDDATE)    (GOTBUILDMACHINE)::EN:US:0:V:@@ gotcha Copyright ž 1998-2002 Thorsten Thielen, 2018-2022 Netlabs Gotcha Team All rights reserved'
-
Index: unk/gotcha.rc
===================================================================
--- /trunk/gotcha.rc	(revision 169)
+++ 	(revision )
@@ -1,1 +1,0 @@
-ICON 1 ".\\data\\gotcha.ico"
Index: unk/gotchaq.lnk.tpl
===================================================================
--- /trunk/gotchaq.lnk.tpl	(revision 169)
+++ 	(revision )
@@ -1,5 +1,0 @@
-NAME Gotchaq 
-
-system   os2v2_pm
-option description '@#The Netlabs Gotcha team:(GOTMAJOR).(GOTMINOR).(GOTREVISION).(GOTFIXLEVEL)#@##1##(GOTBUILDDATE)    (GOTBUILDMACHINE)::EN:US:0:V:@@ gotchaq Copyright ž 1998-2002 Thorsten Thielen, 2018-2022Netlabs Gotcha Team All rights reserved'
-
Index: unk/gotchaq.rc
===================================================================
--- /trunk/gotchaq.rc	(revision 169)
+++ 	(revision )
@@ -1,1 +1,0 @@
-ICON 1 ".\\data\\gotchaq.ico"
Index: unk/helper.cpp
===================================================================
--- /trunk/helper.cpp	(revision 169)
+++ 	(revision )
@@ -1,121 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-
-#include "helper.h"
-
-// ** Helper ************************************************************** /*FOLD00*/
-
-Helper :: Helper (HWND hwnd)
-{
-    HELPINIT   helpInit;
-    PPIB    ppib;
-    char   *ptr;
-   
-    // get the Process Information Block
-    DosGetInfoBlocks(0, &ppib);
-
-    // get a pointer to the environment
-    ptr = ppib->pib_pchenv;
-
-    // loop through the environment strings to find
-    // the null string that terminates it
-    while (*ptr)
-        ptr = strchr(ptr, 0) + 1;
-
-    // the exe's fully-qualified filename starts at the next character
-    ptr++;
-
-    // if we return because of an error, Help will be disabled
-    fHelpEnabled = TRUE;
-
-    // inititalize help init structure
-    helpInit.cb                  = sizeof (HELPINIT);
-    helpInit.ulReturnCode        = 0L;
-    helpInit.pszTutorialName     = PSZ (NULL);
-    helpInit.phtHelpTable        = PHELPTABLE (MAKELONG (MAIN_HELP_TABLE,
-                                                         0xFFFF));
-    helpInit.hmodHelpTableModule = GETMODULE;
-    helpInit.hmodAccelActionBarModule = GETMODULE;
-    helpInit.idAccelTable        = 0;
-    helpInit.idActionBar         = 0;
-#ifdef _QUIET_
-    helpInit.pszHelpWindowTitle  = PSZ (PSZ_QNAMEVERSION);
-#else
-    helpInit.pszHelpWindowTitle  = PSZ (PSZ_NAMEVERSION);
-#endif
-    helpInit.fShowPanelId        = CMIC_HIDE_PANEL_ID;
-
-    CHAR   fullExeName[CCHMAXPATH];
-    CHAR   *p;
-    strcpy(fullExeName, ptr);
-    p = strrchr(fullExeName, '\\');
-    if (p)
-        *p = 0;
-    CHAR   ach[_MAX_FNAME+_MAX_EXT];
-    sprintf (ach, "%s\\%s.hlp", fullExeName, pset->QueryString (SEI_LANGUAGEHELP));
-    helpInit.pszHelpLibraryName  = PSZ (ach);
-
-    // create the help instance
-    hwndHelpInstance = WinCreateHelpInstance (hab, &helpInit);
-    if (!hwndHelpInstance || helpInit.ulReturnCode)
-    {
-        DisplayError (RSTR (IDS_ERROR_HELPERHEADING),
-                      RSTR (IDS_ERROR_COULDNOTINITHELPFILE), ach);
-        fHelpEnabled = FALSE;
-    }
-
-    // associate help instance with main frame
-    if (! WinAssociateHelpInstance (hwndHelpInstance, hwnd))
-    {
-        DisplayError (RSTR (IDS_ERROR_HELPERHEADING),
-                      RSTR (IDS_ERROR_COULDNOTINITHELP));
-        fHelpEnabled = FALSE;
-    }
-}
-
-// ** ~Helper ************************************************************* /*FOLD00*/
-
-Helper :: ~Helper (VOID)
-{
-    if (hwndHelpInstance)
-        WinDestroyHelpInstance (hwndHelpInstance);
-}
-
-// ** DisplayPanel ******************************************************** /*FOLD00*/
-
-VOID Helper :: DisplayPanel (SHORT idPanel)
-{
-    if (fHelpEnabled)
-    {
-        WinPostMsg (hwndHelpInstance, HM_DISPLAY_HELP,
-                    MPFROMSHORT (idPanel), MPFROMSHORT (HM_RESOURCEID));
-    }
-}
-
-#if 0
-VOID Helper :: ChangeActiveWindow (HWND hwnd)
-{
-   if (fHelpEnabled)
-    {
-        WinPostMsg (hwndHelpInstance, HM_SET_ACTIVE_WINDOW,
-                    MPFROMHWND (hwnd), MPFROMHWND (NULL));
-    }
-}
-#endif
-// ************************************************************************
Index: unk/helper.h
===================================================================
--- /trunk/helper.h	(revision 169)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-
-#ifndef _HELPER_H_
-#define _HELPER_H_
-
-#include "gotcha.h"
-
-class Helper
-{
-public:
-    Helper (HWND hwnd);
-    ~Helper (VOID);
-
-    VOID   DisplayPanel (SHORT idPanel);
-    BOOL   IsAvailable (VOID);
-
-    VOID   DisplayContents (VOID);
-    VOID   DisplayIndex (VOID);
-    VOID   DisplayKeysHelp (VOID);
-    VOID   DisplayGeneralHelp (VOID);
-#if 0
-    VOID   ChangeActiveWindow (HWND hwnd);
-#endif
-private:
-    HWND   hwndHelpInstance;
-    BOOL   fHelpEnabled;
-};
-
-inline BOOL Helper :: IsAvailable (VOID)
-{
-    return (fHelpEnabled);
-}
-
-inline VOID Helper :: DisplayContents (VOID)
-{
-    WinSendMsg (hwndHelpInstance, HM_HELP_CONTENTS, 0,0);
-}
-
-inline VOID Helper :: DisplayIndex (VOID)
-{
-    WinSendMsg (hwndHelpInstance, HM_HELP_INDEX, 0,0);
-}
-
-inline VOID Helper :: DisplayKeysHelp (VOID)
-{
-    WinSendMsg (hwndHelpInstance, HM_KEYS_HELP, 0,0);
-}
-
-inline VOID Helper :: DisplayGeneralHelp (VOID)
-{
-    DisplayPanel( 1000 );
-    //WinSendMsg (hwndHelpInstance, HM_GENERAL_HELP, 0,0);
-}
-
-#endif
Index: unk/id.h
===================================================================
--- /trunk/id.h	(revision 169)
+++ 	(revision )
@@ -1,218 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-
-#define DLL_ID                    1
-#define LANG_ID                   2
-
-#define ID_DLG_MAIN               1
-#define ID_DLG_ABOUT              2
-#define ID_DLG_FILE               10000
-#define ID_DLG_SETTINGS           3
-#define ID_DLG_SETTINGSPAGE1      4
-#define ID_DLG_SETTINGSPAGE2      5
-#define ID_DLG_SETTINGSPAGE3      6
-#define ID_DLG_SETTINGSPAGE4      7
-#define SM2_DIALOG                8
-#define ID_DLG_SETTINGSPAGE0      9
-
-#define WID_NIL                   0
-#define WID_PB_SCREEN             1
-// WID_SCREENREGION had to be redefined because of DID_CANCEL
-#define WID_PB_WINDOW             3
-#define WID_PB_WINDOWINTERIOR     4
-#define WID_CB_HIDEWINDOW         5
-#define WID_CB_DELAYEDCAPTURE     6
-#define WID_TEST                  7
-#define WID_RB_CLIPBOARD          8
-#define WID_RB_FILE               9
-#define WID_PB_ABOUT              10
-#define WID_CB_DELAYCOUNTDOWN     11
-#define WID_SB_DELAYTIME          12
-#define WID_CB_SSWENABLE          13
-#define WID_CB_SSWHIDE            14
-#define WID_CB_SSWALWAYSONTOP     15
-#define WID_SSWSCREEN             16
-#define WID_SSWSCREENREGION       17
-#define WID_SSWWINDOW             18
-#define WID_SSWWINDOWINT          19
-#define WID_E_NUMSAVEDIR          20
-#define WID_E_FORCESAVEFILE       21
-#define WID_PB_OK                 22
-#define WID_PB_UNDO               23
-#define WID_PB_SETTINGS           24
-#define WID_PB_SNAPSHOT           25
-#define WID_SB_SERIALTIME         26
-#define WID_CB_SERIALCAPTURE      27
-#define WID_PB_SCREENREGION       28
-#define WID_RB_FSSPROMPT          29
-#define WID_RB_FSSNUMFILES        30
-#define WID_RB_FSSFORCEFILE       31
-#define WID_CB_DOSOUND            32
-#define WID_NB_SETTINGS           33
-#define WID_RB_BMF12              34
-#define WID_RB_BMF16              35
-#define WID_RB_BMF20              36
-#define WID_CB_IDLEPRIORITY       37
-#define WID_CAPTURETYPE           38
-#define WID_LB_LANGUAGES          39
-#define WID_PB_HELP               42
-#define WID_LB_FILEFORMAT         43
-#define WID_PB_EXIT               44
-#define WID_PB_SETCAPTURETYPE     45
-
-// These must be sequential with END last
-#define WID_ST_COPYRIGHT          400
-#define WID_ST_COPYRIGHT1         401
-#define WID_ST_COPYRIGHT2         402
-#define WID_ST_COPYRIGHT3         403
-#define WID_ST_COPYRIGHT4         404
-#define WID_ST_PROGRAM            405
-#define WID_ST_LANGNOTE           406
-#define WID_ST_END                407
-
-#define IDM_SSWPOPUP              1
-
-#define WID_CAPTURETYPE           38
-
-#define WID_CB_AUTOADDEXTENSION   10001
-#define WID_CB_CONFIRMOVERWRITE   10002
-
-#define UM_PREPARECAPTURE         WM_USER+1000
-#define UM_WINDOWHIDDEN           WM_USER+1001
-#define UM_SELECTWINDOW           WM_USER+1002
-#define UM_WINDOWSELECTED         WM_USER+1003
-#define UM_CAPTURE                WM_USER+1004
-#define UM_ADJUSTSETTINGS         WM_USER+1005
-#define UM_UNDO                   WM_USER+1006
-#define UM_SSWHIDDEN              WM_USER+1007
-#define UM_CAPTURE2               WM_USER+1008
-#define UM_COUNTDOWN              WM_USER+1009
-#define UM_CLEANUP                WM_USER+1010
-#define UM_STARTCAPTURE           WM_USER+1011
-#define UM_STOPCAPTURE            WM_USER+1012
-#define UM_SETTINGS2DIALOG        WM_USER+1013
-#define UM_ADJUST                 WM_USER+1014
-#define UM_ABORT                  WM_USER+1015
-
-#define SEI_SAVEFILE              1
-#define SEI_FORCESAVEFILE         2
-#define SEI_SAVESTYLE             3
-#define SEI_FILEFORMAT            4
-#define SEI_FILESAVESTYLE         5
-#define SEI_NUMSAVEDIR            6
-#define SEI_HIDEWINDOW            7
-#define SEI_AUTOADDEXTENSION      8
-#define SEI_CONFIRMOVERWRITE      9
-#define SEI_DOSOUND               10
-#define SEI_DELAYEDCAPTURE        11
-#define SEI_DELAYCOUNTDOWN        12
-#define SEI_DELAYTIME             13
-#define SEI_SERIALCAPTURE         14
-#define SEI_SERIALTIME            15
-#define SEI_SNAPSHOTWINDOW        16
-#define SEI_SSWCAPTURETYPE        17
-#define SEI_SSWHIDE               18
-#define SEI_SSWALWAYSONTOP        19
-#define SEI_IDLEPRIORITY          20
-#define SEI_SWP                   21
-#define SEI_US                    22
-#define SEI_SWPSSW                23
-#define SEI_USSSW                 24
-#define SEI_LANGUAGE              25
-#define SEI_LANGUAGEHELP          26
-#define SEI_UPDATE178DONE         27
-
-#define EN 1
-#define CZ 420
-#define IT 39
-#define DE 49
-#define ES 34
-#define RU 7
-#define JA 81
-#define PL 48
-#define BR 55
-#define FR 33
-#define KO 82
-#define NL 31
-#define TW 88
-#define CN 86
-
-#define IDS_SETTINGS                        3
-#define IDS_PRODUCTINFORMATION              4
-#define IDS_HEADER_ERROR                    5
-#define IDS_ERROR_COULDNOTRETRIEVEHEADER    6
-#define IDS_ERROR_COULDNOTGETBITMAPBITS     7
-#define IDS_ERROR_COULDNOTOPENFILE          8
-#define IDS_ERROR_COULDNOTWRITEFILETYPEEA   9
-#define IDS_SAVESCREENSHOTTO                10
-#define IDS_HEADER_WARNING                  11
-#define IDS_FILEEXISTSOVERWRITE             12
-#define IDS_ERROR_INIFILEWRONGVERSION       13
-#define IDS_ERROR_INIFILENOTOPEN            14
-#define IDS_ERROR_HELPERHEADING             15
-#define IDS_ERROR_COULDNOTINITHELP          16
-#define IDS_ERROR_COULDNOTINITHELPFILE      17
-#define IDS_PAGESAVE                        18
-#define IDS_PAGESNAPSHOT                    19
-#define IDS_CAPTURE                         20
-#define IDS_PAGELANGUAGE                    21
-#define IDS_BMF_JPG                         22
-#define IDS_BMF_PNG                         23
-#define IDS_BMF_OS20                        24
-#define IDS_BMF_TIF                         25
-#define IDS_BMF_TGA                         26
-#define IDS_BMF_PCX                         27
-#define IDS_BMF_GIF                         28
-#define IDS_BMF_PBM                         29
-#define IDS_BMF_JP2                         30
-#define IDS_BMF_DIB                         31
-#define IDS_SNAPLABEL                       34
-#define IDS_GENERALHELP                     35
-#define IDS_MAINWIN                         36
-#define IDS_OK                              37
-#define IDS_CANCEL                          38
-#define IDS_WISHCONTINUE                    39
-#define IDS_ERROR_ALREADYRUNNING            40
-#define IDS_ERROR_ALREADYRUNNINGMSG         41
-#define IDS_ERROR_DLLOUTDATED               42
-#define IDS_ERROR_DLLOUTDATEDMSG            43
-#define IDS_ERROR_SEMAPHOREFAILED           44
-#define IDS_ERROR_SEMAPHOREFAILEDMSG        45
-
-#define IDS_UNDO                            47
-#define IDS_HELP                            48
-
-#define LANG_COPYRIGHT                      300
-#define LANG_COPYRIGHT1                     301
-#define LANG_COPYRIGHT2                     302
-#define LANG_COPYRIGHT3                     303
-#define LANG_COPYRIGHT4                     304
-#define LANG_PROGRAM                        305
-#define LANG_RESTART                        306
-
-#define MAIN_HELP_TABLE                     1
-
-#define SUBTABLE_MAIN                       1
-#define SUBTABLE_SETTINGS                   2
-#define SUBTABLE_SNAPSHOT                   3
-
-#define PANEL_KEYSHELP                      1
-#define PANEL_MAIN                          2
-#define PANEL_SNAPSHOT                      3
-#define PANEL_SETTINGS                      4
Index: unk/mainwin.cpp
===================================================================
--- /trunk/mainwin.cpp	(revision 169)
+++ 	(revision )
@@ -1,657 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-
-// ** CreateMainWindow **************************************************** /*FOLD00*/
-
-HWND CreateMainWindow (VOID)
-{
-#ifdef _QUIET_
-    hwndFrame = WinLoadDlg (HWND_OBJECT, NULLHANDLE, NULL, GETMODULE,
-                            ID_DLG_MAIN, NULL);
-#else
-    hwndFrame = WinLoadDlg (HWND_DESKTOP, NULLHANDLE, NULL, GETMODULE,
-                            ID_DLG_MAIN, NULL);
-#endif
-    OldFrameWP = WinSubclassWindow (hwndFrame, FrameProcedure);
-#ifndef _QUIET_
-    // attach the icon
-    if (HPOINTER hicon = WinLoadPointer (HWND_DESKTOP, GETMODULE, 1))
-        WinSendMsg (hwndFrame, WM_SETICON, MPFROMLONG (hicon), NULL);
-
-    // attach the accelerator table
-    if (HACCEL haccel = WinLoadAccelTable (hab, GETMODULE, 1))
-        WinSetAccelTable (hab, haccel, hwndFrame);
-#endif
-
-    HWND   hwnd = WinWindowFromID (hwndFrame, FID_CLIENT);
-
-    // select the radio button
-    switch (pset->QuerySaveStyle ())
-    {
-    case SAVESTYLE_CLIPBOARD:
-        WinSendDlgItemMsg (hwnd, WID_RB_CLIPBOARD, BM_CLICK,
-                           MPFROMSHORT (TRUE), 0);      break;
-    default:
-        WinSendDlgItemMsg (hwnd, WID_RB_FILE, BM_CLICK,
-                           MPFROMSHORT (TRUE), 0);      break;
-    }
-    AdjustSaveTypeButtons (BOOL (pset->QueryFileSaveStyle ()==FSS_FORCEFILE));
-
-    if (pset->SerialCapture ())
-        WinEnableWindow (WinWindowFromID (hwnd, WID_CB_DELAYEDCAPTURE), FALSE);
-
-    // adjust the other buttons
-    WinSendDlgItemMsg (hwnd, WID_CB_HIDEWINDOW, BM_SETCHECK,
-                       MPFROMLONG (pset->HideWindow ()), MPFROMLONG (0));
-    WinSendDlgItemMsg (hwnd, WID_CB_DELAYEDCAPTURE, BM_SETCHECK,
-                       MPFROMLONG (pset->DelayedCapture ()), MPFROMLONG (0));
-    return hwndFrame;
-}
-
-// ** Drag **************************************************************** /*FOLD00*/
-
-VOID Drag (HWND hwnd)
-{
-    // determine the new window position
-    TRACKINFO   trackinfo ;
-    memset (&trackinfo, 0, sizeof (trackinfo));
-
-    trackinfo.cxBorder = 1;
-    trackinfo.cyBorder = 1;
-    trackinfo.cxGrid = 1;
-    trackinfo.cyGrid = 1;
-    trackinfo.cxKeyboard = 8;
-    trackinfo.cyKeyboard = 8;
- 
-    SWP   swp;
-    WinQueryWindowPos (hwnd, &swp);
-    trackinfo.rclTrack.xLeft   = swp.x;
-    trackinfo.rclTrack.xRight  = swp.x + swp.cx;
-    trackinfo.rclTrack.yBottom = swp.y;
-    trackinfo.rclTrack.yTop    = swp.y + swp.cy;
-
-    WinQueryWindowPos (HWND_DESKTOP, &swp);
-    trackinfo.rclBoundary.xLeft   = swp.x;
-    trackinfo.rclBoundary.xRight  = swp.x + swp.cx;
-    trackinfo.rclBoundary.yBottom = swp.y;
-    trackinfo.rclBoundary.yTop    = swp.y + swp.cy;
-
-    trackinfo.ptlMinTrackSize.x = 0;
-    trackinfo.ptlMinTrackSize.y = 0;
-    trackinfo.ptlMaxTrackSize.x = swp.cx;
-    trackinfo.ptlMaxTrackSize.y = swp.cy;
-
-    trackinfo.fs = TF_MOVE | TF_STANDARD | TF_ALLINBOUNDARY;
-
-    if (WinTrackRect (HWND_DESKTOP, 0, &trackinfo))
-        WinSetWindowPos (hwnd, 0, trackinfo.rclTrack.xLeft,
-                         trackinfo.rclTrack.yBottom, 0, 0, SWP_MOVE);
-}
-
-// ** FrameProcedure ****************************************************** /*FOLD00*/
-
-MRESULT EXPENTRY FrameProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
-{
-    // ATTENTION: used by both main & snapshot window!
-
-    switch (msg)
-    {
-    case WM_QUERYTRACKINFO:
-        {
-            OldFrameWP (hwnd, msg, mp1, mp2);
-            PTRACKINFO  pti = PTRACKINFO (mp2);
-            pti->ptlMinTrackSize.x = pti->ptlMinTrackSize.y = 16;
-        }
-        return MRESULT (TRUE);
-
-    case WM_WINDOWPOSCHANGED:
-        if ((PSWP (mp1)->fl & SWP_HIDE))
-            WinPostMsg (WinWindowFromID (hwnd, FID_CLIENT),
-                        UM_WINDOWHIDDEN, 0,0);
-        break;
-    }
-
-    return OldFrameWP (hwnd, msg, mp1, mp2);
-}
-
-// ** WindowProcedure ***************************************************** /*FOLD00*/
-
-MRESULT EXPENTRY WindowProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
-{
-    static BOOL     fInterior = FALSE;
-    static USHORT   usState = STATE_IDLE, usCap;
-    static ULONG    ulTimer, ulCountdown;
-    static HWND     hwndCap, hwndParent;
-    static RECTL    rcl;
-
-#ifdef _DOLOGDEBUG_
-    LogDebug( "MainWin:WindowProcedure:Message 0x%04x", msg );
-#endif
-
-    switch (msg)
-    {
-#ifndef _QUIET_
-    case WM_CREATE:
-#else
-    case WM_INITDLG:
-#endif
-        {
-#ifdef _DOLOGDEBUG_
-            LogDebug( "MainWin:WindowProcedure: WM_CREATE" );
-#endif
-#ifndef _QUIET_
-            USHORT   usResID = WinQueryWindowUShort (hwnd, QWS_ID);
-
-            // attach the icon
-            if (HPOINTER hicon = WinLoadPointer (HWND_DESKTOP, GETMODULE, usResID))
-                WinSendMsg (hwnd, WM_SETICON, MPFROMLONG (hicon), MPVOID);
-
-            RECTL   rcl;
-            WinQueryWindowRect (hwndFrame, &rcl);
-            WinCalcFrameRect (hwndFrame, &rcl, TRUE);
-            WinSetWindowPos (WinWindowFromID (hwndFrame, FID_CLIENT), HWND_TOP,
-                             rcl.xLeft, rcl.yBottom, rcl.xRight - rcl.xLeft,
-                             rcl.yTop - rcl.yBottom,
-                             SWP_SHOW | SWP_MOVE | SWP_SIZE | SWP_ZORDER);
-#endif
-            HMQ hmq;
-            BOOL bUniCodeFont = FALSE;
-            CHAR ucFont[FACESIZE];
-    
-            if (pset->GetLangID() == RU) {
-                hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-                WinSetCp(hmq, 866);
-                bUniCodeFont = TRUE;
-            }
-            else if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
-                hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-                WinSetCp(hmq, 852);
-                bUniCodeFont = TRUE;
-            }
-            else {
-                hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-                WinSetCp(hmq, 850);
-            }
-    
-            if (pset->GetLangID() == RU || pset->GetLangID() == CZ || pset->GetLangID() == PL) {
-                strcpy(ucFont, "9.Times New Roman MT 30");
-                WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-            }
-            else {
-                strcpy(ucFont, "9.WarpSans");
-                WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-            }
-        }
-#ifdef _QUIET_
-        WinSendDlgItemMsg (hwnd, WID_CB_HIDEWINDOW, BM_SETCHECK,
-                           MPFROMLONG (TRUE), MPFROMLONG (0));
-        WinSendDlgItemMsg (hwnd, WID_CB_DELAYEDCAPTURE, BM_SETCHECK,
-                           MPFROMLONG (pset->DelayedCapture ()),
-                           MPFROMLONG (0));
-        WinSetFocus( WinWindowFromID (g_hwndPage0, WID_RB_FILE), FALSE );
-        return MRESULT (FALSE);
-#else
-        break;
-#endif
-
-    case WM_QUIT:
-#ifdef _DOLOGDEBUG_
-        LogDebug( "MainWin:WindowProcedure: WM_QUIT" );
-#endif
-    case WM_SAVEAPPLICATION:
-#ifdef _DOLOGDEBUG_
-        LogDebug( "MainWin:WindowProcedure: WM_SAVEAPPLICATION" );
-#endif
-    case WM_CLOSE:
-#ifdef _DOLOGDEBUG_
-        LogDebug( "MainWin:WindowProcedure: WM_CLOSE" );
-#endif
-        WinSendMsg (hwnd, UM_ADJUSTSETTINGS, 0,0);
-        break;
-
-    case UM_ADJUSTSETTINGS:
-        {
-#ifdef _DOLOGDEBUG_
-            LogDebug( "MainWin:WindowProcedure: UM_ADJUSTSETTINGS" );
-#endif
-            if (WinSendMsg (WinWindowFromID (hwnd, WID_RB_CLIPBOARD),
-                            BM_QUERYCHECK, 0,0))
-                pset->SetSaveStyle (SAVESTYLE_CLIPBOARD);
-            else
-                pset->SetSaveStyle (SAVESTYLE_FILE);
-
-            BOOL   f = FALSE;
-            f = BOOL (WinSendDlgItemMsg (hwnd, WID_CB_HIDEWINDOW,
-                                         BM_QUERYCHECK, 0, 0));
-            pset->HideWindow (f);
-#ifndef _QUIET_
-            f = BOOL (WinSendDlgItemMsg (hwnd, WID_CB_DELAYEDCAPTURE,
-                                         BM_QUERYCHECK, 0, 0));
-            pset->DelayedCapture (f);
-#endif
-        }
-        return MRESULT (FALSE);
-
-    case WM_MOUSEMOVE:
-        // we don't want the mouse pointer to be reset so capture this msg
-        return MRESULT (FALSE);
-
-#ifndef _QUIET_
-    case WM_PAINT:
-        {
-            HPS   hps;
-            RECTL rcl;
-            COLOR color = SYSCLR_DIALOGBACKGROUND;
-
-            HWND  hwnd2 = WinWindowFromID (hwnd, WID_RB_CLIPBOARD);
-            WinQueryPresParam (hwnd2, PP_BACKGROUNDCOLOR, 0, NULL,
-                               sizeof (color), &color, 0L);
-
-            hps = WinBeginPaint (hwnd, NULLHANDLE, &rcl);
-            WinQueryWindowRect (hwnd, &rcl);
-            WinFillRect (hps, &rcl, color);
-            WinEndPaint (hps);
-        }
-        break;
-#endif
-
-    case WM_COMMAND:
-#ifdef _DOLOGDEBUG_
-        LogDebug( "MainWin:WindowProcedure: WM_COMMAND" );
-#endif
-        if (usState != STATE_IDLE)
-        {
-            //Attempt to open settings probably a hang
-            if (SHORT1FROMMP (mp1) == WID_PB_SETTINGS) {
-                WinSendMsg (hwnd, UM_ABORT, 0,0);
-                pset->Dialog ();
-            }
-            // this means ESC was pressed
-            else if (SHORT1FROMMP (mp1) == DID_CANCEL)
-                WinSendMsg (hwnd, UM_ABORT, MPFROMLONG(1),0);
-            return MRESULT (FALSE);
-        }
-#ifndef _QUIET_
-        else
-            // FIXME pretty yukki to do it this way I guess ...
-            WinSendMsg (hwnd, UM_ADJUSTSETTINGS, 0,0);
-#endif         
-        switch (SHORT1FROMMP (mp1))
-        {
-        case WID_RB_CLIPBOARD:
-            WinSendDlgItemMsg (hwnd, WID_RB_CLIPBOARD, BM_CLICK,
-                               MPFROMSHORT (TRUE), PVOID (0));
-            break;
-        case WID_RB_FILE:
-            WinSendDlgItemMsg (hwnd, WID_RB_FILE, BM_CLICK,
-                               MPFROMSHORT (TRUE), PVOID (0));
-            break;
-        case WID_CB_HIDEWINDOW:
-            WinSendDlgItemMsg (hwnd, WID_CB_HIDEWINDOW, BM_CLICK,
-                               MPFROMSHORT (TRUE), PVOID (0));
-            break;
-        case WID_CB_DELAYEDCAPTURE:
-            WinSendDlgItemMsg (hwnd, WID_CB_DELAYEDCAPTURE, BM_CLICK,
-                               MPFROMSHORT (TRUE), PVOID (0));
-            break;
-#ifndef _QUIET_
-        case WID_PB_ABOUT:
-            AboutBox (hwnd);
-            break;
-#endif
-        case WID_PB_SETTINGS:
-            pset->Dialog ();
-            break;
-
-        case WID_PB_SETCAPTURETYPE:
-            //int capType;
-            if (LONGFROMMP(mp2) == 1) {
-                pset->SetSaveStyle (SAVESTYLE_CLIPBOARD);
-            }
-
-            switch (pset->QuerySSWCaptureType ())
-            {
-            case CAP_WINDOWINT:
-                WinSendMsg (hwndFrame, WM_COMMAND,
-                            MPFROM2SHORT (WID_PB_WINDOWINTERIOR,0), 0);
-            case CAP_SCREENREGION:
-                WinSendMsg (hwndFrame, WM_COMMAND,
-                            MPFROM2SHORT (WID_PB_SCREENREGION,0), 0);
-            case CAP_WINDOW:
-                WinSendMsg (hwndFrame, WM_COMMAND,
-                            MPFROM2SHORT (WID_PB_WINDOW,0), 0);
-            default:
-               WinSendMsg (hwndFrame, WM_COMMAND,
-                            MPFROM2SHORT (WID_PB_SCREEN,0), 0);
-            }
-            break;
-
-        case WID_PB_SCREEN:
-            usCap = CAP_SCREEN;
-#ifdef _QUIET_
-            WinShowWindow (g_hwndSettingsDialog, FALSE);
-#endif
-            WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0);
-            break;
-
-        case WID_PB_SCREENREGION:
-            usCap = CAP_SCREENREGION;
-#ifdef _QUIET_
-            WinShowWindow (g_hwndSettingsDialog, FALSE);
-#endif
-            WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0);
-            break;
-
-        case WID_PB_WINDOWINTERIOR:
-            usCap = CAP_WINDOWINT;
-#ifdef _QUIET_
-            WinShowWindow (g_hwndSettingsDialog, FALSE);
-#endif
-            WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0);
-            break;
-
-        case WID_PB_WINDOW:
-            usCap = CAP_WINDOW;
-#ifdef _QUIET_
-            WinShowWindow (g_hwndSettingsDialog, FALSE);
-#endif
-            WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0);
-            break;
-
-        case WID_PB_EXIT:
-            WinSendMsg (WinWindowFromID (hwndFrame, FID_CLIENT),
-                        WM_CLOSE, 0,0);
-            break;
-
-        case HM_HELP_CONTENTS:    g_phelp->DisplayContents ();       break;
-        case HM_HELP_INDEX:       g_phelp->DisplayIndex ();          break;
-        case HM_KEYS_HELP:        g_phelp->DisplayKeysHelp ();       break;
-
-        case HM_GENERAL_HELP:
-            g_phelp->DisplayGeneralHelp ();
-            break;
-
-        default:
-            break;
-        }
-        return MRESULT (FALSE);
-
-    case UM_PREPARECAPTURE:
-        WinSendMsg (hwndSnapshot, UM_STARTCAPTURE, 0,0);
-        usState = STATE_WAITFORHIDE;
-
-        if (usCap == CAP_SCREENREGION || usCap == CAP_SCREEN) {
-#ifdef _QUIET_
-            hwndParent = WinQueryFocus(HWND_DESKTOP);
-#else
-            hwndParent = WinQueryWindow(hwndFrame, QW_NEXTTOP );
-#endif
-        }
-#ifndef _QUIET_
-        if (WinQueryButtonCheckstate (hwnd, WID_CB_HIDEWINDOW)) {
-            WinShowWindow (WinQueryWindow (hwnd, QW_PARENT), FALSE);
-        }
-        else
-#endif
-            WinPostMsg (hwnd, UM_WINDOWHIDDEN, 0,0);
-        return MRESULT (FALSE);
-
-    case UM_WINDOWHIDDEN:
-        if (usState == STATE_WAITFORHIDE)
-        {
-            // FIXME
-            // I have no idea why this delay is necessary, but CAP_SCREEN with
-            // hiding our window does not work without it ...
-            DosSleep (100);
-            usState = STATE_SELECTWINDOW;
-            WinSendMsg (hwnd, UM_SELECTWINDOW, 0,0);
-        }
-        return MRESULT (FALSE);
-
-    case UM_SELECTWINDOW:
-        switch (usCap)
-        {
-        case CAP_SCREEN:
-            usState = STATE_WINDOWSELECTED;
-            WinPostMsg (hwnd, UM_WINDOWSELECTED,
-                        MPFROMHWND (HWND_DESKTOP),
-                        MPFROMHWND (HWND_DESKTOP));
-            break;
-
-        case CAP_SCREENREGION:
-#ifdef _QUIET_
-            WinSetFocus(HWND_DESKTOP, hwnd);
-#endif
-            if (DoTracking (&rcl))
-            {
-                usState = STATE_WINDOWSELECTED;
-                WinPostMsg (hwnd, UM_WINDOWSELECTED,
-                            MPFROMHWND (HWND_DESKTOP),
-                            MPFROMHWND (HWND_DESKTOP));
-            }
-            else
-                usState = STATE_IDLE;
-            break;
-
-        case CAP_WINDOWINT:
-            fInterior = TRUE;
-#ifdef _QUIET_
-            WinSetFocus(HWND_DESKTOP, hwnd);
-#endif
-            StartSelection (hwnd);
-            break;
-
-        case CAP_WINDOW:
-            fInterior = FALSE;
-#ifdef _QUIET_
-            WinSetFocus(HWND_DESKTOP, hwnd);
-#endif
-            StartSelection (hwnd);
-            break;
-
-        default:
-            usState = STATE_IDLE;
-            break;
-        }
-        return MRESULT (FALSE);
-
-    case WM_BUTTON1UP:
-        if (usState != STATE_SELECTWINDOW)
-            return MRESULT (FALSE);
-        else
-        {
-            POINTL   ptl;
-            WinQueryPointerPos (HWND_DESKTOP, &ptl);
-            HWND   hwndCapture =
-                WinWindowFromPoint (HWND_DESKTOP, &ptl, FALSE);
-
-            if (hwndCapture && (hwndCapture != HWND_DESKTOP))
-            {
-                HWND   hwndOld = hwndCapture;
-
-                if (fInterior)
-                    if (! (hwndCapture = WinWindowFromID (hwndOld,
-                                                          FID_CLIENT)))
-                        hwndCapture = WinQueryWindow (hwndOld, QW_BOTTOM);
-
-                if (hwndCapture && (hwndCapture != HWND_DESKTOP))
-                {
-                    usState = STATE_WINDOWSELECTED;
-                    WinPostMsg (hwnd, UM_WINDOWSELECTED,
-                                MPFROMHWND (hwndCapture),
-                                MPFROMHWND (hwndOld));
-                }
-                else
-                    usState = STATE_IDLE;
-            }
-            else
-                usState = STATE_IDLE;
-        }
-        return MRESULT (FALSE);
-
-    case UM_WINDOWSELECTED:
-        if (usState == STATE_WINDOWSELECTED)
-        {
-            // release the pointing device capture if it is active
-            if (WinQueryCapture (HWND_DESKTOP) == hwnd)
-                WinSetCapture (HWND_DESKTOP, NULLHANDLE);
-
-            // reset the pointer to normal shape
-            WinSetPointer (HWND_DESKTOP, WinQuerySysPointer (HWND_DESKTOP,
-                                                             SPTR_ARROW,
-                                                             FALSE));
-            hwndCap = HWND (mp1);
-            if (usCap != CAP_SCREENREGION && usCap != CAP_SCREEN)
-                hwndParent = HWND (mp2);
-            if (pset->SerialCapture ())
-            {
-                ulTimer = WinStartTimer (hab, hwnd, 1, 49);
-                ulCountdown = pset->QuerySerialTime ();
-            }
-            else if (WinQueryButtonCheckstate (hwnd, WID_CB_DELAYEDCAPTURE))
-            {
-                ulTimer = WinStartTimer (hab, hwnd, 1, 990);
-                ulCountdown = pset->QueryDelayTime ();
-            }
-            else
-            {
-                usState = STATE_CAPTURE;
-                WinPostMsg (hwnd, UM_CAPTURE, 0,0);
-            }
-        }
-        return MRESULT (FALSE);
-
-    case WM_TIMER:
-        ulCountdown --;
-       
-        if( ulCountdown % 20 == 0 )
-            WinSendMsg (hwndSnapshot, UM_COUNTDOWN,
-                        MPFROMLONG (ulCountdown), 0);
-        if (pset->DelayCountdown () && !pset->SerialCapture ())
-            DoCountdown (ulCountdown);
-
-        if (ulCountdown == 0)
-        {
-            WinStopTimer (hab, hwnd, ulTimer);
-            usState = STATE_CAPTURE;
-            WinSendMsg (hwnd, UM_CAPTURE, 0,0);
-        }
-        return MRESULT (FALSE);
-
-    case UM_CAPTURE:
-        usState = STATE_WAITFORHIDE2;
-#ifndef _QUIET_
-        if (pset->SSWHide () && WinIsWindowVisible (hwndSnapshot))
-            WinShowWindow (hwndSnapshot, FALSE);
-        else
-#endif
-            WinSendMsg (hwnd, UM_CAPTURE2, 0,0);
-        return MRESULT (FALSE);
-
-    case UM_SSWHIDDEN:
-        // FIXME
-        // I have no idea why this delay is necessary, but CAP_SCREEN with
-        // hiding our window does not work without it ...
-        DosSleep (100);
-        WinSendMsg (hwnd, UM_CAPTURE2, 0,0);
-        return MRESULT (FALSE);
-
-    case UM_CAPTURE2:
-        if (usState == STATE_WAITFORHIDE2)
-        {
-            HBITMAP  hbm;
-
-            WinEnableWindow (hwnd, FALSE);
-            // capture the window to a bitmap and save this
-            if (usCap == CAP_SCREENREGION)
-                hbm = CaptureWindow (hwndCap, hwndParent, &rcl, FALSE);
-            else if (usCap == CAP_SCREEN)
-                hbm = CaptureWindow (hwndCap, hwndParent, NULL, FALSE);
-            else
-                hbm = CaptureWindow (hwndCap, hwndParent, NULL, TRUE);
-
-            if (pset->SerialCapture ())
-            {
-                WinStopTimer (hab, hwnd, ulTimer);
-#ifndef _QUIET_
-                if (! WinIsWindowVisible (hwndSnapshot) && pset->SnapshotWindow ())
-                    WinShowWindow (hwndSnapshot, TRUE);
-#endif
-                if (hbm)
-                {
-                    usState = STATE_WINDOWSELECTED;
-                    WinPostMsg (hwnd, UM_WINDOWSELECTED,
-                                MPFROMHWND (hwndCap),
-                                MPFROMHWND (hwndParent));
-                }
-                else
-                    WinSendMsg (hwnd, UM_ABORT, 0,0);
-            }
-            else
-                WinSendMsg (hwnd, UM_CLEANUP, 0,0);
-        }
-        return MRESULT (FALSE);
-
-    case UM_ABORT:
-        if (LONGFROMMP(mp1) != 1)
-            DosBeep (75, 200);
-        WinSendMsg (hwnd, UM_CLEANUP, 0,0);
-        return MRESULT (FALSE);
-
-    case UM_CLEANUP:
-        if (WinQueryCapture (HWND_DESKTOP) == hwnd)
-            WinSetCapture (HWND_DESKTOP, NULLHANDLE);
-
-        pset->Load ();
-
-        WinSendMsg (hwndSnapshot, UM_STOPCAPTURE, 0,0);
-        WinStopTimer (hab, hwnd, ulTimer);
-#ifdef _QUIET_
-        // ? FIXME to give option to reshow window.
-        if (WinQueryButtonCheckstate (hwnd, WID_CB_HIDEWINDOW))
-            WinSendMsg (g_hwndSettingsDialog, WM_CLOSE, 0,0);
-        else if (WinIsWindow ( hab, g_hwndSettingsDialog) &&
-            ! WinIsWindowVisible (g_hwndSettingsDialog))
-            WinShowWindow (g_hwndSettingsDialog, TRUE);
-        pset->HideWindow (TRUE);
-#else
-        // re-show the windows if they are hidden
-        // FIXME using global hwndFrame is pretty yukki
-        if (! WinIsWindowVisible (hwndFrame))
-            WinShowWindow (hwndFrame, TRUE);
-        if (! WinIsWindowVisible (hwndSnapshot) && pset->SnapshotWindow ())
-            WinShowWindow (hwndSnapshot, TRUE);
-#endif
-        WinEnableWindow (hwnd, TRUE);
-        WinSetActiveWindow (HWND_DESKTOP, hwnd);
-        usState = STATE_IDLE;
-        WinSetFocus(HWND_DESKTOP, hwndParent);
-        return MRESULT (FALSE);
-    }
-
-#ifdef _DOLOGDEBUG_
-    LogDebug( "MainWin:WindowProcedure:WinDefWindowProc->0x%04x", msg );
-#endif
-    if (hwnd ==  g_hwndPage0)
-        return WinDefDlgProc (hwnd, msg, mp1, mp2);
-    else
-        return WinDefWindowProc (hwnd, msg, mp1, mp2);
-}
-
-// ************************************************************************
Index: unk/makefile
===================================================================
--- /trunk/makefile	(revision 169)
+++ 	(revision )
@@ -1,203 +1,0 @@
-# for use with Open Watcom Wmake
-
-.SUFFIXES:
-
-.SUFFIXES: .obj .cpp 
-
-!ifdef %GOTMAJOR
-GOTMAJOR = $(%GOTMAJOR)
-!else
-GOTMAJOR = 2
-!endif
-!ifdef %GOTMINOR
-GOTMINOR = $(%GOTMINOR)
-!else
-GOTMINOR = 0
-!endif
-!ifdef %GOTREVISION
-GOTREVISION = $(%GOTREVISION)
-!else
-GOTREVISION = 1
-!endif
-!ifdef %GOTFIXLEVEL
-GOTFIXLEVEL = $(%GOTFIXLEVEL)
-!else
-GOTFIXLEVEL = 0
-!endif
-!ifdef %GOTBUILDDATE
-GOTBUILDDATE = $(%GOTBUILDDATE)
-!else
-GOTBUILDDATE = Wed  Oct 23, 2019  11:14:06
-!endif
-!ifdef %GOTBUILDMACHINE
-GOTBUILDMACHINE = $(%GOTBUILDMACHINE)
-!else
-GOTBUILDMACHINE = Zobopeep
-!endif
-!ifdef %_QUIET_
-GOTCHAEXE = gotchaq
-!else
-GOTCHAEXE = gotcha
-!endif
-
-CC = wpp386.exe
-LINK = wlink.exe
-RC = WRC.EXE
-CHDIR = cd
-MAKE = WMAKE
-ERASE = del
-PERL = perl.exe
-MAPSYMW = tools\mapsymw.pl
-COPY = copy /Z
-MOVE = move /U
-SED = sed.exe
-
-!ifdef %_QUIET_
-CFLAGS = -D_QUIET_ -otexan -zp4 -6r
-!else
-CFLAGS = -otexan -zp4 -6r
-!endif 
-
-RFLAGS = -bt=os2 -zm
-
-LFLAGS = op map=$(GOTCHAEXE) 
-
-SRCDIR = U:\Gotcha_Workspace\trunk
-INCLDIR = .\dll
-
-GBMPATH = X:\usr\lib\GBM
-PMPRINTFPATH = U:\PMPrintf
-
-all:  dll resources copyme $(GOTCHAEXE).exe
-
-dll:  .symbolic
-    $(CHDIR) dll
-    $(MAKE) -h $(__MAKEOPTS__) 
-    $(CHDIR) ..
-
-resources: .symbolic
-    $(CHDIR) NLS\en
-    $(MAKE) -h $(__MAKEOPTS__) 
-    $(CHDIR) ..\cz
-    $(MAKE) -h $(__MAKEOPTS__) 
-    $(CHDIR) ..\es
-    $(MAKE) -h $(__MAKEOPTS__) 
-    $(CHDIR) ..\de
-    $(MAKE) -h $(__MAKEOPTS__) 
-#    $(CHDIR) ..\it
-#    $(MAKE) -h $(__MAKEOPTS__) 
-#    $(CHDIR) ..\br
-#    $(MAKE) -h $(__MAKEOPTS__) 
-#    $(CHDIR) ..\fr
-#    $(MAKE) -h $(__MAKEOPTS__) 
-#    $(CHDIR) ..\ja
-#    $(MAKE) -h $(__MAKEOPTS__) 
-#    $(CHDIR) ..\ko
-#    $(MAKE) -h $(__MAKEOPTS__) 
-#    $(CHDIR) ..\nl
-#    $(MAKE) -h $(__MAKEOPTS__) 
-    $(CHDIR) ..\ru
-    $(MAKE) -h $(__MAKEOPTS__) 
-#    $(CHDIR) ..\tw
-#    $(MAKE) -h $(__MAKEOPTS__) 
-    $(CHDIR) ..\..
-
-wis: .symbolic
- @if exist WARPIN\GOTCHA.WIS @del  WARPIN\GOTCHA.WIS
- @call tools\rxtxtcnv.cmd  WARPIN\GOTCHAHD.WIS.TPL WARPIN\GOTCHA.WIS 850 1208
-# Make sure you change the source codepage appropriately
- @call tools\rxtxtcnv.cmd  NLS\BR\WIS_BR.RX WARPIN\GOTCHA.WIS 850 1208
- @call tools\rxtxtcnv.cmd  NLS\CN\WIS_CN.RX WARPIN\GOTCHA.WIS 1381 1208
- @call tools\rxtxtcnv.cmd  NLS\CZ\WIS_CZ.RX WARPIN\GOTCHA.WIS 852 1208
- @call tools\rxtxtcnv.cmd  NLS\DE\WIS_DE.RX WARPIN\GOTCHA.WIS 850 1208
- @call tools\rxtxtcnv.cmd  NLS\ES\WIS_ES.RX WARPIN\GOTCHA.WIS 850 1208
- @call tools\rxtxtcnv.cmd  NLS\FR\WIS_FR.RX WARPIN\GOTCHA.WIS 850 1208
- @call tools\rxtxtcnv.cmd  NLS\IT\WIS_IT.RX WARPIN\GOTCHA.WIS 850 1208
- @call tools\rxtxtcnv.cmd  NLS\JA\WIS_JA.RX WARPIN\GOTCHA.WIS 932 1208
- @call tools\rxtxtcnv.cmd  NLS\KO\WIS_KO.RX WARPIN\GOTCHA.WIS 949 1208
- @call tools\rxtxtcnv.cmd  NLS\NL\WIS_NL.RX WARPIN\GOTCHA.WIS 850 1208
- @call tools\rxtxtcnv.cmd  NLS\RU\WIS_RU.RX WARPIN\GOTCHA.WIS 866 1208
- @call tools\rxtxtcnv.cmd  NLS\TW\WIS_TW.RX WARPIN\GOTCHA.WIS 950 1208
-# This footer contains the English translation
- @call tools\rxtxtcnv.cmd  WARPIN\GOTCHAFT.WIS.TPL WARPIN\GOTCHA.WIS 850 1208
-
-copyme: .symbolic
- @if exist bin\utf8\copying.utf8 del bin\utf8\copying.utf8
- @call tools\rxtxtcnv.cmd bin\copying bin\utf8\copying.utf8 850 1208
-# @if exist bin\utf8\README_BR.utf8 del bin\utf8\README_BR.utf8
-# @call tools\rxtxtcnv.cmd  NLS\BR\README_BR bin\utf8\README_BR.utf8 850 1208
-# @if exist bin\utf8\README_CN.utf8 del bin\utf8\README_CN.utf8
-# @call tools\rxtxtcnv.cmd  NLS\CN\README_CN bin\utf8\README_CN.utf8 1381 1208
-# @if exist bin\utf8\README_CZ.utf8 del bin\utf8\README_CZ.utf8
-# @call tools\rxtxtcnv.cmd  NLS\CZ\README_CZ bin\utf8\README_CZ.utf8 852 1208
-# @if exist bin\utf8\README_DE.utf8 del bin\utf8\README_DE.utf8
-# @call tools\rxtxtcnv.cmd  NLS\DE\README_DE bin\utf8\README_DE.utf8 850 1208
- @if exist bin\utf8\README_EN.utf8 del bin\utf8\README_EN.utf8
- @call tools\rxtxtcnv.cmd  NLS\EN\README_EN bin\utf8\README_EN.utf8 850 1208
- @if exist bin\utf8\README_ES.utf8 del bin\utf8\README_ES.utf8
- @call tools\rxtxtcnv.cmd  NLS\ES\README_ES bin\utf8\README_ES.utf8 850 1208
-# @if exist bin\utf8\README_FR.utf8 del bin\utf8\README_FR.utf8
-# @call tools\rxtxtcnv.cmd  NLS\FR\README_FR bin\utf8\README_FR.utf8 850 1208
-# @if exist bin\utf8\README_IT.utf8 del bin\utf8\README_IT.utf8
-# @call tools\rxtxtcnv.cmd  NLS\IT\README_IT bin\utf8\README_IT.utf8 850 1208
-# @if exist bin\utf8\README_JA.utf8 del bin\utf8\README_JA.utf8
-# @call tools\rxtxtcnv.cmd  NLS\JA\README_JA bin\utf8\README_JA.utf8 932 1208
-# @if exist bin\utf8\README_KO.utf8 del bin\utf8\README_KO.utf8
-# @call tools\rxtxtcnv.cmd  NLS\KO\README_KO bin\utf8\README_KO.utf8 949 1208
-# @if exist bin\utf8\README_NL.utf8 del bin\utf8\README_NL.utf8
-# @call tools\rxtxtcnv.cmd  NLS\NL\README_NL bin\utf8\README_NL.utf8 850 1208
- @if exist bin\utf8\README_RU.utf8 del bin\utf8\README_RU.utf8
- @call tools\rxtxtcnv.cmd  NLS\RU\README_RU bin\utf8\README_RU.utf8 866 1208
-# @if exist bin\utf8\README_TW.utf8 del bin\utf8\README_TW.utf8
-# @call tools\rxtxtcnv.cmd  NLS\TW\README_TW bin\utf8\README_TW.utf8 950 1208
-    
-$(GOTCHAEXE).lnk: $(GOTCHAEXE).lnk.tpl  
-  $(SED) -e "s;(GOTMAJOR);$(GOTMAJOR);g" &
-    -e "s;(GOTMINOR);$(GOTMINOR);g"   &
-    -e "s;(GOTREVISION);$(GOTREVISION);g"   &
-    -e "s;(GOTFIXLEVEL);$(GOTFIXLEVEL);g"   &
-    -e "s;(GOTBUILDDATE);$(GOTBUILDDATE);g" &
-    -e "s;Sun \|Mon \|Tue \|Wed \|Thu \|Fri \|Sat ;;g" &
-    -e "s;(GOTBUILDMACHINE);$(GOTBUILDMACHINE);g"   &
-    $(GOTCHAEXE).lnk.tpl > $(GOTCHAEXE).lnk  
-
-$(GOTCHAEXE).exe: $(GOTCHAEXE).lnk gotcha.obj about.obj helper.obj rstring.obj settings.obj $(GOTCHAEXE).res 
-    $(LINK) $(LFLAGS) @$(GOTCHAEXE).lnk f &
-    gotcha.obj, &
-    about.obj,  &
-    helper.obj, &
-    rstring.obj, &
-    settings.obj &
-    lib dll\gotchdll.lib lib mmpm2.lib lib $(GBMPATH)\gbm.lib lib $(SRCDIR)\tools\gbmmemw.lib lib $(PMPRINTFPATH)\pmprintf.lib lib libconv.lib
-    $(RC) $(RFLAGS) $(SRCDIR)\$(GOTCHAEXE).res $(GOTCHAEXE).exe
-    $(PERL) $(MAPSYMW) $(GOTCHAEXE).map 
-    mapxqs.exe $(GOTCHAEXE).map
-    lxlite $(GOTCHAEXE).exe /x- /b-
-    lxlite $(GOTCHAEXE).exe /c:minstub
-    $(COPY) *.exe *.sym *.xqs *.map* bin
-        
-.cpp.obj: .AUTODEPEND
-    $(CC) /I$(INCLDIR) $(CFLAGS) $*.cpp
-    
-$(GOTCHAEXE).res: $(SRCDIR)/$(GOTCHAEXE).rc $(SRCDIR)\data\$(GOTCHAEXE).ICO  
-    $(RC) $(RFLAGS) -i=$(INCLDIR) -r $(SRCDIR)\$(GOTCHAEXE).rc    
-
-clean:: .symbolic 
-    -$(ERASE) *.obj dll\*.obj
-    -$(ERASE) *.lib dll\*.lib
-    -$(ERASE) *.exe
-    -$(ERASE) *.res /s
-    -$(ERASE) *.err /s
-    -$(ERASE) *.dll dll\*.dll
-    -$(ERASE) NLS\*.dll /s
-    -$(ERASE) *.hlp /s
-    -$(ERASE) bin\readme* warpin\gotcha\*.* /y
-    -$(ERASE) *.lnk /s
-    -$(ERASE) *.map*
-    -$(ERASE) *.sym
-    -$(ERASE) *.xqs
-    -$(ERASE) *.*~  /s
-    -$(ERASE) *~    /s 
-    -$(ERASE) *.ini /s /z
-    -$(ERASE) CLIP
-    
Index: unk/model.h
===================================================================
--- /trunk/model.h	(revision 169)
+++ 	(revision )
@@ -1,162 +1,0 @@
-/*
-
-model.c - Work on the model used in GbmV2
-
-*/
-
-#ifndef MODEL_H
-#define	MODEL_H
-
-#include "gbm\gbm.h"
-
-/* These needs to encompass all the GBM errors, plus some extras */
-typedef int MOD_ERR;
-#define	MOD_ERR_OK	((MOD_ERR) 0)
-#define	MOD_ERR_MEM	((MOD_ERR) 1)
-#define	MOD_ERR_OPEN	((MOD_ERR) 2)
-#define	MOD_ERR_CREATE	((MOD_ERR) 3)
-#define	MOD_ERR_SUPPORT	((MOD_ERR) 4)
-#define	MOD_ERR_HDC	((MOD_ERR) 5)
-#define	MOD_ERR_HPS	((MOD_ERR) 6)
-#define	MOD_ERR_HBITMAP	((MOD_ERR) 7)
-#define	MOD_ERR_HMF	((MOD_ERR) 8)
-#define	MOD_ERR_CLIP	((MOD_ERR) 9)
-#define MOD_ERR_READ_BPP ((MOD_ERR) 10)
-#define	MOD_ERR_GBM(rc)	((MOD_ERR) 0x8000+(rc))
-
-typedef struct
-	{
-	GBM gbm;
-	GBMRGB gbmrgb[0x100];
-	BYTE *pbData;
-	} MOD;
-
-#pragma pack(2)
-typedef struct
-{
-   BITMAPINFOHEADER2 bmp2;
-   RGB2   argb2Color[0x100]; /* unused for bitmaps >8bpp */
-   MOD    mod;
-} BITMAP;
-#pragma pack()
-
-
-extern MOD_ERR ModCreate(
-	int w, int h, int bpp, const GBMRGB gbmrgb[],
-	MOD *modNew
-	);
-
-extern MOD_ERR ModDelete(MOD *mod);
-
-extern MOD_ERR ModCopy(const MOD *mod, MOD *modNew);
-
-extern MOD_ERR ModMove(MOD *mod, MOD *modNew);
-
-extern MOD_ERR ModCreateFromFile(
-	const CHAR *szFn, const CHAR *szOpt,
-	MOD *modNew
-	);
-
-extern MOD_ERR ModWriteToFile(
-	const MOD *mod,
-	const CHAR *szFn, const CHAR *szOpt
-	);
-
-extern MOD_ERR ModExpandTo24Bpp(const MOD *mod, MOD *mod24);
-
-extern MOD_ERR ModReflectHorz(const MOD *mod, MOD *modNew);
-extern MOD_ERR ModReflectVert(const MOD *mod, MOD *modNew);
-extern MOD_ERR ModTranspose  (const MOD *mod, MOD *modNew);
-extern MOD_ERR ModRotate90   (const MOD *mod, MOD *modNew);
-extern MOD_ERR ModRotate180  (const MOD *mod, MOD *modNew);
-extern MOD_ERR ModRotate270  (const MOD *mod, MOD *modNew);
-
-extern MOD_ERR ModExtractSubrectangle(
-	const MOD *mod,
-	int x, int y, int w, int h,
-	MOD *modNew
-	);
-
-extern MOD_ERR ModBlit(
-	      MOD *modDst, int dx, int dy,
-	const MOD *modSrc, int sx, int sy,
-	int w, int h
-	);
-
-/*...scolour adjustment mappings:0:*/
-#define	CVT_I_TO_L	0
-#define	CVT_I_TO_P	1
-#define	CVT_L_TO_I	2
-#define	CVT_L_TO_P	3
-#define	CVT_P_TO_I	4
-#define	CVT_P_TO_L	5
-/*...e*/
-
-extern MOD_ERR ModColourAdjust(
-	const MOD *mod,
-	int map, double gama, double shelf,
-	MOD *modNew
-	);
-
-/*...sbpp palette and algorithm mappings:0:*/
-#define	CVT_BW		0
-#define	CVT_VGA		1
-#define	CVT_8		2
-#define	CVT_4G		3
-#define	CVT_784		4
-#define	CVT_666		5
-#define	CVT_444		6
-#define	CVT_8G		7
-#define	CVT_TRIPEL	8
-#define	CVT_RGB		9
-#define	CVT_FREQ	10
-#define	CVT_MCUT	11
-
-#define	CVT_NEAREST	0
-#define	CVT_ERRDIFF	1
-#define	CVT_HALFTONE	2
-/*...e*/
-
-extern MOD_ERR ModBppMap(
-	const MOD *mod,
-	int iPal, int iAlg,
-	int iKeepRed, int iKeepGreen, int iKeepBlue, int nCols,
-	MOD *modNew
-	);
-
-extern MOD_ERR ModFixRedeye(const MOD *mod, MOD *modNew);
-
-/*extern MOD_ERR ModResize(
-	const MOD *mod,
-	int nw, int nh,
-	BOOL isGrayscale,
-	BOOL useScaleFilter,
-	GBM_SCALE_FILTER scaleFilter,
-	MOD *modNew
-	); */
-
-extern MOD_ERR ModCreateFromHPS(
-	HPS hps, int w, int h, int bpp,
-	MOD *modNew
-	);
-
-extern MOD_ERR ModMakeHBITMAP(
-	const MOD *mod,
-	HAB hab,
-	HBITMAP *phbm
-	);
-
-extern MOD_ERR ModMakeBITMAP(
-	const MOD *mod,
-	BITMAP *pbmp
-	);
-
-extern MOD_ERR ModMakeHMF(
-	HBITMAP hbm,
-	HAB hab,
-	HMF *phmf
-	);
-
-extern const CHAR * ModErrorString(MOD_ERR rc);
-
-#endif
Index: unk/rstring.cpp
===================================================================
--- /trunk/rstring.cpp	(revision 169)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-#define INCL_DOS
-#include <os2.h>
-#include "rstring.h"
-
-HMODULE  ResourceString :: hmod = NULLHANDLE;
-
-ResourceString :: ResourceString (ULONG Id) : psz ("(string load error)")
-{
-    SavedId = Id;
-
-    if (DosGetResource (Module(), RT_STRING, Id/16+1, &BlockPointer))
-        return;
-
-    psz = PSZ (BlockPointer) + sizeof(USHORT);
-
-    USHORT Index = USHORT (Id % 16);
-    while (Index--)
-    {
-        psz += * PUCHAR (psz);
-        psz ++;
-    }
-
-    psz ++;
-}
Index: unk/rstring.h
===================================================================
--- /trunk/rstring.h	(revision 169)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-
-#ifndef _RSTRING_H_
-#define _RSTRING_H_
-
-//#define OS2EMX_PLAIN_CHAR
-#define INCL_DOSMODULEMGR
-
-#include <os2.h>
-
-#define RSTR(id)  ResourceString(id)
-
-class ResourceString
-{
-public:
-    ResourceString (ULONG Id);
-
-    ResourceString (const ResourceString &rstr) :SavedId (rstr.SavedId),
-        BlockPointer (rstr.BlockPointer), psz (rstr.psz)
-    {}
-
-    operator unsigned char * ()  { return ((unsigned char *) psz); }
-    operator char * ()           { return ((char *) psz); }
-
-    ResourceString & operator= (const ResourceString &rstr)
-    {
-        SavedId      = rstr.SavedId;
-        BlockPointer = rstr.BlockPointer;
-        psz          = rstr.psz;
-        return (*this);
-    }
-
-    static VOID  Module (HMODULE hmod) { ResourceString::hmod = hmod; }
-
-protected:
-    static HMODULE  Module (VOID) { return hmod; }
-
-private:
-    ULONG   SavedId;
-
-    PVOID   BlockPointer;
-    PSZ     psz;
-
-    static HMODULE      hmod;
-};
-
-#endif
Index: unk/savebmp.cpp
===================================================================
--- /trunk/savebmp.cpp	(revision 169)
+++ 	(revision )
@@ -1,730 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-
-#include <time.h>
-
-#include "gbm\gbm.h"
-#include "gbm\gbmmem.h"
-#include "model.h"
-
-/* ------------------------------ */
-static int StrideOf(const MOD *mod)
-{
-	return ( ( mod->gbm.w * mod->gbm.bpp + 31 ) / 32 ) * 4;
-	}
-/*...e*/
-
-/*...sAllocateData:0:*/
-static BOOL AllocateData(MOD *mod)
-	{
-	const unsigned long stride = StrideOf(mod);
-	if ( (mod->pbData = (UCHAR*) gbmmem_malloc(stride * mod->gbm.h)) == NULL )
-            return FALSE;
-        return TRUE;
-	}
-/*...e*/
-
-/*...sModCreate:0:*/
-MOD_ERR ModCreate(
-	int w, int h, int bpp, const GBMRGB gbmrgb[],
-	MOD *modNew
-	)
-	{
-	modNew->gbm.w   = w;
-	modNew->gbm.h   = h;
-	modNew->gbm.bpp = bpp;
-	if ( gbmrgb != NULL && bpp != 24 )
-		memcpy(&(modNew->gbmrgb), gbmrgb, sizeof(GBMRGB) << bpp);
-	if ( !AllocateData(modNew) )
-            return MOD_ERR_MEM;
-	return MOD_ERR_OK;
-	}
-/*...e*/
-
-/*MOD_ERR ModCreateFromHPS(
-	HPS hps, int w, int h, int bpp, //lBitCountScreen > 8 ) ? 24 : lBitCountScreen
-	MOD *modNew
-        )*/
-/*...sModCreateFromHPS:0:*/
-MOD_ERR ModCreateFromHPS(
-	HPS hps, int w, int h, int bpp,
-	MOD *modNew
-	)
-	{
-	MOD_ERR mrc;
-
-    #pragma pack(2)
-	struct
-		{
-		BITMAPINFOHEADER2 bmp2;
-		RGB2 argb2Color[0x100];
-		} bm;
-    #pragma pack()
-
-	if ( (mrc = ModCreate(w, h, bpp, NULL, modNew)) != MOD_ERR_OK )
-            return mrc;
-
-	memset(&(bm.bmp2), 0, sizeof(bm.bmp2));
-	bm.bmp2.cbFix     = sizeof(BITMAPINFOHEADER2);
-	bm.bmp2.cx        = w;
-	bm.bmp2.cy        = h;
-	bm.bmp2.cBitCount = bpp;
-	bm.bmp2.cPlanes   = 1;
-	GpiQueryBitmapBits(hps, 0L, h, modNew->pbData, (BITMAPINFO2 *) &bm);
-
-	if ( bpp != 24 )
-		{
-		int i;
-		for ( i = 0; i < (1<<bpp); i++ )
-			{
-			modNew->gbmrgb[i].r = bm.argb2Color[i].bRed  ;
-			modNew->gbmrgb[i].g = bm.argb2Color[i].bGreen;
-			modNew->gbmrgb[i].b = bm.argb2Color[i].bBlue ;
-			}
-                }
-	return MOD_ERR_OK;
-	}
-/*...e*/
-
-/*MOD_ERR ModWriteToFile(
-	const MOD *mod,
-	const CHAR *szFn, const CHAR *szOpt // ""
-        )*/
-/*...sModWriteToFile:0:*/
-MOD_ERR ModWriteToFile(
-	const MOD *mod,
-	const CHAR *szFn, const CHAR *szOpt
-	)
-	{
-	GBM_ERR grc;
-	int fd, ft, flag = 0;
-	GBMFT gbmft;
-
-        if ( (grc = gbm_guess_filetype(szFn, &ft)) != GBM_ERR_OK ) {
-            return grc;
-        }
-        gbm_query_filetype(ft, &gbmft);
-        
-	switch ( mod->gbm.bpp )
-		{
-		case 1:		flag = GBM_FT_W1;	break;
-		case 4:		flag = GBM_FT_W4;	break;
-		case 8:		flag = GBM_FT_W8;	break;
-		case 24:	flag = GBM_FT_W24;	break;
-		default:	flag = 0;	break;
-		}
-
-	if ( (gbmft.flags & flag) == 0 )
-            return MOD_ERR_SUPPORT;
-        
-	if ( (fd = gbm_io_create(szFn, GBM_O_WRONLY)) == -1 )
-		return MOD_ERR_CREATE;
-        
-        if ( (grc = gbm_write(szFn, fd, ft, &(mod->gbm), mod->gbmrgb,
-                              mod->pbData, szOpt)) != GBM_ERR_OK )
-		{
-		gbm_io_close(fd);
-                unlink(szFn);
-		return MOD_ERR_GBM(grc);
-		}
-        
-	gbm_io_close(fd);
-	return MOD_ERR_OK;
-	}
-/*...e*/
-// ** SaveBitmap ********************************************************** /*FOLD00*/
-
-VOID SaveBitmap (HBITMAP hbm, HPS hps, int width, int height,
-                 int bitCount, char *title)
-{
-#ifdef _DOLOGMEM_
-    LogMem("SaveBitmap", TRUE);
-#endif
-    MOD newmod;
-
-    if( pset->QueryFileSaveStyle () == FSS_FORCEFILE )
-    {
-        PSZ psz = pset->QueryForceSaveFile();
-        psz = AddExtensionToFilename( psz );
-        ModCreateFromHPS( hps, width, height,
-                         (bitCount > 8 ) ? 24 : bitCount,
-                         &newmod );
-        ModWriteToFile(&newmod, psz, "" );
-        
-#ifdef _DOLOGMEM_
-        LogMem( "SaveBitmap-1", FALSE );
-#endif
-        return;
-    }
-
-    if (pset->DoSound ())
-    {
-        DosBeep ( 500, 100);
-        DosBeep (1000, 100);
-        DosBeep (1500, 100);
-    }
-
-    switch (pset->QuerySaveStyle ())
-    {
-    case SAVESTYLE_CLIPBOARD:
-        SaveBitmapToClipboard (hbm);
-        break;
-
-    default:
-#ifdef _DOLOGDEBUG_
-        LogDebug( "SaveBitmap()" );
-#endif
-        if (SelectSaveFile (title)) {
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Before call to SaveBitmapToFile()" );
-#endif
-            ModCreateFromHPS( hps, width, height,
-                             (bitCount > 8 ) ? 24 : bitCount,
-                             &newmod );
-            ModWriteToFile(&newmod, pset->QuerySaveFile (), "" );
-
-#ifdef _DOLOGDEBUG_
-            LogDebug( "After call to SaveBitmapToFile()" );
-#endif
-        }
-        break;
-    }
-
-#ifdef _DOLOGMEM_
-    LogMem("SaveBitmap-2", FALSE);
-#endif
-}
-
-// ** SaveBitmapToClipboard *********************************************** /*FOLD00*/
-
-VOID SaveBitmapToClipboard (HBITMAP hbm)
-{
-#ifdef _DOLOGMEM_
-    LogMem("SaveBitmapToClipboard", TRUE);
-#endif
-    // copy the thing to the clipboard
-    WinOpenClipbrd (hab);
-    WinEmptyClipbrd (hab);
-    WinSetClipbrdData (hab, ULONG (hbm), CF_BITMAP, CFI_HANDLE);
-    WinCloseClipbrd (hab);
-#ifdef _DOLOGMEM_
-    LogMem("SaveBitmapToClipboard", FALSE);
-#endif
-}
-
-// ** SaveBitmapToFile **************************************************** /*FOLD00*/
-#if 0
-#define CB_12HEADER       sizeof (BITMAPINFOHEADER) // == 12
-#define CB_16HEADER       (sizeof (BITMAPINFOHEADER2)-24)
-#define CB_20HEADER       sizeof (BITMAPINFOHEADER2) // == 64
-
-
-VOID SaveBitmapToFile (HBITMAP hbm, PSZ psz, HPS hps)
-{
-    ULONG rc;
-
-#ifdef _DOLOGMEM_
-    LogMem("SaveBitmapToFile", TRUE);
-#endif
-#ifdef _DOLOGDEBUG_
-    LogDebug( "Start of SaveBitmapToFile()" );
-#endif
-    // get the fullsized bitmap info header from the bitmap
-    BITMAPINFOHEADER2  bih2;
-
-    bih2.cbFix = sizeof (BITMAPINFOHEADER2);
-    if (! GpiQueryBitmapInfoHeader (hbm, &bih2))
-    {
-#ifdef _DOLOGDEBUG_
-        LogDebug( "SaveBitmapToFile(): Exit GpiQueryBitmapInfoHeader" );
-#endif
-        DisplayError (RSTR(IDS_HEADER_ERROR),
-                      RSTR(IDS_ERROR_COULDNOTRETRIEVEHEADER),
-                      WinGetLastError (hab));
-        return;
-    }
-#ifdef _DOLOGDEBUG_
-    LogDebug( "SaveBitmapToFile(): GpiQueryBitmapInfoHeader ok." );
-#endif
-
-    // get the size of the colortable
-    ULONG   cbColtab = 0L, cColors = 0L;
-
-    if (bih2.cBitCount == 8)
-        cColors = 256L;
-    else if (bih2.cBitCount == 4)
-        cColors = 16L;
-    else if (bih2.cBitCount == 1)
-        cColors = 2L;
-
-    cbColtab = cColors * sizeof( RGB2 );
-
-    // get size of bits buffer and allocate it
-    ULONG cbBits =
-        (bih2.cBitCount * bih2.cx + 31L)/32L * bih2.cPlanes * 4L * bih2.cy;
-    PBYTE pb =
-        PBYTE (malloc (cbBits));
-
-    // allocate and init the file info header
-    PBITMAPFILEHEADER2 pbfh2 =
-        PBITMAPFILEHEADER2 (malloc (sizeof (BITMAPFILEHEADER2)+cbColtab));
-#ifdef _DOLOGDEBUG_
-    LogDebug( "SaveBitmapToFile(): Filling header." );
-#endif
-
-    // fill the bitmap header with the bitmap data
-    memcpy (&(pbfh2->bmp2), &bih2, sizeof (BITMAPINFOHEADER2));
-    pbfh2->bmp2.cbImage = cbBits;
-
-#ifdef _DOLOGDEBUG_
-    LogDebug( "SaveBitmapToFile(): Before GpiQueryBitmapBits." );
-#endif
-    // grab the bits!! ;-) - and the colortable
-    if (GpiQueryBitmapBits (hps, 0, bih2.cy, pb, PBITMAPINFO2 (&(pbfh2->bmp2)))
-        == GPI_ALTERROR)
-    {
-#ifdef _DOLOGDEBUG_
-        LogDebug( "SaveBitmapToFile(): Exit GpiQueryBitmapBits" );
-#endif
-        DisplayError (RSTR(IDS_HEADER_ERROR),
-                      RSTR(IDS_ERROR_COULDNOTGETBITMAPBITS),
-                      WinGetLastError (hab));
-        free (pb);
-        return;
-    }
-#ifdef _DOLOGDEBUG_
-    LogDebug( "SaveBitmapToFile(): GpiQueryBitmapBits ok." );
-#endif
-
-    pbfh2->usType   = BFT_BMAP;
-    pbfh2->offBits  = sizeof (BITMAPFILEHEADER2)-sizeof (BITMAPINFOHEADER2);
-
-    switch (pset->QueryFileFormat ())
-    {
-    case BMF_12:
-        pbfh2->offBits += CB_12HEADER + cColors*sizeof (RGB);
-        break;
-
-    case BMF_20:
-        pbfh2->offBits += CB_20HEADER + cColors*sizeof (RGB2);
-        break;
-
-    default:
-        pbfh2->offBits += CB_16HEADER + cColors*sizeof (RGB2);
-        break;
-    }
-
-    pbfh2->cbSize   = pbfh2->offBits+cbBits;
-    pbfh2->xHotspot = pbfh2->yHotspot = 0;
-
-#ifdef _DOLOGDEBUG_
-    LogDebug( "SaveBitmapToFile(): Before if." );
-#endif
-    if( ( pset->QueryFileFormat() == BMF_12 ) ||
-        ( pset->QueryFileFormat() == BMF_16 ) ||
-        ( pset->QueryFileFormat() == BMF_20 ) )
-    {
-        // open out file
-        FILE  *pf = fopen (psz, "wb");
-        if (! pf)
-        {
-            DisplayError (RSTR(IDS_HEADER_ERROR), RSTR(IDS_ERROR_COULDNOTOPENFILE),
-                          psz);
-            free (pb);
-            return;
-        }
-
-        // write file info header
-        fwrite (pbfh2, sizeof (BITMAPFILEHEADER2)-sizeof (BITMAPINFOHEADER2),
-                1, pf);
-
-        // write bitmap info header
-        switch (pset->QueryFileFormat ())
-        {
-        case BMF_12:
-            {
-                BITMAPINFOHEADER   bih;
-
-                bih.cbFix     = CB_12HEADER;
-                bih.cx        = USHORT (bih2.cx);
-                bih.cy        = USHORT (bih2.cy);
-                bih.cPlanes   = bih2.cPlanes;
-                bih.cBitCount = bih2.cBitCount;
-
-                fwrite (&bih, CB_12HEADER, 1, pf);
-            }
-            break;
-
-        case BMF_20:
-            pbfh2->bmp2.cbFix = CB_20HEADER;
-            fwrite (&(pbfh2->bmp2), CB_20HEADER, 1, pf);
-            break;
-
-        default:
-            pbfh2->bmp2.cbFix = CB_16HEADER;
-            fwrite (&(pbfh2->bmp2), CB_16HEADER, 1, pf);
-            break;
-        }
-
-        // write colortable if present
-        if (cbColtab)
-        {
-            switch (pset->QueryFileFormat ())
-            {
-            case BMF_12:
-                {
-                    RGB  rgb;
-                    for (USHORT i = 0; i < cColors; i++)
-                    {
-                        rgb.bRed   = PBITMAPINFO2 (&(pbfh2->bmp2))
-                            ->argbColor[i].bRed;
-                        rgb.bGreen = PBITMAPINFO2 (&(pbfh2->bmp2))
-                            ->argbColor[i].bGreen;
-                        rgb.bBlue  = PBITMAPINFO2 (&(pbfh2->bmp2))
-                            ->argbColor[i].bBlue;
-                        fwrite (&rgb, sizeof (rgb), 1, pf);
-                    }
-                }
-                break;
-
-            default:
-                fwrite (PBYTE (&(pbfh2->bmp2))+sizeof (BITMAPINFOHEADER2),
-                    cbColtab, 1, pf);
-                break;
-            }
-        }
-
-        // write the actual bitmap data bits
-        fwrite (pb, cbBits, 1, pf);
-        fclose (pf);
-    }
-
-#ifdef _DOLOGDEBUG_
-    LogDebug( "SaveBitmapToFile(): Everything done, closed file" );
-#endif
-
-    // set BITMAP file type ea
-    SetEAs( psz );
-
-    // cleanup and return
-    free (pbfh2);
-    free (pb);
-#ifdef _DOLOGMEM_
-    LogMem("SaveBitmapToFile", FALSE);
-#endif
-}
-#endif
-// ** SetEAs ************************************************************** /*FOLD00*/
-#if 0
-BOOL SetEAs (PSZ psz)
-{
-#ifdef _DOLOGMEM_
-    LogMem("SetEAs", TRUE);
-#endif
-    // alloc memory for EA data
-    CHAR    achComment[ 100 ];
-    time_t  tim = time_t( time( NULL ) );
-    sprintf( achComment, "Captured by %s on %s", PSZ_NAMEVERSION, ctime( &tim ) );
-    PSZ     pszName = ".TYPE", pszName2 = ".COMMENT";
-    PSZ     pszValue = pset->GetFileEAType();
-    USHORT  cbName = strlen (pszName)+1, cbName2 = strlen( pszName2 )+1;
-    USHORT  cbValue = strlen (pszValue)+1, cbValue2 = strlen( achComment )+1;
-    USHORT  usMemNeeded = sizeof (FEA2LIST) + cbName + cbValue +cbName2  + cbValue2;
-    PBYTE   pb = PBYTE (malloc (usMemNeeded));
-
-    EAOP2   eaop2;
-
-    eaop2.fpFEA2List = (FEA2LIST FAR *) pb;
-    eaop2.fpFEA2List->cbList = usMemNeeded;
-
-    eaop2.fpFEA2List->list[0].fEA     = 0;  // EA is no "must have"
-    eaop2.fpFEA2List->list[0].cbName  = cbName-1;
-    eaop2.fpFEA2List->list[0].cbValue = cbValue;
-    eaop2.fpFEA2List->list[1].fEA     = 0;  // EA is no "must have"
-    eaop2.fpFEA2List->list[1].cbName  = cbName2-1;
-    eaop2.fpFEA2List->list[1].cbValue = cbValue2;
-
-    strcpy (eaop2.fpFEA2List->list[0].szName, pszName);
-    memcpy (eaop2.fpFEA2List->list[0].szName+cbName, pszValue, cbValue);
-    strcpy (eaop2.fpFEA2List->list[1].szName, pszName2);
-    memcpy (eaop2.fpFEA2List->list[1].szName+cbName2, achComment, cbValue2);
-
-    if (DosSetPathInfo (psz, FIL_QUERYEASIZE, PVOID (&eaop2),
-                        sizeof (EAOP2), DSPI_WRTTHRU))
-    {
-        DisplayError (RSTR(IDS_HEADER_ERROR),
-                      RSTR(IDS_ERROR_COULDNOTWRITEFILETYPEEA));
-        free (pb);
-#ifdef _DOLOGMEM_
-    LogMem("SetEAs-1", FALSE);
-#endif
-        return FALSE;
-    }
-
-    free (pb);
-#ifdef _DOLOGMEM_
-    LogMem("SetEAs-2", FALSE);
-#endif
-    return TRUE;
-}
-#endif
-// ** SelectSaveFile ****************************************************** /*FOLD00*/
-
-BOOL SelectSaveFile (char *title)
-{
-#ifdef _DOLOGMEM_
-    LogMem("SelectSaveFile", TRUE);
-#endif
-    // if FSS_NUMFILES, create and return a new name
-    if (pset->QueryFileSaveStyle () == FSS_NUMFILES)
-    {
-        CHAR   ach[_MAX_PATH];
-        for (USHORT i = 0; i < 100; i++)
-        {
-#ifdef _QUIET_
-            if (g_installer)
-                sprintf( ach, strlen(pset->QueryNumSaveDir()) > 3 ? "%s\\Goq%02d.%s" : "%sGoq%02d.%s",
-                        pset->QueryNumSaveDir(),  i, pset->GetFileExtension() );
-            else
-#endif
-                sprintf( ach, strlen(pset->QueryNumSaveDir()) > 3 ? "%s\\%s%02d.%s" : "%s%s%02d.%s",
-                        pset->QueryNumSaveDir(), title, i, pset->GetFileExtension() );
-            if (access (ach, 1) != 0)
-            {
-                pset->SetSaveFile (ach);
-                return TRUE;
-            }
-        }
-        return FALSE;
-    }
-
-    // ... else do a file dlg
-    FILEDLG    fdlg;
-
-    memset (&fdlg, 0, sizeof (fdlg));
-
-    fdlg.hMod       = GETMODULE;
-    fdlg.usDlgId    = ID_DLG_FILE;
-    fdlg.pfnDlgProc = FileDLGProcedure;
-    fdlg.cbSize     = sizeof (fdlg);
-    fdlg.fl         = FDS_SAVEAS_DIALOG | FDS_CENTER | FDS_CUSTOM;
-    fdlg.pszTitle   = RSTR(IDS_SAVESCREENSHOTTO);
-    strcpy (fdlg.szFullFile, pset->QuerySaveFile ());
-
-    if (WinFileDlg (HWND_DESKTOP, HWND_DESKTOP, &fdlg))
-    {
-        if (fdlg.lReturn != DID_OK)
-            return FALSE;
-
-        PSZ pszOut = fdlg.szFullFile;
-
-        // Add bmp extension if not already present.
-        if( pset->AutoaddExtension() )
-            pszOut = AddExtensionToFilename( pszOut );
-
-        // if file exists and user wants it, confirm overwriting
-        if (pset->ConfirmOverwrite ())
-            if (access (pszOut, 0) == 0)
-                // let user confirm operation
-                if (WinMessageBox (HWND_DESKTOP, HWND_DESKTOP,
-                                   RSTR(IDS_FILEEXISTSOVERWRITE),
-                                   RSTR(IDS_HEADER_WARNING), 0L,
-                                   MB_OKCANCEL | MB_QUERY | MB_DEFBUTTON2 |
-                                   MB_MOVEABLE)
-                    != MBID_OK)
-                    return FALSE;
-
-        pset->SetSaveFile (pszOut);
-        return TRUE;
-    }
-    return FALSE;
-#ifdef _DOLOGMEM_
-    LogMem("SelectSaveFile", FALSE);
-#endif
-}
-
-// ** FileDLGProcedure **************************************************** /*FOLD00*/
-
-MRESULT EXPENTRY FileDLGProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
-{
-#ifdef _DOFNCOMPLETION_
-    static HDIR   hdir = NULLHANDLE;
-    static BOOL   fCompletion = FALSE;
-#endif
-
-    switch (msg)
-    {
-    case WM_INITDLG:
-
-        HMQ hmq;
-        BOOL bUniCodeFont;
-        CHAR ucFont[FACESIZE];
-        CHAR *lang;
-
-        lang = getenv("LANG");
-        bUniCodeFont = FALSE;
-        if (pset->GetLangID() == RU) {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 866);
-            //bUniCodeFont = TRUE;
-        }
-        else if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 852);
-            //bUniCodeFont = TRUE;
-        }
-        else {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 850);
-        }
-
-        if (bUniCodeFont) {
-            strcpy(ucFont, "9.Times New Roman MT 30");
-            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-        }
-        else if (g_installer) {
-            strcpy(ucFont, "9.WarpSans");
-            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-        }
-        WinSendDlgItemMsg (hwnd, WID_CB_AUTOADDEXTENSION, BM_SETCHECK,
-                           MPFROMLONG (pset->AutoaddExtension ()),
-                           MPFROMLONG (0));
-        WinSendDlgItemMsg (hwnd, WID_CB_CONFIRMOVERWRITE, BM_SETCHECK,
-                           MPFROMLONG (pset->ConfirmOverwrite ()),
-                           MPFROMLONG (0));
-/* FIXME neither work ...       WinSendDlgItemMsg (hwnd, DID_FILES_LB, WM_ENABLE,
-                           MPFROMLONG (TRUE),
-                           MPFROMLONG (0));
-        //WinEnableWindow( WinWindowFromID( hwnd, DID_FILES_LB ), TRUE ); */
-        break;
-
-#ifdef _DOFNCOMPLETION_
-    case WM_CHAR: {
-        HWND hwndFNE = WinWindowFromID (hwnd, DID_FILENAME_ED);
-        if (WinQueryFocus (HWND_DESKTOP) == hwndFNE)
-        {
-            // tab key, downpress
-            if ((CHARMSG (&msg)->chr == 9) && !
-                (CHARMSG (&msg)->fs & KC_KEYUP))
-            {
-                ULONG         c = 1, fl;
-                FILEFINDBUF3  findbuf;
-                APIRET        rc;
-                CHAR          ach[_MAX_PATH];
-
-                if (! hdir)
-                {
-                    WinQueryWindowText (hwndFNE, _MAX_PATH-1, ach);
-                    strcat (ach, "*");
-                    fl   = FILE_NORMAL;
-                    hdir = HDIR_CREATE;
-                    rc = DosFindFirst (ach, &hdir, fl, &findbuf,
-                                       sizeof (findbuf), &c,
-                                       FIL_STANDARD);
-                }
-                else
-                {
-                    rc = DosFindNext (hdir, &findbuf,
-                                      sizeof (findbuf), &c);
-                }
-
-                if (! rc)
-                {
-                    fCompletion = TRUE;
-                    WinSetWindowText (hwndFNE, findbuf.achName);
-                    fCompletion = FALSE;
-                }
-                else
-                    DosBeep (1000, 10);
-                return MRESULT (FALSE);
-            }
-        } } break;
-
-    case WM_CONTROL:
-        switch (SHORT1FROMMP (mp1))
-        {
-        case DID_FILENAME_ED:
-            if ((SHORT2FROMMP (mp1) == EN_CHANGE) ||
-                (SHORT2FROMMP (mp1) == EN_KILLFOCUS))
-                if (hdir && !fCompletion)
-                {
-                    // FIXME maybe do this to when closing dialog?
-                    DosFindClose (hdir);
-                    hdir = NULLHANDLE;
-                }
-            break;
-        }
-        break;
-#endif
-
-    case WM_COMMAND:
-    case WM_CLOSE:
-        pset->AutoaddExtension
-            (BOOL (WinSendDlgItemMsg (hwnd, WID_CB_AUTOADDEXTENSION,
-                                      BM_QUERYCHECK, 0, 0)));
-        pset->ConfirmOverwrite
-            (BOOL (WinSendDlgItemMsg (hwnd, WID_CB_CONFIRMOVERWRITE,
-                                      BM_QUERYCHECK, 0, 0)));
-        break;
-    }
-
-    return WinDefFileDlgProc (hwnd, msg, mp1, mp2);
-}
-
-// ** AddExtensionToFilename ********************************************** /*FOLD00*/
-
-PSZ AddExtensionToFilename( PSZ psz )
-{
-    // Using a static buffer here is not really good, but good enough
-    // currently as we know there will be no concurrent access.
-    static CHAR ach[_MAX_PATH];
-    PSZ pszExtension;
-
-    PSZ apszValidExtensions[16] =
-    { "bmp", "tif", "tiff", "tga", "targa", "pcx", "pnm", "jpg", "jpeg",
-    "jpg2", "jbg", "jbig", "png", "ppm", "raw", "dib" };
-
-    if( ! ( pszExtension = strrchr( psz, '.' ) ) ) {
-        // No extension at all - add the appropriate one.
-        sprintf( ach, "%s.%s", psz, pset->GetFileExtension() );
-    } else if( stricmp ( pszExtension+1, pset->GetFileExtension() ) == 0 ) {
-        // Correct extension already - just return unchanged filename.
-        strcpy( ach, psz );
-    } else {
-        // Some extension, but not the correct one - change or append.
-        BOOL fValidExtension = FALSE;
-        for( int i = 0; i < 16; i++ ) {
-            if( stricmp( pszExtension+1, apszValidExtensions[i] ) == 0 ) {
-                fValidExtension = TRUE;
-                break;
-            }
-        }
-        if( fValidExtension ) {
-            // Valid extension, but not right for current format - replace.
-            *pszExtension = '\0';
-            sprintf( ach, "%s.%s", psz, pset->GetFileExtension() );
-        } else {
-            // Some extension but not a valid image file format extension - add.
-            sprintf( ach, "%s.%s", psz, pset->GetFileExtension() );
-        }
-    }
-    return ach;
-}
-
-// ************************************************************************
Index: unk/setgoq.cmd
===================================================================
--- /trunk/setgoq.cmd	(revision 169)
+++ 	(revision )
@@ -1,10 +1,0 @@
-
-SET GOTMAJOR=2
-SET GOTMINOR=0
-SET GOTREVISION=3
-SET GOTFIXLEVEL=2
-time > CLIP: < timetemp
-input %%GOTBUILDDATE < CLIP:
-SET GOTBUILDMACHINE=Zobopeep
-SET _QUIET_=1
-WMAKE CLEAN
Index: unk/setgot.cmd
===================================================================
--- /trunk/setgot.cmd	(revision 169)
+++ 	(revision )
@@ -1,10 +1,0 @@
-
-SET GOTMAJOR=2
-SET GOTMINOR=0
-SET GOTREVISION=3
-SET GOTFIXLEVEL=2
-time > CLIP: < timetemp
-input %%GOTBUILDDATE < CLIP:
-SET GOTBUILDMACHINE=Zobopeep
-SET _QUIET_=
-WMAKE CLEAN
Index: unk/settings.cpp
===================================================================
--- /trunk/settings.cpp	(revision 169)
+++ 	(revision )
@@ -1,1742 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-#include <direct.h>
-#include <uconv.h>
-#include "settings.h"
-#include "ctype.h"
-
-#include "./settings/thth_settings.cpp"
-
-PSZ SETTINGS::pszPageTab[COUNT_PAGES]; /* = {
-    "Saving", "Snapshot window", "Misc", "Language" };
-    // FIXME nls*/
-
-bool saveum = FALSE;
-SWP swpDef = { 0,0,0, 98,66, 0,0,0,0 };
-SWP swpDefSSW = { 0,0,0, 10,10, 0,0,0,0 };
-USHORT ausDef[7] = { 0 };
-USHORT ausDefSSW[7] = { 0 };
-
-ImageFormatInfo Settings::ifi[BMF_INVALID] =
-{
-    { TRUE, BMF_JPG,   "JPEG Interchange File Format (jpg)", "jpg", "JPG" },
-    { TRUE, BMF_PNG,   "Portable Network Graphics (png)", "png", "PNG" },
-    { TRUE, BMF_OS20,  "OS/2 Bitmap 2.0 (bmp)", "bmp", "Bitmap" },
-    { TRUE, BMF_TIF,   "Microsoft/Aldus Tagged Image File Format (tif)", "tif", "TIFF" },
-    { TRUE, BMF_TGA,   "Truevision Targa/Vista (tga)", "tga", "Targa" },
-    { TRUE, BMF_PCX,   "ZSoft PC Paintbrush Image Format (pcx)", "pcx", "PCX" },
-    { TRUE, BMF_GIF,   "Portable Anymap (pnm)", "pnm", "PNM" },
-    { TRUE, BMF_PBM,   "Portable Pixel-map (ppm)", "ppm", "PPM" },
-    { TRUE, BMF_JP2,   "Jpeg 2000 (provided by the Open Source OpenJPEG library) (jp2)", "jp2", "JP2" },
-    { TRUE, BMF_DIB,   "Device Independent Bitmap (dib)", "dib", "DIB" }
-};
-
-
-PTHTH_SE apse[] =
-{
-    new THTH_SES (SEI_SAVEFILE, "Save", "Filename", "gotcha.png"),
-    new THTH_SES (SEI_FORCESAVEFILE, "Save", "ForceSaveFilename", "force.png"),
-    new THTH_SEL (SEI_SAVESTYLE, "Save", "Style", SAVESTYLE_FILE),
-    new THTH_SEL (SEI_FILEFORMAT, "Save", "FileFormat", BMF_PNG),
-    new THTH_SEL (SEI_FILESAVESTYLE, "Save", "FileSaveStyle", FSS_PROMPT),
-
-    new THTH_SES (SEI_NUMSAVEDIR, "Save", "NumSaveDir", ""),
-    new THTH_SEF (SEI_HIDEWINDOW, "Extras", "HideWindow", TRUE),
-    new THTH_SEF (SEI_AUTOADDEXTENSION, "Extras", "AutoaddExtension", TRUE),
-    new THTH_SEF (SEI_CONFIRMOVERWRITE, "Extras", "ConfirmOverwrite", TRUE),
-    new THTH_SEF (SEI_DOSOUND, "Extras", "DoSound", TRUE),
-
-    new THTH_SEF (SEI_DELAYEDCAPTURE, "Extras", "DelayedCapture", FALSE),
-    new THTH_SEF (SEI_DELAYCOUNTDOWN, "Extras", "DelayCountdown", FALSE),
-    new THTH_SEL (SEI_DELAYTIME, "Extras", "DelayTime", 5),
-    new THTH_SEF (SEI_SERIALCAPTURE, "Extras", "SerialCapture", FALSE),
-    new THTH_SEL (SEI_SERIALTIME, "Extras", "SerialTime", 10),
-#ifdef _QUIET_
-    new THTH_SEL (SEI_SSWCAPTURETYPE, "Extras", "CaptureType", CAP_SCREEN),
-    new THTH_SEF (SEI_SNAPSHOTWINDOW, "Snapshot", NULL, NULL),
-#else
-    new THTH_SEF (SEI_SNAPSHOTWINDOW, "Snapshot", "Enable", FALSE),
-    new THTH_SEL (SEI_SSWCAPTURETYPE, "Snapshot", "CaptureType", CAP_SCREEN),
-    new THTH_SEF (SEI_SSWHIDE, "Snapshot", "Hide", TRUE),
-    new THTH_SEF (SEI_SSWALWAYSONTOP, "Snapshot", "AlwaysOnTop", TRUE),
-#endif
-    new THTH_SEF (SEI_IDLEPRIORITY, "Extras", "IdlePriority", FALSE),
-
-    new THTH_SEB (SEI_SWP, "Window", "SWP", &swpDef, sizeof (swpDef)),
-    new THTH_SEB (SEI_US, "Window", "US", &ausDef, sizeof (ausDef)),
-#ifndef _QUIET_
-    new THTH_SEB (SEI_SWPSSW, "Snapshot", "SWP", &swpDefSSW, sizeof (swpDefSSW)),
-    new THTH_SEB (SEI_USSSW, "Snapshot", "US", &ausDefSSW, sizeof (ausDefSSW)),
-#endif
-    new THTH_SES (SEI_LANGUAGE,     "Language", "Program", PSZ_DEFAULTLANGUAGEMOD),
-    new THTH_SES (SEI_LANGUAGEHELP, "Language", "Help", PSZ_DEFAULTLANGUAGEHELP),
-
-    new THTH_SEF (SEI_UPDATE178DONE, "Extras", "Update178Done", FALSE),
-
-    NULL,
-};
-
-PTHTH_SE apse2[] =
-{
-    new THTH_SES (SEI_SAVEFILE, "Save", "Filename", "gotcha.png"),
-    new THTH_SES (SEI_FORCESAVEFILE, "Save", "ForceSaveFilename", "force.png"),
-    new THTH_SEL (SEI_SAVESTYLE, "Save", "Style", SAVESTYLE_FILE),
-    new THTH_SEL (SEI_FILEFORMAT, "Save", "FileFormat", BMF_PNG),
-    new THTH_SEL (SEI_FILESAVESTYLE, "Save", "FileSaveStyle", FSS_NUMFILES),
-
-    new THTH_SES (SEI_NUMSAVEDIR, "Save", "NumSaveDir", ""),
-    new THTH_SEF (SEI_HIDEWINDOW, "Extras", "HideWindow", TRUE),
-    new THTH_SEF (SEI_AUTOADDEXTENSION, "Extras", "AutoaddExtension", TRUE),
-    new THTH_SEF (SEI_CONFIRMOVERWRITE, "Extras", "ConfirmOverwrite", TRUE),
-    new THTH_SEF (SEI_DOSOUND, "Extras", "DoSound", TRUE),
-
-    new THTH_SEF (SEI_DELAYEDCAPTURE, "Extras", "DelayedCapture", FALSE),
-    new THTH_SEF (SEI_DELAYCOUNTDOWN, "Extras", "DelayCountdown", FALSE),
-    new THTH_SEL (SEI_DELAYTIME, "Extras", "DelayTime", 5),
-    new THTH_SEF (SEI_SERIALCAPTURE, "Extras", "SerialCapture", FALSE),
-    new THTH_SEL (SEI_SERIALTIME, "Extras", "SerialTime", 10),
-#ifdef _QUIET_
-    new THTH_SEL (SEI_SSWCAPTURETYPE, "Extras", "CaptureType", CAP_SCREEN),
-    new THTH_SEF (SEI_SNAPSHOTWINDOW, "Snapshot", NULL, NULL),
-#else
-    new THTH_SEF (SEI_SNAPSHOTWINDOW, "Snapshot", "Enable", FALSE),
-    new THTH_SEL (SEI_SSWCAPTURETYPE, "Snapshot", "CaptureType", CAP_SCREEN),
-    new THTH_SEF (SEI_SSWHIDE, "Snapshot", "Hide", TRUE),
-    new THTH_SEF (SEI_SSWALWAYSONTOP, "Snapshot", "AlwaysOnTop", TRUE),
-#endif
-    new THTH_SEF (SEI_IDLEPRIORITY, "Extras", "IdlePriority", FALSE),
-
-    new THTH_SEB (SEI_SWP, "Window", "SWP", &swpDef, sizeof (swpDef)),
-    new THTH_SEB (SEI_US, "Window", "US", &ausDef, sizeof (ausDef)),
-#ifndef _QUIET_
-    new THTH_SEB (SEI_SWPSSW, "Snapshot", "SWP", &swpDefSSW, sizeof (swpDefSSW)),
-    new THTH_SEB (SEI_USSSW, "Snapshot", "US", &ausDefSSW, sizeof (ausDefSSW)),
-#endif
-    new THTH_SES (SEI_LANGUAGE,     "Language", "Program", PSZ_DEFAULTLANGUAGEMOD),
-    new THTH_SES (SEI_LANGUAGEHELP, "Language", "Help", PSZ_DEFAULTLANGUAGEHELP),
-
-    new THTH_SEF (SEI_UPDATE178DONE, "Extras", "Update178Done", FALSE),
-
-    NULL,
-};
-
-// ** Settings ************************************************************ /*FOLD00*/
-
-Settings :: Settings (VOID) :
-#ifdef _QUIET_
-    ththSettings(g_installer ? apse2 : apse, g_installer ? g_installerINI : "gotchaq.ini",
-                 L_PROFILEVERSION)
-#else
-    ththSettings(apse, "gotcha.ini", L_PROFILEVERSION)
-#endif
-{
-    if( ! QueryFlag( SEI_UPDATE178DONE ) ) {
-        SetLong( SEI_SERIALTIME, QueryLong( SEI_SERIALTIME ) * 20 );
-        SetFlag( SEI_UPDATE178DONE );
-    } 
-#ifdef _QUIET_
-    HINI hini;
-    if (!g_installer)
-        hini = PrfOpenProfile (hab, "gotchaq.ini");
-#else
-    HINI hini = PrfOpenProfile (hab, "gotcha.ini");
-#endif
-    BOOL fLChange = FALSE;
-    if (!g_installer) {
-        ULONG ulDataSize;
-        PrfQueryProfileSize(hini, "Language", "LangChangeRequested", &ulDataSize );
-        PrfQueryProfileData(hini, "Language", "LangChangeRequested", &fLChange, &ulDataSize);
-        }
-    if (!fLChange) {
-    CHAR *lang = getenv("LANG");
-#ifdef _QUIET_
-    PSZ  psz = "goqresen";
-#else
-    PSZ  psz = "gotresen";
-#endif
-    PSZ  pszh = "gotcha_en";
-    if (lang) {
-        if (!strnicmp(lang, "es", 2)) {
-#ifdef _QUIET_
-            psz = "goqreses";
-#else
-            psz = "gotreses";
-#endif
-            pszh = "gotcha_es";
-        }
-        else if (!strnicmp(lang, "cs", 2)) {
-#ifdef _QUIET_
-            psz = "goqrescz";
-#else
-            psz = "gotrescz";
-#endif
-        }
-        else if (!strnicmp(lang, "de", 2)) {
-#ifdef _QUIET_
-            psz = "goqresde";
-#else
-            psz = "gotresde";
-#endif
-        }
-                else if (!strnicmp(lang, "ru", 2)) {
-#ifdef _QUIET_
-            psz = "goqresru";
-#else
-            psz = "gotresru";
-#endif
-        }
-#if 0
-        else if (!strnicmp(lang, "it", 2)) {
-#ifdef _QUIET_
-            psz = "goqresit";
-#else
-            psz = "gotresit";
-#endif
-        }
-        else if (!strnicmp(lang, "br", 2)) {
-#ifdef _QUIET_
-            psz = "goqresbr";
-#else
-            psz = "gotresbr";
-#endif
-        }
-#endif
-    }
-        SetString(SEI_LANGUAGE, psz);
-        SetString (SEI_LANGUAGEHELP, pszh);
-        if (!g_installer) {
-            Save ();
-    
-            if (hini)
-                PrfCloseProfile (hini);
-        }
-    }
-    //Reset Save directory for installer
-    if (g_installer) {
-        SetNumSaveDir (g_installerSavePath);
-    }
-    // to get the error msgs in default language
-    ReloadResources (QueryString(SEI_LANGUAGE));
-#ifdef _QUIET_
-    if (!g_installer) {
-#endif
-        if (Error () == 1)
-        {
-            FileNotOpenError ();
-            ReloadResources (QueryString(SEI_LANGUAGE));
-        }
-        else if (Error () == 2)
-        {
-            VersionError ();
-            ReloadResources (QueryString(SEI_LANGUAGE));
-        }
-#ifdef _QUIET_
-    }
-#endif
-}
-
-// ** VersionError ********************************************************
-
-USHORT SETTINGS :: VersionError (VOID)
-{
-    DisplayError (RSTR(IDS_HEADER_WARNING), RSTR(IDS_ERROR_INIFILEWRONGVERSION),
-                  QueryProfileName ());
-#ifndef _QUIET_
-    SelectLanguage();
-#endif
-    return 0;
-}
-
-// ** FileNotOpenError **************************************************** /*FOLD00*/
-
-USHORT SETTINGS :: FileNotOpenError (VOID)
-{
-    DisplayError (RSTR(IDS_HEADER_ERROR), RSTR(IDS_ERROR_INIFILENOTOPEN),
-                  QueryProfileName ());
-#ifndef _QUIET_
-    SelectLanguage();
-#endif
-    return 0;
-}
-
-// ** Dialog ************************************************************** /*FOLD00*/
-
-// FIXME YUKKI! YUKKI!! YUKKI!!! But I'm too lazy to do it better now :-)
-HWND g_hwndSettingsDialog = NULL;
-HWND g_hwndPage0 = NULL;
-
-BOOL SETTINGS :: Dialog (BOOL fOnlyLanguage)
-{
-#ifdef _DOLOGDEBUG_
-    LogDebug( "Dialog: checkpoint 1" );
-#endif
-    fAutoLanguage = fOnlyLanguage;
-
-    // load the main dialog window
-    hwndDlg = WinLoadDlg (HWND_DESKTOP, hwndFrame, PFNWP (DialogProcedure),
-                          GETMODULE, ID_DLG_SETTINGS, this);
-    // FIXME YUKKI! YUKKI!! YUKKI!!! But I'm too lazy to do it better now :-)
-    g_hwndSettingsDialog = hwndDlg;
-#ifdef _DOLOGDEBUG_
-    LogDebug( "Dialog: checkpoint 2" );
-#endif
-
-    // disable this two buttons if only language select
-    if (fAutoLanguage)
-    {
-        WinEnableWindow (WinWindowFromID (hwndDlg, WID_PB_HELP), FALSE);
-        WinEnableWindow (WinWindowFromID (hwndDlg, WID_PB_UNDO), FALSE);
-    }
-
-    HWND   hwndNB = WinWindowFromID (hwndDlg, WID_NB_SETTINGS);
-#ifdef _DOLOGDEBUG_
-    LogDebug( "Dialog: checkpoint 3" );
-#endif
-
-    // set notebook background color
-    WinSendMsg (hwndNB, BKM_SETNOTEBOOKCOLORS,
-                MPFROMLONG (SYSCLR_DIALOGBACKGROUND),
-                MPFROMSHORT (BKA_BACKGROUNDPAGECOLORINDEX));
-
-    // set tab dimensions
-    WinSendMsg (hwndNB, BKM_SETDIMENSIONS,
-                MPFROM2SHORT (80, 25), MPFROMSHORT (BKA_MAJORTAB));
-#ifdef _DOLOGDEBUG_
-    LogDebug( "Dialog: checkpoint 4" );
-#endif
-
-    ULONG   idPage[COUNT_PAGES];
-    USHORT  i, cPages;
-
-    if (fOnlyLanguage)
-    {
-        cPages = 1;
-
-        idPage[0] = (ULONG)
-            WinSendMsg (hwndDlg, BKM_INSERTPAGE, 0L,
-                        MPFROM2SHORT (BKA_MAJOR | BKA_AUTOPAGESIZE,
-                                      BKA_LAST));
-        WinSendMsg (hwndDlg, BKM_SETTABTEXT, MPFROMLONG (idPage[0]),
-                    MPFROMP (pszPageTab[COUNT_PAGES-1]));
-        hwndPage[0] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) Page4Procedure,
-                                  GETMODULE, ID_DLG_SETTINGSPAGE4, this);
-    }
-    else
-    {
-        cPages = COUNT_PAGES;
-
-        // insert empty pages
-        for (i = 0; i < cPages; i++)
-        {
-            idPage[i] = (ULONG)
-                WinSendMsg (hwndNB, BKM_INSERTPAGE, 0L,
-                            MPFROM2SHORT (BKA_MAJOR | BKA_AUTOPAGESIZE,
-                                          BKA_LAST));
-            //if (pset->GetLangID() == CZ || pset->GetLangID() == RU || pset->GetLangID() == PL) {
-                UniChar     target[300];
-                CHAR       ucLangStr[300];
-                UconvObject     uconv_object866 = NULL;
-                UconvObject     uconv_object852 = NULL;
-                UconvObject     uconv_object1207 = NULL;
-                UconvObject     uconv_object850 = NULL;
-                HAB hab;
-                CHAR ucFont[FACESIZE];
-    
-                UniCreateUconvObject((UniChar *)L"IBM-852", &uconv_object852);
-                UniCreateUconvObject((UniChar *)L"IBM-850", &uconv_object850);
-                UniCreateUconvObject((UniChar *)L"IBM-866", &uconv_object866);
-                UniCreateUconvObject((UniChar *)L"IBM-1207", &uconv_object1207);
-                
-                strcpy(ucLangStr, pszPageTab[i]);
-                if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
-                    
-                    UniStrToUcs( uconv_object852, target, ucLangStr, 299);
-                }
-                else if (pset->GetLangID() == RU)
-                    UniStrToUcs( uconv_object866, target, ucLangStr, 299);
-                else {
-                    UniStrToUcs( uconv_object850, target, ucLangStr, 299);
-                }
-                UniStrFromUcs( uconv_object1207, ucLangStr, target, 300);
-                WinSendMsg (hwndNB, BKM_SETTABTEXT,
-                            MPFROMLONG (idPage[i]), MPFROMP (ucLangStr));
-                if (uconv_object866)
-                    UniFreeUconvObject(uconv_object866);
-                if (uconv_object852)
-                    UniFreeUconvObject(uconv_object852);
-                if (uconv_object850)
-                    UniFreeUconvObject(uconv_object850);
-                if (uconv_object1207)
-                    UniFreeUconvObject(uconv_object1207);
-            //}
-            else
-                WinSendMsg (hwndNB, BKM_SETTABTEXT,
-                            MPFROMLONG (idPage[i]), MPFROMP (pszPageTab[i]));
-        }
-#ifndef _QUIET_
-        // open and assign dialogs to pages
-        hwndPage[0] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) Page1Procedure,
-                                  GETMODULE, ID_DLG_SETTINGSPAGE1, this);
-        hwndPage[1] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) Page2Procedure,
-                                  GETMODULE, ID_DLG_SETTINGSPAGE2, this);
-        hwndPage[2] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) Page3Procedure,
-                                  GETMODULE, ID_DLG_SETTINGSPAGE3, this);
-        hwndPage[3] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) Page4Procedure,
-                                  GETMODULE, ID_DLG_SETTINGSPAGE4, this);
-#else
-        hwndPage[0] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) WindowProcedure,
-                                  GETMODULE, ID_DLG_SETTINGSPAGE0, this);
-        hwndPage[1] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) Page2Procedure,
-                                  GETMODULE, ID_DLG_SETTINGSPAGE2, this);
-        hwndPage[2] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) Page1Procedure,
-                                  GETMODULE, ID_DLG_SETTINGSPAGE1, this);
-        hwndPage[3] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) Page4Procedure,
-                                  GETMODULE, ID_DLG_SETTINGSPAGE4, this);
-        g_hwndPage0 = hwndPage[0];
-        
-#endif
-    }
-#ifdef _DOLOGDEBUG_
-    LogDebug( "Dialog: checkpoint 5" );
-#endif
-
-    // combine dlg-handle and page ids
-    for (i = 0; i < cPages; i++)
-        WinSendMsg (hwndNB, BKM_SETPAGEWINDOWHWND,
-                    MPFROMLONG (idPage[i]), MPFROMHWND (hwndPage[i]));
-
-    for (i = 0; i < cPages; i++)
-        WinSendMsg (hwndPage[i], UM_SETTINGS2DIALOG, 0,0);
-#ifdef _DOLOGDEBUG_
-    LogDebug( "Dialog: checkpoint 6" );
-#endif
-    WinSendDlgItemMsg (g_hwndPage0, WID_RB_FILE, BM_CLICK,
-                       MPFROMSHORT (TRUE), 0);
-#ifdef _QUIET_
-    if (HACCEL haccel = WinLoadAccelTable (hab, GETMODULE, 1)) {
-        int rc = WinSetAccelTable (hab, haccel, hwndDlg);
-    }
-#endif
-    WinSetActiveWindow( HWND_DESKTOP, hwndDlg );
-#ifdef _DOLOGDEBUG_
-    LogDebug( "Dialog: checkpoint 7" );
-#endif
-
-    WinProcessDlg (hwndDlg);
-#ifdef _DOLOGDEBUG_
-    LogDebug( "Dialog: checkpoint 7.5" );
-#endif
-    WinDestroyWindow (hwndDlg);
-#ifdef _DOLOGDEBUG_
-    LogDebug( "Dialog: checkpoint 8" );
-#endif
-#ifndef _QUIET_
-    // it ain't the best way to do it, but ...
-    SetIdlePriority(QueryFlag(SEI_IDLEPRIORITY));
-#endif
-    for (i = 0; i < COUNT_PAGES; i++)
-        hwndPage[i] = NULL;
-
-    hwndDlg = NULLHANDLE;
-#ifdef _DOLOGDEBUG_
-    LogDebug( "Dialog: checkpoint 9" );
-#endif
-    return TRUE;
-}
-
-
-// ** DialogProcedure ***************************************************** /*FOLD00*/
-
-MRESULT EXPENTRY SETTINGS :: DialogProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
-{
-    static PSETTINGS   pset = NULL;
-
-#ifdef _DOLOGDEBUG_
-    LogDebug( "DialogProcedure:Message 0x%04x", msg );
-#endif
-
-    switch (msg)
-    {
-    case WM_INITDLG:
-        {
-#ifdef _DOLOGDEBUG_
-        LogDebug( "DialogProcedure: start WM_INITDLG" );
-#endif
-        pset = PSETTINGS (mp2);
-#ifdef _DOLOGDEBUG_
-        LogDebug( "DialogProcedure: end WM_INITDLG" );
-#endif
-        CHAR ucFont[FACESIZE];
-
-        //if (pset->GetLangID() == CZ || pset->GetLangID() == RU || pset->GetLangID() == PL) {
-           UniChar     target[300];
-           CHAR       ucLangStr[300];
-           UconvObject     uconv_object866 = NULL;
-           UconvObject     uconv_object852 = NULL;
-           UconvObject     uconv_object1207 = NULL;
-           UconvObject     uconv_object850 = NULL;
-           HAB hab;
-           //CHAR ucFont[FACESIZE];
-
-           UniCreateUconvObject((UniChar *)L"IBM-852", &uconv_object852);
-           UniCreateUconvObject((UniChar *)L"IBM-850", &uconv_object850);
-           UniCreateUconvObject((UniChar *)L"IBM-866", &uconv_object866);
-           UniCreateUconvObject((UniChar *)L"IBM-1207", &uconv_object1207);
-
-           WinLoadString(hab, g_hmod, IDS_OK, sizeof(ucLangStr), ucLangStr);
-           if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
-               
-               UniStrToUcs( uconv_object852, target, ucLangStr, 299);
-           }
-           else if (pset->GetLangID() == RU)
-               UniStrToUcs( uconv_object866, target, ucLangStr, 299);
-           else {
-               UniStrToUcs( uconv_object850, target, ucLangStr, 299);
-           }
-           UniStrFromUcs( uconv_object1207, ucLangStr, target, 300);
-           WinSetDlgItemText(hwnd, WID_PB_OK, ucLangStr);
-
-           WinLoadString(hab, g_hmod, IDS_UNDO, sizeof(ucLangStr), ucLangStr);
-           if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
-               
-               UniStrToUcs( uconv_object852, target, ucLangStr, 299);
-           }
-           else if (pset->GetLangID() == RU)
-               UniStrToUcs( uconv_object866, target, ucLangStr, 299);
-           else {
-               UniStrToUcs( uconv_object850, target, ucLangStr, 299);
-           }
-           UniStrFromUcs( uconv_object1207, ucLangStr, target, 300);
-           WinSetDlgItemText(hwnd, WID_PB_UNDO, ucLangStr);
-           WinLoadString(hab, g_hmod, IDS_HELP, sizeof(ucLangStr), ucLangStr);
-
-           if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
-               
-               UniStrToUcs( uconv_object852, target, ucLangStr, 299);
-           }
-           else if (pset->GetLangID() == RU)
-               UniStrToUcs( uconv_object866, target, ucLangStr, 299);
-           else {
-               UniStrToUcs( uconv_object850, target, ucLangStr, 299);
-           }
-           UniStrFromUcs( uconv_object1207, ucLangStr, target, 300);
-           WinSetDlgItemText(hwnd, WID_PB_HELP, ucLangStr);
-           if (uconv_object866)
-               UniFreeUconvObject(uconv_object866);
-           if (uconv_object852)
-               UniFreeUconvObject(uconv_object852);
-           if (uconv_object850)
-               UniFreeUconvObject(uconv_object850);
-           if (uconv_object1207)
-               UniFreeUconvObject(uconv_object1207);
-           HMQ hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-           WinSetCp(hmq, 1207);
-           if (pset->GetLangID() == CZ || pset->GetLangID() == RU || pset->GetLangID() == PL) {
-               strcpy(ucFont, "9.Times New Roman MT 30");
-               WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-           }
-        //}
-           else if (g_installer) {
-               strcpy(ucFont, "9.WarpSans");
-               WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-           }
-        return MRESULT (FALSE);
-        }
-    case WM_COMMAND:
-        switch (SHORT1FROMMP (mp1))
-        {
-#if 1
-        case WID_PB_HELP:{
-            HWND hwndPage;
-            USHORT usDlgId;
-            ULONG ulPageId =
-		(ULONG) WinSendMsg(WinWindowFromID(hwnd, WID_NB_SETTINGS),
-				   BKM_QUERYPAGEID, 0, MPFROM2SHORT(BKA_TOP,
-                                                                    0));
-            hwndPage =
-                LONGFROMMP(WinSendMsg
-                           (WinWindowFromID(hwnd, WID_NB_SETTINGS),
-                            BKM_QUERYPAGEWINDOWHWND, MPFROMLONG(ulPageId),
-                            0));
-            usDlgId = WinQueryWindowUShort(hwndPage, QWS_ID);
-
-            HMQ hmq;
-            BOOL bUniCodeFont = FALSE;
-            CHAR ucFont[FACESIZE];
-            
-            if (pset->GetLangID() == RU) {
-                hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-                WinSetCp(hmq, 866);
-                bUniCodeFont = TRUE;
-            }
-            else if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
-                hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-                WinSetCp(hmq, 852);
-                bUniCodeFont = TRUE;
-            }
-            else {
-                hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-                WinSetCp(hmq, 850);
-            }
-            if (usDlgId == ID_DLG_SETTINGSPAGE0)
-                g_phelp->DisplayPanel(2);
-            else if (usDlgId == ID_DLG_SETTINGSPAGE1)
-                g_phelp->DisplayPanel(2210);
-#ifdef _QUIET_
-            else if (usDlgId == ID_DLG_SETTINGSPAGE2 && (pset->GetLangID() != IT &&
-                                                         pset->GetLangID() != BR))
-                g_phelp->DisplayPanel(2235);
-#else
-            else if (usDlgId == ID_DLG_SETTINGSPAGE2)
-                g_phelp->DisplayPanel(3);
-#endif
-            else if (usDlgId == ID_DLG_SETTINGSPAGE3)
-                g_phelp->DisplayPanel(2230);
-            else if (usDlgId == ID_DLG_SETTINGSPAGE4)
-                g_phelp->DisplayPanel(2240);
-            else
-                g_phelp->DisplayPanel(4);
-            break;
-        }
-#endif
-        case WID_PB_OK:
-#ifdef _DOLOGDEBUG_
-            LogDebug( "DialogProcedure: start WID_PB_OK" );
-#endif
-            saveum = TRUE;
-            WinSendMsg (hwnd, WM_CLOSE, 0,0);
-#ifdef _DOLOGDEBUG_
-            LogDebug( "DialogProcedure: end WID_PB_OK" );
-#endif
-            break;
-            
-        case WID_PB_UNDO:
-            {
-                ULONG  id = (ULONG)
-                    WinSendDlgItemMsg (hwnd, WID_NB_SETTINGS,
-                                       BKM_QUERYPAGEID, 0,
-                                       MPFROM2SHORT (BKA_TOP, 0));
-                if (id)
-                {
-                    HWND   hwndPage = (HWND)
-                        WinSendDlgItemMsg (hwnd, WID_NB_SETTINGS,
-                                           BKM_QUERYPAGEWINDOWHWND,
-                                           MPFROMLONG (id), 0);
-                // Make mp1 1 for default use it to select setting on pages
-                    WinSendMsg (hwndPage, UM_SETTINGS2DIALOG, 0,0);
-                }
-            }
-            break;
-#ifndef _QUIET_
-        case WID_PB_ABOUT:
-            AboutBox (hwnd);
-            break;
-#endif
-        case DID_CANCEL:
-            {
-                // Undo stuff on all notebook pages:
-                HWND hwndPage;
-
-                // Get ID of first notebook page.
-                ULONG id =
-                    ULONG( WinSendDlgItemMsg( hwnd, WID_NB_SETTINGS,
-                                              BKM_QUERYPAGEID, 0,
-                                              MPFROM2SHORT( BKA_FIRST, 0 ) ) );
-                if( id ) {
-                    hwndPage =
-                        HWND( WinSendDlgItemMsg( hwnd, WID_NB_SETTINGS,
-                                                 BKM_QUERYPAGEWINDOWHWND,
-                                                 MPFROMLONG( id ), 0 ) );
-                    WinSendMsg( hwndPage, UM_SETTINGS2DIALOG, 0,0 );
-                }
-
-                while( id ) {
-                    // Get ID of next notebook page.
-                    if( ( id =
-                          ULONG( WinSendDlgItemMsg( hwnd, WID_NB_SETTINGS,
-                                                    BKM_QUERYPAGEID,
-                                                    MPFROMLONG( id ),
-                                                    MPFROM2SHORT( BKA_NEXT, 0 )
-                                                  ) ) ) ) {
-                        hwndPage =
-                            HWND( WinSendDlgItemMsg( hwnd, WID_NB_SETTINGS,
-                                                     BKM_QUERYPAGEWINDOWHWND,
-                                                     MPFROMLONG( id ), 0 ) );
-                        WinSendMsg( hwndPage, UM_SETTINGS2DIALOG, 0,0 );
-                    }
-                }
-                WinSendMsg( hwnd, WM_CLOSE, 0,0 );
-            }
-            break;
-        }
-        return MRESULT (FALSE);
-
-#ifdef _DOLOGDEBUG_
-    case WM_DESTROY:
-        LogDebug( "DialogProcedure: WM_DESTROY" );
-        return MRESULT (FALSE);
-#endif
-
-    case WM_CLOSE:
-#ifdef _DOLOGDEBUG_
-        LogDebug( "DialogProcedure: WM_CLOSE" );
-#endif
-    case WM_QUIT:
-#ifdef _DOLOGDEBUG_
-        LogDebug( "DialogProcedure: WM_QUIT" );
-#endif
-    case WM_SAVEAPPLICATION:
-#ifdef _DOLOGDEBUG_
-        LogDebug( "DialogProcedure: WM_SAVEAPPLICATION" );
-#endif
-#ifdef _DOLOGDEBUG_
-        LogDebug( "DialogProcedure: start WM_CLOSE (or WM_QUIT, WM_SAVEAPPLICATION)" );
-#endif
-        for (USHORT i = 0; i < COUNT_PAGES; i++)
-            WinSendMsg (pset->hwndPage[i], UM_ADJUST, 0,0);
-#ifdef _DOLOGDEBUG_
-        LogDebug( "DialogProcedure: end WM_CLOSE (or WM_QUIT, WM_SAVEAPPLICATION)" );
-#endif
-        WinDismissDlg( hwnd, 0L );
-        return MRESULT (FALSE);
-    }
-
-#ifdef _DOLOGDEBUG_
-    LogDebug( "DialogProcedure:WinDefDlgProc->0x%04x", msg );
-#endif
-    return WinDefDlgProc (hwnd, msg, mp1, mp2);
-}
-
-// ** Page1Procedure ****************************************************** /*FOLD00*/
-
-MRESULT EXPENTRY SETTINGS :: Page1Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
-{
-    static PSETTINGS   pset = NULL;
-
-    switch (msg)
-    {
-    case WM_INITDLG: {
-#ifdef _DOLOGDEBUG_
-        LogDebug( "Page1Procedure: start WM_INITDLG" );
-#endif
-        ULONG ul;
-        pset = PSETTINGS (mp2);
-        for( int i = 0; i < BMF_INVALID; i++ ) {
-            if( pset->ifi[ i ].available ) {
-                ul = WinInsertLboxItem( WinWindowFromID( hwnd, WID_LB_FILEFORMAT ),
-                                        LIT_END, pset->ifi[ i ].label );
-                WinSendMsg( WinWindowFromID( hwnd, WID_LB_FILEFORMAT ),
-                            LM_SETITEMHANDLE, MPFROMLONG(ul), MPFROMP( i ) );
-            }
-        }
-        HMQ hmq;
-        BOOL bUniCodeFont = FALSE;
-        CHAR ucFont[FACESIZE];
-
-        if (pset->GetLangID() == RU) {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 866);
-            bUniCodeFont = TRUE;
-        }
-        else if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 852);
-            bUniCodeFont = TRUE;
-        }
-        else {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 850);
-        }
-
-        if (bUniCodeFont) {
-            strcpy(ucFont, "9.Times New Roman MT 30");
-            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-        }
-        else if (g_installer) {
-            strcpy(ucFont, "9.WarpSans");
-            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-        }
-
-#ifdef _DOLOGDEBUG_
-        LogDebug( "Page1Procedure: end WM_INITDLG" );
-#endif
-        return MRESULT (FALSE);
-    }
-
-    case WM_COMMAND:
-        if( SHORT1FROMMP( mp1 ) == DID_CANCEL )
-            WinPostMsg( g_hwndSettingsDialog, msg, mp1, mp2 );
-        return MRESULT( FALSE );
-
-    case UM_SETTINGS2DIALOG: {
-#ifdef _DOLOGDEBUG_
-        LogDebug( "Page1Procedure: start UM_SETTINGS2DIALOG" );
-#endif
-        // set num save dir name
-        WinSendDlgItemMsg (hwnd, WID_E_NUMSAVEDIR, EM_SETTEXTLIMIT,
-                           MPARAM (_MAX_PATH-1), (MPARAM)0);
-        WinSetDlgItemText (hwnd, WID_E_NUMSAVEDIR,
-                           pset->QueryNumSaveDir ());
-        WinSendDlgItemMsg (hwnd, WID_E_NUMSAVEDIR, EM_SETSEL,
-                           MPFROM2SHORT (0, _MAX_PATH), (MPARAM)0);
-
-        // set force file name
-        WinSendDlgItemMsg (hwnd, WID_E_FORCESAVEFILE, EM_SETTEXTLIMIT,
-                           MPARAM (_MAX_PATH-1), (MPARAM)0);
-        WinSetDlgItemText (hwnd, WID_E_FORCESAVEFILE,
-                           pset->QueryForceSaveFile ());
-        WinSendDlgItemMsg (hwnd, WID_E_FORCESAVEFILE, EM_SETSEL,
-                           MPFROM2SHORT (0, _MAX_PATH), (MPARAM)0);
-
-        // Select the appropriate entry in the fileformat-listbox.
-        HWND     hwndLB = WinWindowFromID( hwnd, WID_LB_FILEFORMAT );
-        ULONG    c, i;
-
-        c = WinQueryLboxCount( hwndLB );
-        for( i = 0; i < c; i++ )
-        {
-            ULONG type = ULONG( WinSendDlgItemMsg( hwnd, WID_LB_FILEFORMAT,
-                                                   LM_QUERYITEMHANDLE,
-                                                   MPFROMLONG(i), NULL ) );
-            if( type == ULONG( pset->QueryFileFormat() ) )
-                break;
-        }
-        if( i < c )
-            WinSendDlgItemMsg( hwnd, WID_LB_FILEFORMAT, LM_SELECTITEM,
-                               MPFROMSHORT(i), MPFROMSHORT(TRUE) );
-        else
-            WinSendDlgItemMsg( hwnd, WID_LB_FILEFORMAT, LM_SELECTITEM,
-                               MPFROMSHORT(0), MPFROMSHORT(TRUE) );
-#ifdef _QUIET_
-        // set play sound button
-        pset->AdjustButton (hwnd, WID_CB_DOSOUND,
-                            pset->DoSound ());
-#endif
-        // Select appropriate radiobutton for save style.
-        switch (pset->QueryFileSaveStyle ())
-        {
-        case FSS_NUMFILES:
-            WinSendDlgItemMsg (hwnd, WID_RB_FSSNUMFILES, BM_CLICK,
-                               MPFROMSHORT(TRUE), 0);
-            AdjustSaveTypeButtons (FALSE);
-            break;
-
-        case FSS_FORCEFILE:
-            WinSendDlgItemMsg (hwnd, WID_RB_FSSFORCEFILE, BM_CLICK,
-                               MPFROMSHORT(TRUE), 0);
-            AdjustSaveTypeButtons (TRUE);
-            break;
-
-        default:
-            WinSendDlgItemMsg (hwnd, WID_RB_FSSPROMPT, BM_CLICK,
-                               MPFROMSHORT(TRUE), 0);
-            AdjustSaveTypeButtons (FALSE);
-            break;
-        }
-#ifdef _DOLOGDEBUG_
-        LogDebug( "Page1Procedure: end UM_SETTINGS2DIALOG" );
-#endif
-        return MRESULT (FALSE);
-    }
-
-    case UM_ADJUST:
-        {
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page1Procedure: start UM_ADJUST" );
-#endif
-            // get file save style
-            if (WinSendMsg (WinWindowFromID (hwnd, WID_RB_FSSNUMFILES),
-                            BM_QUERYCHECK, 0,0))
-                pset->SetFileSaveStyle (FSS_NUMFILES);
-            else if (WinSendMsg (WinWindowFromID (hwnd, WID_RB_FSSFORCEFILE),
-                                 BM_QUERYCHECK, 0,0))
-                pset->SetFileSaveStyle (FSS_FORCEFILE);
-            else
-                pset->SetFileSaveStyle (FSS_PROMPT);
-#ifdef _QUIET_
-            pset->DoSound(WinQueryButtonCheckstate
-                          (hwnd, WID_CB_DOSOUND));
-#endif
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page1Procedure: checkpoint 1" );
-#endif
-
-            // Get file format.
-            ULONG ul = USHORT( WinSendDlgItemMsg( hwnd, WID_LB_FILEFORMAT,
-                                                  LM_QUERYSELECTION,
-                                                  MPFROMLONG( LIT_FIRST ),
-                                                  0L ) );
-            ul = ULONG( WinSendDlgItemMsg( hwnd, WID_LB_FILEFORMAT,
-                                           LM_QUERYITEMHANDLE,
-                                           MPFROMLONG( ul ), NULL ) );
-            pset->SetFileFormat( SHORT( ul ) );
-
-            pset->SetSaveFile(AddExtensionToFilename(pset->QuerySaveFile()));
-
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page1Procedure: checkpoint 2" );
-#endif
-
-            // num save dir file name
-            CHAR   psz[_MAX_PATH];
-            WinQueryDlgItemText (hwnd, WID_E_NUMSAVEDIR, _MAX_PATH, psz);
-            pset->SetNumSaveDir (psz);
-
-            // force file name
-            WinQueryDlgItemText (hwnd, WID_E_FORCESAVEFILE, _MAX_PATH, psz);
-            pset->SetForceSaveFile (psz);
-
-            AdjustSaveTypeButtons
-                (BOOL (pset->QueryFileSaveStyle () == FSS_FORCEFILE));
-            pset->saveStyle = pset->QuerySaveStyle ();
-            pset->pNumSaveDir = pset->QueryNumSaveDir ();
-            pset->pForceSaveFile = pset->QueryForceSaveFile();
-
-            if (saveum)
-                pset->Save ();
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page1Procedure: end UM_ADJUST" );
-#endif
-        }
-        break;
-
-    case WM_CONTROL:
-        switch (SHORT1FROMMP (mp1))
-        {
-        case WID_RB_FSSFORCEFILE:
-            AdjustSaveTypeButtons (TRUE);
-            break;
-
-        case WID_RB_FSSPROMPT:
-        case WID_RB_FSSNUMFILES:
-            AdjustSaveTypeButtons (FALSE);
-            break;
-        }
-        return MRESULT (FALSE);
-    }
-
-    return WinDefDlgProc (hwnd, msg, mp1, mp2);
-}
-
-// ** Page2Procedure ****************************************************** /*FOLD00*/
-
-MRESULT EXPENTRY SETTINGS :: Page2Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
-{
-    static PSETTINGS   pset = NULL;
-
-    switch (msg)
-    {
-    case WM_INITDLG: {
-#ifdef _DOLOGDEBUG_
-        LogDebug( "Page1Procedure: start WM_INITDLG" );
-#endif
-        pset = PSETTINGS (mp2);
-#ifdef _DOLOGDEBUG_
-        LogDebug( "Page1Procedure: end WM_INITDLG" );
-#endif
-        HMQ hmq;
-        BOOL bUniCodeFont = FALSE;
-        CHAR ucFont[FACESIZE];
-        
-        if (pset->GetLangID() == RU) {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 866);
-            bUniCodeFont = TRUE;
-        }
-        else if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 852);
-            bUniCodeFont = TRUE;
-        }
-        else {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 850);
-        }
-
-        if (bUniCodeFont) {
-            strcpy(ucFont, "9.Times New Roman MT 30");
-            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-        }
-        else if (g_installer) {
-            strcpy(ucFont, "9.WarpSans");
-            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-        }
-        return MRESULT (FALSE);
-    }
-    case WM_COMMAND:
-
-        if( SHORT1FROMMP( mp1 ) == WID_PB_OK) {
-            saveum = TRUE;
-            WinSendMsg ( g_hwndSettingsDialog, WM_CLOSE, 0,0);
-        }
-        if( SHORT1FROMMP( mp1 ) == DID_CANCEL )
-            WinPostMsg( g_hwndSettingsDialog, msg, mp1, mp2 );
-        return MRESULT( FALSE );
-
-    case UM_SETTINGS2DIALOG:
-#ifdef _DOLOGDEBUG_
-        LogDebug( "Page2Procedure: start UM_SETTINGS2DIALOG" );
-#endif
-#ifndef _QUIET_
-        // set state of checkbuttons
-        pset->AdjustButton (hwnd, WID_CB_SSWENABLE,
-                            pset->SnapshotWindow ());
-        pset->AdjustButton (hwnd, WID_CB_SSWHIDE,
-                            pset->SSWHide ());
-        pset->AdjustButton (hwnd, WID_CB_SSWALWAYSONTOP,
-                            pset->SSWAlwaysOnTop ());
-#else
-        pset->AdjustButton (hwnd, WID_CB_SERIALCAPTURE,
-                            pset->SerialCapture ());
-        pset->AdjustButton (hwnd, WID_CB_DELAYCOUNTDOWN,
-                            pset->DelayCountdown ());
-        pset->AdjustButton (hwnd, WID_CB_DELAYEDCAPTURE,
-                            pset->DelayedCapture ());
-
-        // init delay time sb
-        WinSendDlgItemMsg (hwnd, WID_SB_DELAYTIME, SPBM_SETLIMITS,
-                           MPFROMLONG (65536), MPFROMLONG (1));
-        WinSendDlgItemMsg (hwnd, WID_SB_DELAYTIME, SPBM_SETCURRENTVALUE,
-                           MPFROMLONG (pset->QueryDelayTime ()), 0);
-
-        // init serial time sb
-        WinSendDlgItemMsg (hwnd, WID_SB_SERIALTIME, SPBM_SETLIMITS,
-                           MPFROMLONG (65536), MPFROMLONG (1));
-        WinSendDlgItemMsg (hwnd, WID_SB_SERIALTIME, SPBM_SETCURRENTVALUE,
-                           MPFROMLONG (pset->QuerySerialTime ()), 0);
-#endif
-        switch (pset->QuerySSWCaptureType ())
-        {
-        case CAP_WINDOWINT:
-            WinSendDlgItemMsg (hwnd, WID_SSWWINDOWINT, BM_CLICK,
-                               MPFROMSHORT(TRUE), 0);
-            break;
-        case CAP_SCREENREGION:
-            WinSendDlgItemMsg (hwnd, WID_SSWSCREENREGION, BM_CLICK,
-                               MPFROMSHORT(TRUE), 0);
-            break;
-        case CAP_WINDOW:
-            WinSendDlgItemMsg (hwnd, WID_SSWWINDOW, BM_CLICK,
-                               MPFROMSHORT(TRUE), 0);
-            break;
-        default:
-            WinSendDlgItemMsg (hwnd, WID_SSWSCREEN, BM_CLICK,
-                               MPFROMSHORT(TRUE), 0);
-            break;
-        }
-#ifndef _QUIET_
-        // show or hide snapshot window
-        if (! WinSendDlgItemMsg (hwnd, WID_CB_SSWENABLE,
-                                 BM_QUERYCHECK, 0, 0))
-            WinShowWindow (hwndSnapshot, FALSE);
-        else
-            WinShowWindow (hwndSnapshot, TRUE);
-#endif
-#ifdef _DOLOGDEBUG_
-        LogDebug( "Page1Procedure: end UM_SETTINGS2DIALOG" );
-#endif
-        return MRESULT (FALSE);
-
-    case UM_ADJUST:
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page2Procedure: start UM_ADJUST" );
-#endif
-#ifndef _QUIET_
-        // query state of checkbuttons and set flags
-        pset->SSWHide(WinQueryButtonCheckstate(hwnd, WID_CB_SSWHIDE));
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page2Procedure: checkpoint 1" );
-#endif
-        pset->SnapshotWindow(WinQueryButtonCheckstate(hwnd, WID_CB_SSWENABLE));
-        pset->SSWAlwaysOnTop(WinQueryButtonCheckstate(hwnd,
-                                                      WID_CB_SSWALWAYSONTOP));
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page2Procedure: checkpoint 2" );
-#endif
-#else
-            // query state of checkbuttons and set flags
-            pset->SerialCapture(WinQueryButtonCheckstate
-                                (hwnd, WID_CB_SERIALCAPTURE));
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page3Procedure: checkpoint 1" );
-#endif
-            pset->DelayCountdown(WinQueryButtonCheckstate
-                                 (hwnd, WID_CB_DELAYCOUNTDOWN));
-            pset->DelayedCapture (WinQueryButtonCheckstate
-                                  (hwnd,WID_CB_DELAYEDCAPTURE));
-#endif
-        // get ssw capture type
-        if (WinSendMsg (WinWindowFromID (hwnd, WID_SSWSCREENREGION),
-                        BM_QUERYCHECK, 0,0))
-            pset->SetSSWCaptureType (CAP_SCREENREGION);
-        else if (WinSendMsg (WinWindowFromID (hwnd, WID_SSWWINDOW),
-                             BM_QUERYCHECK, 0,0))
-            pset->SetSSWCaptureType (CAP_WINDOW);
-        else if (WinSendMsg (WinWindowFromID (hwnd, WID_SSWWINDOWINT),
-                             BM_QUERYCHECK, 0,0))
-            pset->SetSSWCaptureType (CAP_WINDOWINT);
-        else
-            pset->SetSSWCaptureType (CAP_SCREEN);
-#ifdef _QUIET_
-        // delay time
-        ULONG   ul;
-        if (! BOOL (WinSendDlgItemMsg (hwnd, WID_SB_DELAYTIME,
-                                       SPBM_QUERYVALUE,
-                                       MPFROMP (&ul),
-                                       MPFROM2SHORT (0, 0))))
-            ul = 5L;
-        pset->SetDelayTime (ul);
-#ifdef _DOLOGDEBUG_
-        LogDebug( "Page3Procedure: checkpoint 3" );
-#endif
-
-        // serial time
-        if (! BOOL (WinSendDlgItemMsg (hwnd, WID_SB_SERIALTIME,
-                                       SPBM_QUERYVALUE,
-                                       MPFROMP (&ul),
-                                       MPFROM2SHORT (0, 0))))
-            ul = 10L;
-        pset->SetSerialTime (ul);
-        pset->bSerialCapture = pset->SerialCapture ();
-#endif
-        if (saveum)
-            pset->Save ();
-#ifdef _DOLOGDEBUG_
-        LogDebug( "Page2Procedure: end UM_ADJUST" );
-#endif
-        break;
-
-    case WM_CONTROL:
-        switch (SHORT1FROMMP (mp1))
-        {
-#ifndef _QUIET_
-        case WID_CB_SSWENABLE:
-            if (! WinSendDlgItemMsg (hwnd, WID_CB_SSWENABLE,
-                                     BM_QUERYCHECK, 0, 0))
-                WinShowWindow (hwndSnapshot, FALSE);
-            else
-                WinShowWindow (hwndSnapshot, TRUE);
-            break;
-#endif
-        case WID_CB_DELAYEDCAPTURE:
-
-            WinSendDlgItemMsg (g_hwndPage0, WID_CB_DELAYEDCAPTURE, BM_SETCHECK,
-                               MPFROMLONG (WinQueryButtonCheckstate
-                                           (hwnd,WID_CB_DELAYEDCAPTURE)),
-                               MPFROMLONG (0));
-            WinSendDlgItemMsg (WinWindowFromID(hwndFrame, FID_CLIENT),
-                               WID_CB_DELAYEDCAPTURE, BM_SETCHECK,
-                               MPFROMLONG (WinQueryButtonCheckstate
-                                           (hwnd,WID_CB_DELAYEDCAPTURE)),
-                               MPFROMLONG (0));
-            break;
-        }
-        return MRESULT (FALSE);
-    }
-
-    return WinDefDlgProc (hwnd, msg, mp1, mp2);
-}
-
-// ** Page3Procedure ****************************************************** /*FOLD00*/
-
-MRESULT EXPENTRY SETTINGS :: Page3Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
-{
-    static PSETTINGS   pset = NULL;
-
-    switch (msg)
-    {
-    case WM_INITDLG: {
-#ifdef _DOLOGDEBUG_
-        LogDebug( "Page3Procedure: start WM_INITDLG" );
-#endif
-        pset = PSETTINGS (mp2);
-#ifdef _DOLOGDEBUG_
-        LogDebug( "Page3Procedure: end WM_INITDLG" );
-#endif
-        HMQ hmq;
-        BOOL bUniCodeFont = FALSE;
-        CHAR ucFont[FACESIZE];
-        
-        if (pset->GetLangID() == RU) {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 866);
-            bUniCodeFont = TRUE;
-        }
-        else if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 852);
-            bUniCodeFont = TRUE;
-        }
-        else {
-            hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-            WinSetCp(hmq, 850);
-        }
-
-        if (bUniCodeFont) {
-            strcpy(ucFont, "9.Times New Roman MT 30");
-            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-        }
-        return MRESULT (FALSE);
-    }
-
-    case WM_COMMAND:
-        if( SHORT1FROMMP( mp1 ) == DID_CANCEL )
-            WinPostMsg( g_hwndSettingsDialog, msg, mp1, mp2 );
-        return MRESULT( FALSE );
-
-    case UM_SETTINGS2DIALOG:
-#ifdef _DOLOGDEBUG_
-        LogDebug( "Page3Procedure: start UM_SETTINGS2DIALOG" );
-#endif
-        // set state of checkbuttons
-        pset->AdjustButton (hwnd, WID_CB_SERIALCAPTURE,
-                            pset->SerialCapture ());
-        pset->AdjustButton (hwnd, WID_CB_DELAYCOUNTDOWN,
-                            pset->DelayCountdown ());
-        pset->AdjustButton (hwnd, WID_CB_DOSOUND,
-                            pset->DoSound ());
-        pset->AdjustButton (hwnd, WID_CB_IDLEPRIORITY,
-                            pset->QueryFlag(SEI_IDLEPRIORITY));
-
-        // init delay time sb
-        WinSendDlgItemMsg (hwnd, WID_SB_DELAYTIME, SPBM_SETLIMITS,
-                           MPFROMLONG (65536), MPFROMLONG (1));
-        WinSendDlgItemMsg (hwnd, WID_SB_DELAYTIME, SPBM_SETCURRENTVALUE,
-                           MPFROMLONG (pset->QueryDelayTime ()), 0);
-
-        // init serial time sb
-        WinSendDlgItemMsg (hwnd, WID_SB_SERIALTIME, SPBM_SETLIMITS,
-                           MPFROMLONG (65536), MPFROMLONG (1));
-        WinSendDlgItemMsg (hwnd, WID_SB_SERIALTIME, SPBM_SETCURRENTVALUE,
-                           MPFROMLONG (pset->QuerySerialTime ()), 0);
-#ifdef _DOLOGDEBUG_
-        LogDebug( "Page3Procedure: end UM_SETTINGS2DIALOG" );
-#endif
-        return MRESULT (FALSE);
-
-    case UM_ADJUST:
-        {
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page3Procedure: start UM_ADJUST" );
-#endif
-            // query state of checkbuttons and set flags
-            pset->SerialCapture(WinQueryButtonCheckstate
-                                (hwnd, WID_CB_SERIALCAPTURE));
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page3Procedure: checkpoint 1" );
-#endif
-            pset->DelayCountdown(WinQueryButtonCheckstate
-                                 (hwnd, WID_CB_DELAYCOUNTDOWN));
-            pset->DoSound(WinQueryButtonCheckstate
-                          (hwnd, WID_CB_DOSOUND));
-            pset->SetFlag(SEI_IDLEPRIORITY, WinQueryButtonCheckstate
-                          (hwnd, WID_CB_IDLEPRIORITY));
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page3Procedure: checkpoint 2" );
-#endif
-
-            // delay time
-            ULONG   ul;
-            if (! BOOL (WinSendDlgItemMsg (hwnd, WID_SB_DELAYTIME,
-                                           SPBM_QUERYVALUE,
-                                           MPFROMP (&ul),
-                                           MPFROM2SHORT (0, 0))))
-                ul = 5L;
-            pset->SetDelayTime (ul);
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page3Procedure: checkpoint 3" );
-#endif
-
-            // serial time
-            if (! BOOL (WinSendDlgItemMsg (hwnd, WID_SB_SERIALTIME,
-                                           SPBM_QUERYVALUE,
-                                           MPFROMP (&ul),
-                                           MPFROM2SHORT (0, 0))))
-                ul = 10L;
-            pset->SetSerialTime (ul);
-            pset->bSerialCapture = pset->SerialCapture ();
-            pset->idleSetInIni = pset->QueryFlag(SEI_IDLEPRIORITY);
-
-            if (saveum)
-                pset->Save ();
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page3Procedure: end UM_ADJUST" );
-#endif
-        }
-        break;
-
-    case WM_CONTROL:
-        switch (SHORT1FROMMP (mp1))
-        {
-        case WID_CB_SERIALCAPTURE:
-            {
-                HWND hwndButton =
-                    WinWindowFromID (WinWindowFromID (hwndFrame, FID_CLIENT),
-                                     WID_CB_DELAYEDCAPTURE);
-                if (! WinSendDlgItemMsg (hwnd, WID_CB_SERIALCAPTURE,
-                                         BM_QUERYCHECK, 0, 0))
-                    WinEnableWindow (hwndButton, TRUE);
-                else
-                    WinEnableWindow (hwndButton, FALSE);
-            }
-            break;
-        }
-        return MRESULT (FALSE);
-    }
-
-    return WinDefDlgProc (hwnd, msg, mp1, mp2);
-}
-
-// ** Page4Procedure ****************************************************** /*FOLD00*/
-
-MRESULT EXPENTRY SETTINGS :: Page4Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
-{
-    static PSETTINGS   pset = NULL;
-
-    switch (msg)
-    {
-    case WM_INITDLG:
-        {
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page4Procedure: start WM_INITDLG" );
-#endif
-            pset = PSETTINGS (mp2);
-
-            HMQ hmq = WinQueryWindowULong(hwnd /*WinWindowFromID(hwnd, ID_DLG_SETTINGSPAGE4)*/, QWL_HMQ);
-            WinSetCp(hmq, 1207); // UPF-8 Unicode
-            WinRemovePresParam(hwnd, PP_FONTNAMESIZE);
-#ifndef _QUIET_ //??
-            pset->GetLanguages(WinWindowFromID (hwnd, WID_LB_LANGUAGES));
-#endif
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page4Procedure: WM_INITDLG: after GetLanguages()" );
-#endif
-#ifndef _QUIET_
-            WinSendMsg (hwnd, UM_SETTINGS2DIALOG, 0,0);
-
-            if (pset->fAutoLanguage)
-                WinEnableWindow (WinWindowFromID (hwnd, WID_ST_LANGNOTE),
-                                 FALSE);
-#endif
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page4Procedure: end WM_INITDLG" );
-#endif
-
-            UniChar     target[300];
-            CHAR       ucLangStr[300];
-            UconvObject     uconv_object866 = NULL;
-            UconvObject     uconv_object860 = NULL;
-            UconvObject     uconv_object852 = NULL;
-            UconvObject     uconv_object1207 = NULL;
-            UconvObject     uconv_object850 = NULL;
-            int result;
-            int i;
-            HAB hab;
-            CHAR ucFont[FACESIZE];
-
-            UniCreateUconvObject((UniChar *)L"IBM-852", &uconv_object852);
-            UniCreateUconvObject((UniChar *)L"IBM-850", &uconv_object850);
-            UniCreateUconvObject((UniChar *)L"IBM-866", &uconv_object866);
-           
-            UniCreateUconvObject((UniChar *)L"IBM-1207", &uconv_object1207);
-            for (i = 0; i < WID_ST_END - 400; i++) {
-                WinLoadString(hab, g_hmod, LANG_COPYRIGHT + i, sizeof(ucLangStr), ucLangStr);
-                if (pset->GetLangID() == 420 ||
-                    pset->GetLangID() == PL) {
-                    
-                    UniStrToUcs( uconv_object852, target, ucLangStr, 299);
-                }
-                else if (pset->GetLangID() == RU)
-                    UniStrToUcs( uconv_object866, target, ucLangStr, 299);
-                else {
-                    UniStrToUcs( uconv_object850, target, ucLangStr, 299);
-                }
-                UniStrFromUcs( uconv_object1207, ucLangStr, target, 300);
-                WinSetDlgItemText(hwnd, WID_ST_COPYRIGHT + i, ucLangStr);
-            }
-
-            if (uconv_object866)
-                UniFreeUconvObject(uconv_object866);
-            if (uconv_object852)
-                UniFreeUconvObject(uconv_object852);
-            if (uconv_object850)
-                UniFreeUconvObject(uconv_object850);
-            if (uconv_object1207)
-                UniFreeUconvObject(uconv_object1207);
-            CHAR *env, *p;
-            env = getenv("OSDIR");
-            p = env;
-            p++;
-            if (!stricmp(p, ":\\sys") || !stricmp(p, ":\\ecs")) {
-                strcpy(ucFont, "9.Workplace Sans");
-                WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-            }
-            else {
-                strcpy(ucFont, "9.Times New Roman MT 30");
-                WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-            }
-        return MRESULT (FALSE);
-        }
-
-    case WM_COMMAND:
-        if( SHORT1FROMMP( mp1 ) == DID_CANCEL )
-            WinPostMsg( g_hwndSettingsDialog, msg, mp1, mp2 );
-        return MRESULT( FALSE );
-#ifndef _QUIET_
-    case UM_SETTINGS2DIALOG:
-        {
-
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page4Procedure: start UM_SETTINGS2DIALOG" );
-#endif
-            // select the appropriate entry in the language-listbox
-            CHAR     ach[_MAX_FNAME];
-            HWND     hwndLB = WinWindowFromID (hwnd, WID_LB_LANGUAGES);
-            ULONG    c, i;
-
-            c = WinQueryLboxCount (hwndLB);
-
-            for (i = 0; i < c; i++)
-            {
-#ifdef _DOLOGDEBUG_
-                LogDebug( "Page4Procedure: UM_SETTINGS2DIALOG: i.1 = %d", i );
-#endif
-                PSZ psz = PSZ(WinSendDlgItemMsg (hwnd, WID_LB_LANGUAGES,
-                                                 LM_QUERYITEMHANDLE,
-                                                 MPFROMLONG(i), NULL));
-
-                if (stricmp (pset->QueryString(SEI_LANGUAGE), psz) == 0)
-                    break;
-            }
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page4Procedure: UM_SETTINGS2DIALOG: after loop 1" );
-#endif
-            if (i < c)
-                WinSendDlgItemMsg (hwnd, WID_LB_LANGUAGES, LM_SELECTITEM,
-                                   MPFROMSHORT (i), MPFROMSHORT (TRUE));
-            else
-                WinSendDlgItemMsg (hwnd, WID_LB_LANGUAGES, LM_SELECTITEM,
-                                   MPFROMSHORT (0), MPFROMSHORT (TRUE));
-#ifdef _DOLOGDEBUG_
-            LogDebug( "Page4Procedure: end UM_SETTINGS2DIALOG" );
-#endif
-        }
-        return MRESULT (FALSE);
-#endif
-    case WM_DESTROY:
-#ifndef _QUIET_
-        {
-            CHAR   ach[_MAX_FNAME];
-            BOOL fChanged = TRUE;
-
-            ULONG ul = USHORT (WinSendDlgItemMsg (hwnd, WID_LB_LANGUAGES,
-                                                  LM_QUERYSELECTION,
-                                                  MPFROMLONG (LIT_FIRST), 0L));
-            PSZ psz = PSZ(WinSendDlgItemMsg (hwnd, WID_LB_LANGUAGES,
-                                             LM_QUERYITEMHANDLE,
-                                             MPFROMLONG(ul), NULL));
-            if (stricmp (pset->QueryString(SEI_LANGUAGE), psz) == 0)
-                fChanged = FALSE;
-            else
-                pset->SetString(SEI_LANGUAGE, psz);
-
-            if (fChanged) {
-                if (!stricmp(psz, "gotreses") || !stricmp(psz, "goqreses"))
-                    strcpy(ach, "gotcha_es");
-                /*else if (!stricmp(psz, "gotresit") || !stricmp(psz, "goqresit"))
-                    strcpy(ach, "gotcha_it");*/
-                else
-                    strcpy(ach, "gotcha_en");
-                pset->SetString (SEI_LANGUAGEHELP, ach);
-            }
-            if (saveum && fChanged) {
-                pset->Save ();
-#ifdef _QUIET_
-                HINI hini = PrfOpenProfile (hab, "gotchaq.ini");
-#else
-                HINI hini = PrfOpenProfile (hab, "gotcha.ini");
-#endif
-                BOOL fLChanged = TRUE;
-                PrfWriteProfileData(hini, "Language", "LangChangeRequested", &fLChanged, sizeof(BOOL));
-                if (hini)
-                    PrfCloseProfile (hini);
-            }
-        }
-#endif
-        return MRESULT (FALSE);
-    }
-
-    return WinDefDlgProc (hwnd, msg, mp1, mp2);
-}
-
-// ** AdjustSaveTypeButtons *********************************************** /*FOLD00*/
-
-VOID AdjustSaveTypeButtons (BOOL f)
-{
-    HWND   hwndClient = WinWindowFromID (hwndFrame, FID_CLIENT);
-
-    // FIXME um, em, global variables :-$
-    WinEnableWindow (WinWindowFromID (hwndClient, WID_RB_CLIPBOARD), !f);
-    WinEnableWindow (WinWindowFromID (hwndClient, WID_RB_FILE), !f);
-}
-
-// ** QueryWindowData ***************************************************** /*FOLD00*/
-
-VOID SETTINGS :: QueryWindowData (SWP *pswp, USHORT us[7], BOOL f)
-{
-    // FIXME puke, yukk, choke! get this flag thing away! do it better!
-    // FIXME what is with US?
-    if (f)
-        memcpy (pswp, QueryBinary(SEI_SWPSSW), sizeof (SWP));
-    else
-        memcpy (pswp, QueryBinary(SEI_SWP), sizeof (SWP));
-
-    LONG  cx, cy;
-    cx = WinQuerySysValue (HWND_DESKTOP, SV_CXSCREEN);
-    cy = WinQuerySysValue (HWND_DESKTOP, SV_CYSCREEN);
-
-    if (pswp->cx < 32)
-        pswp->cx = 32;
-    // bigger than screen?
-    if (pswp->cx > cx)
-        pswp->cx = cx;
-    // partly outside of screen?
-    if (pswp->x+pswp->cx >= cx)
-        pswp->x = cx-pswp->cx;
-    if (pswp->cy < 32)
-        pswp->cy = 32;
-    // bigger than screen?
-    if (pswp->cy > cy)
-        pswp->cy = cy;
-    // partly outside of screen?
-    if (pswp->y+pswp->cy >= cy)
-        pswp->y = cy-pswp->cy;
-}
-
-// ** ReloadResources ***************************************************** /*FOLD00*/
-
-BOOL Settings :: ReloadResources (PSZ psz)
-{
-    if (g_hmod)
-        DosFreeModule(g_hmod);
-
-    APIRET  rc;
-
-    if ((rc = DosLoadModule(PSZ(NULL), 0, psz, &g_hmod)))
-    {
-        DisplayError("Error",
-                     "Could not (re)load resource module '%s' (return code %d). "
-                     "Make sure the DLL is in the LIBPATH. If this is the case, "
-                     "try deleting GOTCHA.INI and restart. If this fails, contact "
-                     "the author (ygk@qwest.net).", psz, rc);
-        exit(1);
-    }
-    PVOID pv;
-    INT Lang;
-
-    DosGetResource(g_hmod, RT_RCDATA, LANG_ID, &pv);
-    Lang = atoi((PCHAR) pv);
-    SetLangID(Lang);
-    ResourceString::Module(g_hmod);
-#ifdef _QUIET_
-    pszPageTab[0] = RSTR (IDS_MAINWIN);
-    pszPageTab[1] = RSTR (IDS_CAPTURE );
-    pszPageTab[2] = RSTR (IDS_PAGESAVE);
-    pszPageTab[3] = RSTR (IDS_PAGELANGUAGE);
-#else
-    pszPageTab[0] = RSTR (IDS_PAGESAVE);
-    pszPageTab[1] = RSTR (IDS_PAGESNAPSHOT);
-    pszPageTab[2] = RSTR (IDS_CAPTURE );
-    pszPageTab[3] = RSTR (IDS_PAGELANGUAGE);
-#endif
-    for( int i = 0; i < BMF_INVALID; i++ ) {
-        ifi[ i ].label = RSTR ( IDS_BMF_JPG+i ); }
-
-    return TRUE;
-}
-
-// ** SelectLanguage ****************************************************** /*FOLD00*/
-#ifndef _QUIET_
-VOID Settings :: SelectLanguage (VOID)
-{
-    // set this to some default, as we must open the settings dialog for
-    // selecting a language
-#ifdef _QUIET_
-//#if 1
-    pszPageTab[0] = RSTR (IDS_MAINWIN);
-    pszPageTab[1] = RSTR (IDS_CAPTURE );
-    pszPageTab[2] = RSTR (IDS_PAGESAVE);
-    pszPageTab[3] = RSTR (IDS_PAGELANGUAGE);
-#else
-    pszPageTab[0] = RSTR (IDS_PAGESAVE);
-    pszPageTab[1] = RSTR (IDS_PAGESNAPSHOT);
-    pszPageTab[2] = RSTR (IDS_CAPTURE );
-    pszPageTab[3] = RSTR (IDS_PAGELANGUAGE);
-#endif
-    // bring up the "select language" settings page
-    Dialog (TRUE);
-}
-#endif
-
-// ** GetLanguages ******************************************************** /*FOLD00*/
-#ifndef _QUIET_ //??
-USHORT Settings :: GetLanguages (HWND hwnd)
-{
-    // find all dlls and add the names to the language list
-    HDIR          hdir;
-    ULONG         c, fl, ul;
-    FILEFINDBUF3  findbuf;
-    APIRET        rc;
-    PSZ           psz;
-    HMODULE       hmod;
-
-    fl   = FILE_NORMAL;
-    hdir = HDIR_CREATE;
-    c    = 1;
-#ifdef _QUIET_
-    rc   = DosFindFirst ("goqres*.dll", &hdir, fl, &findbuf,
-                         sizeof (findbuf), &c, FIL_STANDARD);
-#else
-    rc   = DosFindFirst ("gotres*.dll", &hdir, fl, &findbuf,
-                         sizeof (findbuf), &c, FIL_STANDARD);
-#endif
-    while (!rc)
-    {
-        // we don't want the extension
-        if ((psz = strchr (findbuf.achName, '.')))
-            *psz = '\0';
-        // try opening the dll and read the version etc. data
-        if ((rc = DosLoadModule(PSZ(NULL), 0, findbuf.achName, &hmod)) == NO_ERROR) {
-            PVOID pv;
-            PVOID pl;
-
-            if (DosGetResource(hmod, RT_RCDATA, DLL_ID, &pv) == NO_ERROR) {
-#ifdef _QUIET_
-                if (strcmp(PSZ(pv), "Gotchaq!") == 0) {
-#else
-                if (strcmp(PSZ(pv), "Gotcha!") == 0) {
-#endif
-                    psz = PSZ(pv)+strlen(PSZ(pv)) + 3;
-                    
-                    INT Lang;
-                
-                    DosGetResource(hmod, RT_RCDATA, LANG_ID, &pl);
-                    Lang = atoi((PCHAR) pl);
-#if 1
-                    UniChar     target[300];
-                    CHAR       ucLangStr[300];
-                    UconvObject     uconv_object866 = NULL;
-                    UconvObject     uconv_object852 = NULL;
-                    UconvObject     uconv_object1207 = NULL;
-                    UconvObject     uconv_object850 = NULL;
-                    int i;
-                    
-                    strcpy(ucLangStr, psz);
-                    UniCreateUconvObject((UniChar *)L"IBM-852", &uconv_object852);
-                    UniCreateUconvObject((UniChar *)L"IBM-850", &uconv_object850);
-                    UniCreateUconvObject((UniChar *)L"IBM-866", &uconv_object866);
-                    UniCreateUconvObject((UniChar *)L"IBM-1207", &uconv_object1207);
-                    
-                    if (Lang == CZ) {
-                        UniStrToUcs( uconv_object852, target, ucLangStr, 299);
-                    }
-                    else if (Lang == RU) {
-                        UniStrToUcs( uconv_object866, target, ucLangStr, 299);
-                    }
-                    else {
-                        UniStrToUcs( uconv_object850, target, ucLangStr, 299);
-                    }
-                        UniStrFromUcs( uconv_object1207, ucLangStr, target, 300);
-                    Lang = 0;
-                    if (uconv_object866)
-                        UniFreeUconvObject(uconv_object866);
-                    if (uconv_object852)
-                        UniFreeUconvObject(uconv_object852);
-                    if (uconv_object850)
-                        UniFreeUconvObject(uconv_object850);
-                    if (uconv_object1207)
-                        UniFreeUconvObject(uconv_object1207);
-
-
-#endif
-                    ul = WinInsertLboxItem (hwnd, LIT_END,/*psz*/ucLangStr);
-                    WinSendMsg(hwnd, LM_SETITEMHANDLE, MPFROMLONG(ul),
-                               MPFROMP (strdup(findbuf.achName)));
-                }
-                if (pl)
-                    DosFreeResource(pl);
-                DosFreeResource(pv);
-            }
-            DosFreeModule(hmod);
-        }
-        c = 1;
-        rc = DosFindNext (hdir, &findbuf, sizeof (findbuf), &c);
-    }
-    DosFindClose (hdir);
-
-    return 1;
-}
-#endif
-// ** GetFileExtension **************************************************** /*FOLD00*/
-
-PSZ Settings :: GetFileExtension( SHORT type )
-{
-    if( type == BMF_INVALID )
-        type = SHORT( QueryFileFormat() );
-    if( ( type >= BMF_JPG ) && ( type < BMF_INVALID ) )
-        return ifi[ type ].extension;
-    return "";
-}
-
-#if 0
-// ** GetFOURCC *********************************************************** /*FOLD00*/
-
-FOURCC Settings :: GetFOURCC( SHORT type )
-{
-    if( type == BMF_INVALID )
-        type = SHORT( QueryFileFormat() );
-    if( ( type >= BMF_JPG ) && ( type < BMF_INVALID ) )
-        return ifi[ type ].fourcc;
-    return 0L;
-}
-#endif
-// ** GetFileEAType ******************************************************* /*FOLD00*/
-
-PSZ Settings :: GetFileEAType( SHORT type )
-{
-    if( type == BMF_INVALID )
-        type = SHORT( QueryFileFormat() );
-    if( ( type >= BMF_JPG ) && ( type < BMF_INVALID ) )
-        return ifi[ type ].eaType;
-    return "";
-}
-
-// ************************************************************************
-
-PSZ Settings :: QueryNumSaveDir( VOID )
-{
-    // Using a static buffer here is not really good, but good enough
-    // currently as we know there will be no concurrent access.
-    static CHAR ach[_MAX_PATH];
-
-    if( strspn( QueryString( SEI_NUMSAVEDIR ), " \t\n\r" ) ==
-        strlen( QueryString( SEI_NUMSAVEDIR ) ) )
-        return getcwd( ach, _MAX_PATH );
-    return QueryString( SEI_NUMSAVEDIR );
-}
Index: unk/settings.h
===================================================================
--- /trunk/settings.h	(revision 169)
+++ 	(revision )
@@ -1,204 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-
-#ifndef _Settings_H_
-#define _Settings_H_
-
-// ** defines & stuff ***************************************************** /*FOLD00*/
-
-#include "gotcha.h"
-#include "./settings/thth_settings.h"
-
-#ifdef _QUIET
-#define PSZ_PROFILENAME           "gotchaq.ini"
-#else
-#define PSZ_PROFILENAME           "gotcha.ini"
-#endif
-
-// this should be increased every time the format of the proFile changes
-#define L_PROFILEVERSION          2
-
-#define COUNT_PAGES               4
-
-enum { SAVESTYLE_CLIPBOARD, SAVESTYLE_FILE, };
-
-enum {
-    BMF_JPG, BMF_PNG, BMF_OS20, BMF_TIF, BMF_TGA, BMF_PCX, BMF_GIF,
-    BMF_PBM, BMF_JP2, BMF_DIB,
-    BMF_INVALID
-};
-
-enum { FSS_PROMPT, FSS_NUMFILES, FSS_FORCEFILE, };
-
-class ImageFormatInfo
-{
-public:
-    BOOL     available;
-    USHORT   type;
-//    FOURCC   fourcc;
-    PSZ      label;
-    PSZ      extension;
-    PSZ      eaType;
-};
-
-// ** classdef ************************************************************ /*FOLD00*/
-
-class Settings : public ththSettings
-{
-public:
-    Settings (VOID);
-
-    BOOL   Dialog (BOOL f = FALSE);
-
-    PSZ    QuerySaveFile (VOID) { return QueryString (SEI_SAVEFILE); }
-    VOID   SetSaveFile (PSZ psz) { SetString (SEI_SAVEFILE, psz); }
-
-    VOID   SetWindowData (SWP *pswp, BOOL f = TRUE);
-    VOID   QueryWindowData (SWP *pswp, USHORT us[7], BOOL f = TRUE);
-
-    BOOL   HideWindow (VOID) { return QueryFlag (SEI_HIDEWINDOW); }
-    VOID   HideWindow (BOOL f) { SetFlag (SEI_HIDEWINDOW, f); }
-
-    BOOL   DelayedCapture (VOID) { return QueryFlag (SEI_DELAYEDCAPTURE); }
-    VOID   DelayedCapture (BOOL f) { SetFlag (SEI_DELAYEDCAPTURE, f); }
-
-    BYTE   QuerySaveStyle (VOID) { return QueryLong (SEI_SAVESTYLE); }
-    VOID   SetSaveStyle (BYTE b) { SetLong (SEI_SAVESTYLE, b); }
-
-    BOOL   AutoaddExtension (VOID) { return QueryFlag (SEI_AUTOADDEXTENSION); }
-    VOID   AutoaddExtension (BOOL f) { SetFlag (SEI_AUTOADDEXTENSION, f); }
-
-    BOOL   ConfirmOverwrite (VOID) { return QueryFlag (SEI_CONFIRMOVERWRITE); }
-    VOID   ConfirmOverwrite (BOOL f) { SetFlag (SEI_CONFIRMOVERWRITE, f); }
-
-    PSZ    QueryForceSaveFile (VOID) { return QueryString (SEI_FORCESAVEFILE); }
-    VOID   SetForceSaveFile (PSZ psz) { SetString (SEI_FORCESAVEFILE, psz); }
-
-    BOOL   DelayCountdown (VOID) { return QueryFlag (SEI_DELAYCOUNTDOWN); }
-    VOID   DelayCountdown (BOOL f) { SetFlag (SEI_DELAYCOUNTDOWN, f); }
-
-    USHORT QueryDelayTime (VOID) { return QueryLong (SEI_DELAYTIME); }
-    VOID   SetDelayTime (USHORT us) { SetLong (SEI_DELAYTIME, us); }
-#ifndef _QUIET_
-    BOOL   SnapshotWindow (VOID) { return QueryFlag (SEI_SNAPSHOTWINDOW); }
-    VOID   SnapshotWindow (BOOL f) { SetFlag (SEI_SNAPSHOTWINDOW, f); }
-
-    BOOL   SSWHide (VOID) { return QueryFlag (SEI_SSWHIDE); }
-    VOID   SSWHide (BOOL f) { SetFlag (SEI_SSWHIDE, f); }
-
-    BOOL   SSWAlwaysOnTop (VOID) { return QueryFlag (SEI_SSWALWAYSONTOP); }
-    VOID   SSWAlwaysOnTop (BOOL f) { SetFlag  (SEI_SSWALWAYSONTOP, f); }
-#endif
-    BYTE   QuerySSWCaptureType (VOID) { return QueryLong (SEI_SSWCAPTURETYPE); }
-    VOID   SetSSWCaptureType (BYTE b) { SetLong (SEI_SSWCAPTURETYPE, b); }
-
-    BOOL   SerialCapture (VOID) { return QueryFlag (SEI_SERIALCAPTURE); }
-    VOID   SerialCapture (BOOL f) { SetFlag (SEI_SERIALCAPTURE, f); }
-
-    USHORT QuerySerialTime (VOID) { return QueryLong (SEI_SERIALTIME); }
-    VOID   SetSerialTime (USHORT us) { SetLong (SEI_SERIALTIME, us); }
-
-    BOOL   DoSound (VOID) { return QueryFlag (SEI_DOSOUND); }
-    VOID   DoSound (BOOL f) { SetFlag (SEI_DOSOUND, f); }
-
-    BYTE   QueryFileFormat (VOID) { return QueryLong (SEI_FILEFORMAT); }
-    VOID   SetFileFormat (BYTE b) { SetLong (SEI_FILEFORMAT, b); }
-
-    BYTE   QueryFileSaveStyle (VOID) { return QueryLong (SEI_FILESAVESTYLE); }
-    VOID   SetFileSaveStyle (BYTE b) { SetLong (SEI_FILESAVESTYLE, b); }
-
-    PSZ    QueryNumSaveDir (VOID);
-    VOID   SetNumSaveDir (PSZ psz)
-    {
-        if (strlen(psz) > 3 && (psz[strlen (psz)-1] == '\\') || (psz[strlen (psz)-1] == '/'))
-            psz[strlen (psz)-1] = '\0';
-        SetString (SEI_NUMSAVEDIR, psz);
-    }
-
-    VOID   SetLangID(INT   Language) {LangID = Language;}
-    INT    GetLangID(VOID) {return LangID;}
-
-    VOID   SelectLanguage (VOID);
-
-    PSZ    GetFileExtension( SHORT type = BMF_INVALID );
-//    FOURCC GetFOURCC( SHORT type = BMF_INVALID );
-    PSZ    GetFileEAType( SHORT type = BMF_INVALID );
-
-    bool idleSetInIni;
-    int saveStyle;
-    PSZ pNumSaveDir;
-    PSZ pForceSaveFile;
-    bool bSerialCapture;
-//    BOOL           IsMMIOAvailable( VOID );
-//    class thth_MMIO      *GetMMIO( VOID );
-
-protected:
-    USHORT   FileNotOpenError (VOID);
-    USHORT   VersionError (VOID);
-
-    BOOL     ReloadResources (PSZ psz);
-
-    USHORT   GetLanguages (HWND hwnd);
-
-private:
-    static MRESULT EXPENTRY
-        DialogProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-    static MRESULT EXPENTRY
-        Page1Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-    static MRESULT EXPENTRY
-        Page2Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-    static MRESULT EXPENTRY
-        Page3Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-    static MRESULT EXPENTRY
-        Page4Procedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-
-    VOID AdjustButton (HWND hwnd, USHORT id, BOOL f)
-    {
-        WinSendDlgItemMsg (hwnd, id, BM_SETCHECK,
-                           MPFROMLONG (f), MPFROMLONG (0));
-    }
-
-    VOID AdjustFlag (HWND hwnd, USHORT id, BOOL &f)
-    {
-        f = BOOL (WinSendDlgItemMsg (hwnd, id, BM_QUERYCHECK, 0, 0));
-    }
-
-    HWND         hwndPage[COUNT_PAGES];
-    static PSZ   pszPageTab[COUNT_PAGES];
-    BOOL   fAutoLanguage;
-    HWND   hwndDlg;
-    INT    LangID;
-
-    static ImageFormatInfo ifi[];
-};
-
-// ** inline funcs ******************************************************** /*FOLD00*/
-
-inline VOID Settings :: SetWindowData (SWP *pswp, BOOL f)
-{
-    // FIXME puke, yukk, choke! get this flag thing away! do it better!
-    // FIXME what is with US?
-    if (f)
-        SetBinary(SEI_SWPSSW, PVOID(pswp), sizeof(SWP));
-    else
-        SetBinary(SEI_SWP, PVOID(pswp), sizeof(SWP));
-}
-
-// ************************************************************************
-#endif
Index: unk/snapshot.cpp
===================================================================
--- /trunk/snapshot.cpp	(revision 169)
+++ 	(revision )
@@ -1,209 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-
-// ** CreateSnapshotWindow ************************************************ /*FOLD00*/
-#ifndef _QUIET_
-HWND CreateSnapshotWindow (VOID)
-{
-    ULONG fl = FCF_SIZEBORDER | FCF_NOBYTEALIGN;
-    HWND  hwndClient;
-
-    // create frame window
-    // create the window
-    HWND hwndSnapshot =
-        WinCreateStdWindow (HWND_DESKTOP, 0L, &fl,
-                            "thth.wc.gotcha.snapshot", PSZ (NULL), 0L, 0, 1, &hwndClient);
-    OldFrameWP = WinSubclassWindow (hwndSnapshot, FrameProcedure);
-//    DisplayError ("DEBUG", "0x%08lx", WinGetLastError (GETHAB));
-
-    // create window
-    /*    hwndSnapshot =
-     WinCreateWindow (HWND_DESKTOP, "thth.wc.gotcha.snapshot", "",
-     WS_VISIBLE,
-     0,0,0,0, HWND_DESKTOP, HWND_TOP, 1L, NULL, 0L); */
-    // create the button
-    HWND hwndButton =
-        WinCreateWindow (hwndClient, WC_BUTTON, RSTR( IDS_SNAPLABEL ),
-                         WS_VISIBLE | BS_PUSHBUTTON | BS_NOBORDER |
-                         BS_NOPOINTERFOCUS,
-                         0,0, 1,1,  hwndClient, HWND_TOP,
-                         WID_PB_SNAPSHOT, NULL, NULL);
-    wpOldButton = WinSubclassWindow (hwndButton, wpNewButton);
-
-    // get the popup menu
-    g_hwndMenuSSW = WinLoadMenu(HWND_DESKTOP, GETMODULE, IDM_SSWPOPUP);
-
-    WinSetWindowPos (hwndSnapshot, NULLHANDLE, 50,50, 48,32,
-                     SWP_MOVE | SWP_SIZE | SWP_SHOW);
-//    DisplayError ("DEBUG", "0x%08lx", WinGetLastError (GETHAB));
-
-    return hwndSnapshot;
-}
-
-// ** wpNewButton ********************************************************* /*fold00*/
-
-MRESULT EXPENTRY wpNewButton (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
-{
-    switch (msg)
-    {
-    case WM_BEGINDRAG:
-        WinSendMsg (WinQueryWindow (hwnd, QW_OWNER), WM_BEGINDRAG, 0,0);
-        break;
-
-    case WM_CONTEXTMENU:
-        WinSendMsg (WinQueryWindow (hwnd, QW_OWNER), WM_CONTEXTMENU, 0,0);
-        break;
-    }
-
-    return wpOldButton (hwnd, msg, mp1, mp2);
-}
-
-// ** wpSnapshot ********************************************************** /*FOLD00*/
-
-MRESULT EXPENTRY wpSnapshot (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
-{
-    static ULONG    ulTimer;
-    static BOOL     fInCapture = FALSE;
-
-    switch (msg)
-    {
-    case WM_CREATE:
-        ulTimer = WinStartTimer (hab, hwnd, 2, 1990);
-        return MRESULT (FALSE);
-
-    case WM_DESTROY:
-        WinStopTimer (hab, hwnd, ulTimer);
-        return MRESULT (FALSE);
-
-    case WM_TIMER:
-        if (pset->SSWAlwaysOnTop ())
-            WinSetWindowPos (hwndSnapshot, HWND_TOP, 0,0,0,0, SWP_ZORDER);
-        return MRESULT (FALSE);
-
-    case WM_MOUSEMOVE:
-        // we don't want to reset the mouse pointer so capture this msg
-        return MRESULT (FALSE);
-
-    case WM_COMMAND:
-        switch (SHORT1FROMMP (mp1))
-        {
-        case WID_PB_SNAPSHOT:
-            if (fInCapture)
-                WinSendMsg (hwndFrame, UM_ABORT, 0,0);
-            else
-            {
-                USHORT us;
-                switch (pset->QuerySSWCaptureType ())
-                {
-                case CAP_WINDOWINT: us = WID_PB_WINDOWINTERIOR; break;
-                case CAP_WINDOW: us = WID_PB_WINDOW; break;
-                case CAP_SCREENREGION: us = WID_PB_SCREENREGION; break;
-                default: us = WID_PB_SCREEN; break;
-                }
-                WinSendMsg (WinWindowFromID (hwndFrame, FID_CLIENT),
-                            WM_COMMAND, MPFROMSHORT (us), 0L);
-            }
-            break;
-
-        case WID_SSWSCREEN:
-            pset->SetSSWCaptureType (CAP_SCREEN); break;
-        case WID_SSWSCREENREGION:
-            pset->SetSSWCaptureType (CAP_SCREENREGION); break;
-        case WID_SSWWINDOW:
-            pset->SetSSWCaptureType (CAP_WINDOW); break;
-        case WID_SSWWINDOWINT:
-            pset->SetSSWCaptureType (CAP_WINDOWINT); break;
-
-        case WID_CB_SSWHIDE:
-            pset->SSWHide(!pset->SSWHide()); break;
-        case WID_CB_SSWALWAYSONTOP:
-            pset->SSWAlwaysOnTop(!pset->SSWAlwaysOnTop()); break;
-        // the name is a little bit misleading ...
-        case WID_CB_SSWENABLE:
-            pset->SnapshotWindow(FALSE);
-            WinShowWindow (hwndSnapshot, FALSE);
-            break;
-        }
-        return MRESULT (FALSE);
-
-    case UM_STARTCAPTURE:
-        fInCapture = TRUE;
-        return MRESULT (FALSE);
-
-    case UM_STOPCAPTURE:
-        fInCapture = FALSE;
-        WinSetWindowText (WinWindowFromID (hwnd, WID_PB_SNAPSHOT), RSTR( IDS_SNAPLABEL ) );
-        return MRESULT (FALSE);
-
-    case UM_WINDOWHIDDEN:
-        WinSendMsg (WinWindowFromID (hwndFrame, FID_CLIENT), UM_SSWHIDDEN,
-                    0,0);
-        return MRESULT (FALSE);
-
-    case WM_SIZE:
-        WinSetWindowPos (WinWindowFromID (hwnd, WID_PB_SNAPSHOT), 0L, 0,0,
-                         SHORT1FROMMP (mp2), SHORT2FROMMP (mp2),
-                         SWP_SIZE);
-        break;
-
-    case WM_BEGINDRAG:
-        Drag (hwndSnapshot);
-        return MRESULT (FALSE);
-
-    case UM_COUNTDOWN:
-        {
-            CHAR    ach[11];
-            sprintf (ach, "%lu", ULONG (mp1));
-            WinSetWindowText (WinWindowFromID (hwnd, WID_PB_SNAPSHOT), ach);
-        }
-        return MRESULT (FALSE);
-
-    case WM_CONTEXTMENU:
-        WinCheckMenuItem(g_hwndMenuSSW, WID_CB_SSWHIDE,
-                         pset->QueryFlag(SEI_SSWHIDE));
-        WinCheckMenuItem(g_hwndMenuSSW, WID_CB_SSWALWAYSONTOP,
-                         pset->QueryFlag(SEI_SSWALWAYSONTOP));
-
-        WinCheckMenuItem(g_hwndMenuSSW, WID_SSWWINDOWINT, FALSE); 
-        WinCheckMenuItem(g_hwndMenuSSW, WID_SSWSCREENREGION, FALSE); 
-        WinCheckMenuItem(g_hwndMenuSSW, WID_SSWWINDOW, FALSE); 
-        WinCheckMenuItem(g_hwndMenuSSW, WID_SSWSCREEN, FALSE); 
-
-        switch (pset->QuerySSWCaptureType ())
-        {
-        case CAP_WINDOWINT:
-            WinCheckMenuItem(g_hwndMenuSSW, WID_SSWWINDOWINT, TRUE); break;
-        case CAP_SCREENREGION:
-            WinCheckMenuItem(g_hwndMenuSSW, WID_SSWSCREENREGION, TRUE); break;
-        case CAP_WINDOW:
-            WinCheckMenuItem(g_hwndMenuSSW, WID_SSWWINDOW, TRUE); break;
-        default:
-            WinCheckMenuItem(g_hwndMenuSSW, WID_SSWSCREEN, TRUE); break;
-        }
-
-        WinPopupMenu(hwnd, hwnd, g_hwndMenuSSW, 10,10, WID_CB_SSWHIDE,
-                     PU_HCONSTRAIN | PU_VCONSTRAIN | PU_POSITIONONITEM |
-                     PU_KEYBOARD | PU_MOUSEBUTTON1);
-        return MRESULT (FALSE);
-    }
-
-    return WinDefWindowProc (hwnd, msg, mp1, mp2);
-}
-#endif
-// ************************************************************************
Index: unk/timetemp
===================================================================
--- /trunk/timetemp	(revision 169)
+++ 	(revision )
@@ -1,1 +1,0 @@
-
Index: unk/version.h
===================================================================
--- /trunk/version.h	(revision 169)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/***
- This file belongs to the Gotcha! distribution.
- Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- ***/
-
-#define PSZ_VERSION_L1     "2"
-#define PSZ_VERSION_L2     PSZ_VERSION_L1".03"
-#define PSZ_VERSION_L3     PSZ_VERSION_L2".02"
-
-#define PSZ_NAMEVERSION    "Gotcha! 2.03.02"
-#define PSZ_QNAMEVERSION   "Gotcha! Quiet 2.03.02"
