Index: trunk/settings.cpp
===================================================================
--- trunk/settings.cpp	(revision 99)
+++ trunk/settings.cpp	(revision 115)
@@ -33,5 +33,4 @@
 USHORT ausDef[7] = { 0 };
 USHORT ausDefSSW[7] = { 0 };
-BOOL  g_installer = FALSE;
 
 ImageFormatInfo Settings::ifi[BMF_INVALID] =
@@ -94,9 +93,54 @@
 };
 
+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(apse, "gotchaq.ini", L_PROFILEVERSION)
+    ththSettings(g_installer ? apse2 : apse, g_installer ? g_installerINI : "gotchaq.ini",
+                 L_PROFILEVERSION)
 #else
     ththSettings(apse, "gotcha.ini", L_PROFILEVERSION)
@@ -104,19 +148,20 @@
 {
     if( ! QueryFlag( SEI_UPDATE178DONE ) ) {
-        //DisplayError( "Updated", "false" );
         SetLong( SEI_SERIALTIME, QueryLong( SEI_SERIALTIME ) * 20 );
         SetFlag( SEI_UPDATE178DONE );
-    } /*else {
-        //DisplayError( "NOT Updated", "true" );
-        } */
-#ifdef _QUIET_
-    HINI hini = PrfOpenProfile (hab, "gotchaq.ini");
+    } 
+#ifdef _QUIET_
+    HINI hini;
+    if (!g_installer)
+        hini = PrfOpenProfile (hab, "gotchaq.ini");
 #else
     HINI hini = PrfOpenProfile (hab, "gotcha.ini");
 #endif
     BOOL fLChange = FALSE;
-    ULONG ulDataSize;
-    PrfQueryProfileSize(hini, "Language", "LangChangeRequested", &ulDataSize );
-    PrfQueryProfileData(hini, "Language", "LangChangeRequested", &fLChange, &ulDataSize);
+    if (!g_installer) {
+        ULONG ulDataSize;
+        PrfQueryProfileSize(hini, "Language", "LangChangeRequested", &ulDataSize );
+        PrfQueryProfileData(hini, "Language", "LangChangeRequested", &fLChange, &ulDataSize);
+        }
     if (!fLChange) {
     CHAR *lang = getenv("LANG");
@@ -129,28 +174,53 @@
     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, "it", 2)) {
+#ifdef _QUIET_
+            psz = "goqresit";
+#else
             psz = "gotresit";
-            pszh = "gotcha_it";
+#endif
         }
         else if (!strnicmp(lang, "br", 2)) {
+#ifdef _QUIET_
+            psz = "goqresbr";
+#else
             psz = "gotresbr";
-            pszh = "gotcha_br";
-        }
-    }
-    SetString(SEI_LANGUAGE, psz);
-    SetString (SEI_LANGUAGEHELP, pszh);
-    Save ();
-    }
-    if (hini)
-        PrfCloseProfile (hini);
+#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));
@@ -179,5 +249,7 @@
     DisplayError (RSTR(IDS_HEADER_WARNING), RSTR(IDS_ERROR_INIFILEWRONGVERSION),
                   QueryProfileName ());
+#ifndef _QUIET_
     SelectLanguage();
+#endif
     return 0;
 }
@@ -189,5 +261,7 @@
     DisplayError (RSTR(IDS_HEADER_ERROR), RSTR(IDS_ERROR_INIFILENOTOPEN),
                   QueryProfileName ());
+#ifndef _QUIET_
     SelectLanguage();
+#endif
     return 0;
 }
@@ -207,5 +281,5 @@
 
     // load the main dialog window
-    hwndDlg = WinLoadDlg (HWND_DESKTOP, hwndFrame, (DialogProcedure),
+    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 :-)
@@ -262,53 +336,8 @@
         for (i = 0; i < cPages; i++)
         {
-	    //BOOKPAGEINFO pi;
             idPage[i] = (ULONG)
                 WinSendMsg (hwndNB, BKM_INSERTPAGE, 0L,
                             MPFROM2SHORT (BKA_MAJOR | BKA_AUTOPAGESIZE,
                                           BKA_LAST));
-#if 0
-            pi.cb = sizeof(pi);
-            pi.fl = BFA_PAGEFROMDLGRES | BFA_MAJORTABTEXT;
-            pi.bLoadDlg = TRUE;
-            pi.hmodPageDlg = g_hmod;
-            switch (i) {
-#ifndef  _QUIET_
-            case 0:
-                pi.idPageDlg = ID_DLG_SETTINGSPAGE1;
-                pi.pfnPageDlgProc = NULL; //(PFN) Page1Procedure;
-                break;
-#else
-            case 0:
-                pi.idPageDlg = ID_DLG_SETTINGSPAGE0;
-                pi.pfnPageDlgProc = NULL; //(PFN) WindowProcedure;
-                break;
-#endif
-            case 1:
-                pi.idPageDlg = ID_DLG_SETTINGSPAGE2;
-                pi.pfnPageDlgProc = NULL; //(PFN) Page2Procedure;
-                break;
-#ifndef  _QUIET_
-            case 2:
-                pi.idPageDlg = ID_DLG_SETTINGSPAGE3;
-                pi.pfnPageDlgProc = NULL; //(PFN) Page3Procedure;
-                break;
-#else
-            case 2:
-                pi.idPageDlg = ID_DLG_SETTINGSPAGE1;
-                pi.pfnPageDlgProc = NULL; //(PFN) Page1Procedure;
-                break;
-#endif
-            case 3:
-                pi.idPageDlg = ID_DLG_SETTINGSPAGE4;
-                pi.pfnPageDlgProc = NULL; //(PFN) Page4Procedure;
-                break;
-            }
-            pi.cbMajorTab = strlen(pszPageTab[i]);
-            pi.pszMajorTab = pszPageTab[i];
-            pi.cbMinorTab = strlen(pszPageTab[i]);
-            pi.pszMinorTab = pszPageTab[i];
-            pi.cbStatusLine = 0;
-            pi.pszStatusLine = NULL;
-#endif
             if (pset->GetLangID() == CZ || pset->GetLangID() == RU || pset->GetLangID() == PL) {
                 UniChar     target[300];
@@ -339,8 +368,4 @@
                 WinSendMsg (hwndNB, BKM_SETTABTEXT,
                             MPFROMLONG (idPage[i]), MPFROMP (ucLangStr));
-                /*pi.cbMajorTab = strlen(ucLangStr) + 10;
-                pi.pszMajorTab = ucLangStr;
-                pi.cbMinorTab = 0;
-                pi.pszMinorTab = "";*/
                 if (uconv_object866)
                     UniFreeUconvObject(uconv_object866);
@@ -355,6 +380,4 @@
                 WinSendMsg (hwndNB, BKM_SETTABTEXT,
                             MPFROMLONG (idPage[i]), MPFROMP (pszPageTab[i]));
-            //WinSendMsg(hwndNB, BKM_SETPAGEINFO, MPFROMLONG(idPage[i]),
-              //         MPFROMP(&pi));
         }
 #ifndef _QUIET_
@@ -390,9 +413,4 @@
                     MPFROMLONG (idPage[i]), MPFROMHWND (hwndPage[i]));
 
-/*    if (fAutoLanguage)
-        WinSendMsg (hwndNB, BKM_TURNTOPAGE, MPFROMLONG (idPage[0]), 0L);
-#if (COUNT_PAGES != 4)
-#warning FIXME settings.cpp 264 or so ...
-#endif */
     for (i = 0; i < cPages; i++)
         WinSendMsg (hwndPage[i], UM_SETTINGS2DIALOG, 0,0);
@@ -402,8 +420,4 @@
     WinSendDlgItemMsg (g_hwndPage0, WID_RB_FILE, BM_CLICK,
                        MPFROMSHORT (TRUE), 0);
-    //WinSendDlgItemMsg (g_hwndPage0, WID_CB_HIDEWINDOW, BM_SETCHECK,
-    //                   MPFROMLONG (TRUE), MPFROMLONG (0));
-    //WinSetFocus (WinWindowFromID (hwndDlg, WID_PB_OK), TRUE);
-    //WinSetFocus( hwndPage[0], FALSE );
 #ifdef _QUIET_
     if (HACCEL haccel = WinLoadAccelTable (hab, GETMODULE, 1)) {
@@ -438,5 +452,4 @@
 }
 
-ULONG winhDrawFormattedText(HPS hps, PRECTL prcl, const char *pcszText, ULONG flCmd);
 
 // ** DialogProcedure ***************************************************** /*FOLD00*/
@@ -461,10 +474,6 @@
 #endif
         CHAR ucFont[FACESIZE];
+
         if (pset->GetLangID() == CZ || pset->GetLangID() == RU || pset->GetLangID() == PL) {
-           HMQ hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
-           WinSetCp(hmq, 1207);
-           strcpy(ucFont, "9.Times New Roman MT 30");
-           WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-
            UniChar     target[300];
            CHAR       ucLangStr[300];
@@ -515,10 +524,13 @@
            if (uconv_object1207)
                UniFreeUconvObject(uconv_object1207);
-        }
-        /*else {
+           HMQ hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
+           WinSetCp(hmq, 1207);
+           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);
 
@@ -526,4 +538,58 @@
         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_
@@ -679,8 +745,8 @@
             WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
         }
-        /*else {
+        else if (g_installer) {
             strcpy(ucFont, "9.WarpSans");
             WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-        } */
+        }
 
 #ifdef _DOLOGDEBUG_
@@ -735,5 +801,4 @@
                                MPFROMSHORT(0), MPFROMSHORT(TRUE) );
 #ifdef _QUIET_
-//#if 1
         // set play sound button
         pset->AdjustButton (hwnd, WID_CB_DOSOUND,
@@ -782,5 +847,4 @@
                 pset->SetFileSaveStyle (FSS_PROMPT);
 #ifdef _QUIET_
-//#if 1
             pset->DoSound(WinQueryButtonCheckstate
                           (hwnd, WID_CB_DOSOUND));
@@ -886,8 +950,8 @@
             WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
         }
-        /*else {
+        else if (g_installer) {
             strcpy(ucFont, "9.WarpSans");
             WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-        } */
+        }
         return MRESULT (FALSE);
     }
@@ -915,5 +979,4 @@
                             pset->SSWAlwaysOnTop ());
 #else
-//#if 1
         pset->AdjustButton (hwnd, WID_CB_SERIALCAPTURE,
                             pset->SerialCapture ());
@@ -972,5 +1035,4 @@
 #endif
 #ifndef _QUIET_
-//#if 0
         // query state of checkbuttons and set flags
         pset->SSWHide(WinQueryButtonCheckstate(hwnd, WID_CB_SSWHIDE));
@@ -1009,5 +1071,4 @@
             pset->SetSSWCaptureType (CAP_SCREEN);
 #ifdef _QUIET_
-//#if 1
         // delay time
         ULONG   ul;
@@ -1108,8 +1169,4 @@
             WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
         }
-        /*else {
-            strcpy(ucFont, "9.WarpSans");
-            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
-        } */
         return MRESULT (FALSE);
     }
@@ -1237,4 +1294,5 @@
 #endif
             pset = PSETTINGS (mp2);
+
             HMQ hmq = WinQueryWindowULong(hwnd /*WinWindowFromID(hwnd, ID_DLG_SETTINGSPAGE4)*/, QWL_HMQ);
             WinSetCp(hmq, 1207); // UPF-8 Unicode
@@ -1329,13 +1387,12 @@
                 UniFreeUconvObject(uconv_object1207);
             
-            if (pset->GetLangID() == RU || pset->GetLangID() == CZ || pset->GetLangID() == PL ||
-               pset->GetLangID() == IT) {
+            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);
             }
-            
-            //    WinRemovePresParam(hwnd, PP_FONTNAMESIZE);*/
-            //HMQ hmq = WinQueryWindowULong(hwnd /*WinWindowFromID(hwnd, WID_LB_LANGUAGES)*/, QWL_HMQ);
-            //WinSetCp(hmq, 1207); // UPF-8 Unicode
+            else if (g_installer) {
+                strcpy(ucFont, "9.WarpSans");
+                WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
+            }
         return MRESULT (FALSE);
         }
@@ -1367,5 +1424,5 @@
                                                  LM_QUERYITEMHANDLE,
                                                  MPFROMLONG(i), NULL));
-//                WinQueryLboxItemText (hwndLB, i, ach, sizeof (ach));
+
                 if (stricmp (pset->QueryString(SEI_LANGUAGE), psz) == 0)
                     break;
@@ -1423,22 +1480,10 @@
             else
                 pset->SetString(SEI_LANGUAGE, psz);
-#if 0
-            ul = USHORT (WinSendDlgItemMsg (hwnd, WID_LB_LANGUAGESHELP,
-                                            LM_QUERYSELECTION,
-                                            MPFROMLONG (LIT_FIRST), 0L));
-            WinSendDlgItemMsg (hwnd, WID_LB_LANGUAGESHELP, LM_QUERYITEMTEXT,
-                               MPFROM2SHORT (ul, sizeof (ach)), MPFROMP (ach));
-            if (stricmp (pset->QueryString(SEI_LANGUAGEHELP), ach) == 0 && !fChanged)
-                fChanged = FALSE;
-            else
-                pset->SetString (SEI_LANGUAGEHELP, ach);
-#endif
+
             if (fChanged) {
                 if (!stricmp(psz, "gotreses") || !stricmp(psz, "goqreses"))
                     strcpy(ach, "gotcha_es");
-                else if (!stricmp(psz, "gotresbr") || !stricmp(psz, "goqresbr"))
-                    strcpy(ach, "gotcha_br");
-                else if (!stricmp(psz, "gotresit") || !stricmp(psz, "goqresit"))
-                    strcpy(ach, "gotcha_it");
+                /*else if (!stricmp(psz, "gotresit") || !stricmp(psz, "goqresit"))
+                    strcpy(ach, "gotcha_it");*/
                 else
                     strcpy(ach, "gotcha_en");
@@ -1716,68 +1761,2 @@
     return QueryString( SEI_NUMSAVEDIR );
 }
-
-// ************************************************************************
-
-ULONG winhDrawFormattedText(HPS hps,     // in: presentation space; its settings
-                                         // are used, but not altered
-                            PRECTL prcl, // in/out: rectangle to use for drawing
-                                         // (modified)
-                            const char *pcszText, // in: text to draw (zero-terminated)
-                            ULONG flCmd) // in: flags like in WinDrawText; I have
-                                         // only tested DT_TOP and DT_LEFT though.
-                                         // DT_WORDBREAK | DT_TEXTATTRS are always
-                                         // set.
-                                         // You can specify DT_QUERYEXTENT to only
-                                         // have prcl calculated without drawing.
-{
-    PSZ     p = (PSZ)pcszText;
-    LONG    lDrawn = 1,
-            lTotalDrawn = 0,
-            lLineCount = 0,
-            lOrigYTop = prcl->yTop;
-    ULONG   ulTextLen = strlen(pcszText),
-            ulCharHeight,
-            flCmd2,
-            xLeftmost = prcl->xRight,
-            xRightmost = prcl->xLeft;
-    RECTL   rcl2;
-
-    flCmd2 = flCmd | DT_WORDBREAK | DT_TEXTATTRS;
-
-    ulCharHeight = 30;//gpihQueryLineSpacing(hps);
-
-    while (    (lDrawn)
-            && (lTotalDrawn < ulTextLen)
-          )
-    {
-        memcpy(&rcl2, prcl, sizeof(rcl2));
-        lDrawn = WinDrawText(hps,
-                             ulTextLen-lTotalDrawn,
-                             p,
-                             &rcl2,
-                             0, 0,                       // colors
-                             flCmd2);
-
-        // update char counters
-        p += lDrawn;
-        lTotalDrawn += lDrawn;
-
-        // update x extents
-        if (rcl2.xLeft < xLeftmost)
-            xLeftmost = rcl2.xLeft;
-        if (rcl2.xRight > xRightmost)
-            xRightmost = rcl2.xRight;
-
-        // update y for next line
-        prcl->yTop -= ulCharHeight;
-
-        // increase line count
-        lLineCount++;
-    }
-    prcl->xLeft = xLeftmost;
-    prcl->xRight = xRightmost;
-    prcl->yBottom = prcl->yTop;
-    prcl->yTop = lOrigYTop;
-
-    return lLineCount;
-}
