Changeset 115 for trunk/settings.cpp
- Timestamp:
- Aug 8, 2021, 6:59:05 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/settings.cpp
r99 r115 33 33 USHORT ausDef[7] = { 0 }; 34 34 USHORT ausDefSSW[7] = { 0 }; 35 BOOL g_installer = FALSE;36 35 37 36 ImageFormatInfo Settings::ifi[BMF_INVALID] = … … 94 93 }; 95 94 95 PTHTH_SE apse2[] = 96 { 97 new THTH_SES (SEI_SAVEFILE, "Save", "Filename", "gotcha.png"), 98 new THTH_SES (SEI_FORCESAVEFILE, "Save", "ForceSaveFilename", "force.png"), 99 new THTH_SEL (SEI_SAVESTYLE, "Save", "Style", SAVESTYLE_FILE), 100 new THTH_SEL (SEI_FILEFORMAT, "Save", "FileFormat", BMF_PNG), 101 new THTH_SEL (SEI_FILESAVESTYLE, "Save", "FileSaveStyle", FSS_NUMFILES), 102 103 new THTH_SES (SEI_NUMSAVEDIR, "Save", "NumSaveDir", ""), 104 new THTH_SEF (SEI_HIDEWINDOW, "Extras", "HideWindow", TRUE), 105 new THTH_SEF (SEI_AUTOADDEXTENSION, "Extras", "AutoaddExtension", TRUE), 106 new THTH_SEF (SEI_CONFIRMOVERWRITE, "Extras", "ConfirmOverwrite", TRUE), 107 new THTH_SEF (SEI_DOSOUND, "Extras", "DoSound", TRUE), 108 109 new THTH_SEF (SEI_DELAYEDCAPTURE, "Extras", "DelayedCapture", FALSE), 110 new THTH_SEF (SEI_DELAYCOUNTDOWN, "Extras", "DelayCountdown", FALSE), 111 new THTH_SEL (SEI_DELAYTIME, "Extras", "DelayTime", 5), 112 new THTH_SEF (SEI_SERIALCAPTURE, "Extras", "SerialCapture", FALSE), 113 new THTH_SEL (SEI_SERIALTIME, "Extras", "SerialTime", 10), 114 #ifdef _QUIET_ 115 new THTH_SEL (SEI_SSWCAPTURETYPE, "Extras", "CaptureType", CAP_SCREEN), 116 new THTH_SEF (SEI_SNAPSHOTWINDOW, "Snapshot", NULL, NULL), 117 #else 118 new THTH_SEF (SEI_SNAPSHOTWINDOW, "Snapshot", "Enable", FALSE), 119 new THTH_SEL (SEI_SSWCAPTURETYPE, "Snapshot", "CaptureType", CAP_SCREEN), 120 new THTH_SEF (SEI_SSWHIDE, "Snapshot", "Hide", TRUE), 121 new THTH_SEF (SEI_SSWALWAYSONTOP, "Snapshot", "AlwaysOnTop", TRUE), 122 #endif 123 new THTH_SEF (SEI_IDLEPRIORITY, "Extras", "IdlePriority", FALSE), 124 125 new THTH_SEB (SEI_SWP, "Window", "SWP", &swpDef, sizeof (swpDef)), 126 new THTH_SEB (SEI_US, "Window", "US", &ausDef, sizeof (ausDef)), 127 #ifndef _QUIET_ 128 new THTH_SEB (SEI_SWPSSW, "Snapshot", "SWP", &swpDefSSW, sizeof (swpDefSSW)), 129 new THTH_SEB (SEI_USSSW, "Snapshot", "US", &ausDefSSW, sizeof (ausDefSSW)), 130 #endif 131 new THTH_SES (SEI_LANGUAGE, "Language", "Program", PSZ_DEFAULTLANGUAGEMOD), 132 new THTH_SES (SEI_LANGUAGEHELP, "Language", "Help", PSZ_DEFAULTLANGUAGEHELP), 133 134 new THTH_SEF (SEI_UPDATE178DONE, "Extras", "Update178Done", FALSE), 135 136 NULL, 137 }; 138 96 139 // ** Settings ************************************************************ /*FOLD00*/ 97 140 98 141 Settings :: Settings (VOID) : 99 142 #ifdef _QUIET_ 100 ththSettings(apse, "gotchaq.ini", L_PROFILEVERSION) 143 ththSettings(g_installer ? apse2 : apse, g_installer ? g_installerINI : "gotchaq.ini", 144 L_PROFILEVERSION) 101 145 #else 102 146 ththSettings(apse, "gotcha.ini", L_PROFILEVERSION) … … 104 148 { 105 149 if( ! QueryFlag( SEI_UPDATE178DONE ) ) { 106 //DisplayError( "Updated", "false" );107 150 SetLong( SEI_SERIALTIME, QueryLong( SEI_SERIALTIME ) * 20 ); 108 151 SetFlag( SEI_UPDATE178DONE ); 109 } /*else {110 //DisplayError( "NOT Updated", "true" ); 111 } */112 #ifdef _QUIET_ 113 HINIhini = PrfOpenProfile (hab, "gotchaq.ini");152 } 153 #ifdef _QUIET_ 154 HINI hini; 155 if (!g_installer) 156 hini = PrfOpenProfile (hab, "gotchaq.ini"); 114 157 #else 115 158 HINI hini = PrfOpenProfile (hab, "gotcha.ini"); 116 159 #endif 117 160 BOOL fLChange = FALSE; 118 ULONG ulDataSize; 119 PrfQueryProfileSize(hini, "Language", "LangChangeRequested", &ulDataSize ); 120 PrfQueryProfileData(hini, "Language", "LangChangeRequested", &fLChange, &ulDataSize); 161 if (!g_installer) { 162 ULONG ulDataSize; 163 PrfQueryProfileSize(hini, "Language", "LangChangeRequested", &ulDataSize ); 164 PrfQueryProfileData(hini, "Language", "LangChangeRequested", &fLChange, &ulDataSize); 165 } 121 166 if (!fLChange) { 122 167 CHAR *lang = getenv("LANG"); … … 129 174 if (lang) { 130 175 if (!strnicmp(lang, "es", 2)) { 176 #ifdef _QUIET_ 177 psz = "goqreses"; 178 #else 131 179 psz = "gotreses"; 180 #endif 132 181 pszh = "gotcha_es"; 133 182 } 134 183 else if (!strnicmp(lang, "cs", 2)) { 184 #ifdef _QUIET_ 185 psz = "goqrescz"; 186 #else 135 187 psz = "gotrescz"; 188 #endif 136 189 } 137 190 else if (!strnicmp(lang, "de", 2)) { 191 #ifdef _QUIET_ 192 psz = "goqresde"; 193 #else 138 194 psz = "gotresde"; 195 #endif 139 196 } 140 197 else if (!strnicmp(lang, "it", 2)) { 198 #ifdef _QUIET_ 199 psz = "goqresit"; 200 #else 141 201 psz = "gotresit"; 142 pszh = "gotcha_it"; 202 #endif 143 203 } 144 204 else if (!strnicmp(lang, "br", 2)) { 205 #ifdef _QUIET_ 206 psz = "goqresbr"; 207 #else 145 208 psz = "gotresbr"; 146 pszh = "gotcha_br"; 147 } 148 } 149 SetString(SEI_LANGUAGE, psz); 150 SetString (SEI_LANGUAGEHELP, pszh); 151 Save (); 152 } 153 if (hini) 154 PrfCloseProfile (hini); 209 #endif 210 } 211 } 212 SetString(SEI_LANGUAGE, psz); 213 SetString (SEI_LANGUAGEHELP, pszh); 214 if (!g_installer) { 215 Save (); 216 217 if (hini) 218 PrfCloseProfile (hini); 219 } 220 } 221 //Reset Save directory for installer 222 if (g_installer) { 223 SetNumSaveDir (g_installerSavePath); 224 } 155 225 // to get the error msgs in default language 156 226 ReloadResources (QueryString(SEI_LANGUAGE)); … … 179 249 DisplayError (RSTR(IDS_HEADER_WARNING), RSTR(IDS_ERROR_INIFILEWRONGVERSION), 180 250 QueryProfileName ()); 251 #ifndef _QUIET_ 181 252 SelectLanguage(); 253 #endif 182 254 return 0; 183 255 } … … 189 261 DisplayError (RSTR(IDS_HEADER_ERROR), RSTR(IDS_ERROR_INIFILENOTOPEN), 190 262 QueryProfileName ()); 263 #ifndef _QUIET_ 191 264 SelectLanguage(); 265 #endif 192 266 return 0; 193 267 } … … 207 281 208 282 // load the main dialog window 209 hwndDlg = WinLoadDlg (HWND_DESKTOP, hwndFrame, (DialogProcedure),283 hwndDlg = WinLoadDlg (HWND_DESKTOP, hwndFrame, PFNWP (DialogProcedure), 210 284 GETMODULE, ID_DLG_SETTINGS, this); 211 285 // FIXME YUKKI! YUKKI!! YUKKI!!! But I'm too lazy to do it better now :-) … … 262 336 for (i = 0; i < cPages; i++) 263 337 { 264 //BOOKPAGEINFO pi;265 338 idPage[i] = (ULONG) 266 339 WinSendMsg (hwndNB, BKM_INSERTPAGE, 0L, 267 340 MPFROM2SHORT (BKA_MAJOR | BKA_AUTOPAGESIZE, 268 341 BKA_LAST)); 269 #if 0270 pi.cb = sizeof(pi);271 pi.fl = BFA_PAGEFROMDLGRES | BFA_MAJORTABTEXT;272 pi.bLoadDlg = TRUE;273 pi.hmodPageDlg = g_hmod;274 switch (i) {275 #ifndef _QUIET_276 case 0:277 pi.idPageDlg = ID_DLG_SETTINGSPAGE1;278 pi.pfnPageDlgProc = NULL; //(PFN) Page1Procedure;279 break;280 #else281 case 0:282 pi.idPageDlg = ID_DLG_SETTINGSPAGE0;283 pi.pfnPageDlgProc = NULL; //(PFN) WindowProcedure;284 break;285 #endif286 case 1:287 pi.idPageDlg = ID_DLG_SETTINGSPAGE2;288 pi.pfnPageDlgProc = NULL; //(PFN) Page2Procedure;289 break;290 #ifndef _QUIET_291 case 2:292 pi.idPageDlg = ID_DLG_SETTINGSPAGE3;293 pi.pfnPageDlgProc = NULL; //(PFN) Page3Procedure;294 break;295 #else296 case 2:297 pi.idPageDlg = ID_DLG_SETTINGSPAGE1;298 pi.pfnPageDlgProc = NULL; //(PFN) Page1Procedure;299 break;300 #endif301 case 3:302 pi.idPageDlg = ID_DLG_SETTINGSPAGE4;303 pi.pfnPageDlgProc = NULL; //(PFN) Page4Procedure;304 break;305 }306 pi.cbMajorTab = strlen(pszPageTab[i]);307 pi.pszMajorTab = pszPageTab[i];308 pi.cbMinorTab = strlen(pszPageTab[i]);309 pi.pszMinorTab = pszPageTab[i];310 pi.cbStatusLine = 0;311 pi.pszStatusLine = NULL;312 #endif313 342 if (pset->GetLangID() == CZ || pset->GetLangID() == RU || pset->GetLangID() == PL) { 314 343 UniChar target[300]; … … 339 368 WinSendMsg (hwndNB, BKM_SETTABTEXT, 340 369 MPFROMLONG (idPage[i]), MPFROMP (ucLangStr)); 341 /*pi.cbMajorTab = strlen(ucLangStr) + 10;342 pi.pszMajorTab = ucLangStr;343 pi.cbMinorTab = 0;344 pi.pszMinorTab = "";*/345 370 if (uconv_object866) 346 371 UniFreeUconvObject(uconv_object866); … … 355 380 WinSendMsg (hwndNB, BKM_SETTABTEXT, 356 381 MPFROMLONG (idPage[i]), MPFROMP (pszPageTab[i])); 357 //WinSendMsg(hwndNB, BKM_SETPAGEINFO, MPFROMLONG(idPage[i]),358 // MPFROMP(&pi));359 382 } 360 383 #ifndef _QUIET_ … … 390 413 MPFROMLONG (idPage[i]), MPFROMHWND (hwndPage[i])); 391 414 392 /* if (fAutoLanguage)393 WinSendMsg (hwndNB, BKM_TURNTOPAGE, MPFROMLONG (idPage[0]), 0L);394 #if (COUNT_PAGES != 4)395 #warning FIXME settings.cpp 264 or so ...396 #endif */397 415 for (i = 0; i < cPages; i++) 398 416 WinSendMsg (hwndPage[i], UM_SETTINGS2DIALOG, 0,0); … … 402 420 WinSendDlgItemMsg (g_hwndPage0, WID_RB_FILE, BM_CLICK, 403 421 MPFROMSHORT (TRUE), 0); 404 //WinSendDlgItemMsg (g_hwndPage0, WID_CB_HIDEWINDOW, BM_SETCHECK,405 // MPFROMLONG (TRUE), MPFROMLONG (0));406 //WinSetFocus (WinWindowFromID (hwndDlg, WID_PB_OK), TRUE);407 //WinSetFocus( hwndPage[0], FALSE );408 422 #ifdef _QUIET_ 409 423 if (HACCEL haccel = WinLoadAccelTable (hab, GETMODULE, 1)) { … … 438 452 } 439 453 440 ULONG winhDrawFormattedText(HPS hps, PRECTL prcl, const char *pcszText, ULONG flCmd);441 454 442 455 // ** DialogProcedure ***************************************************** /*FOLD00*/ … … 461 474 #endif 462 475 CHAR ucFont[FACESIZE]; 476 463 477 if (pset->GetLangID() == CZ || pset->GetLangID() == RU || pset->GetLangID() == PL) { 464 HMQ hmq = WinQueryWindowULong( hwnd, QWL_HMQ);465 WinSetCp(hmq, 1207);466 strcpy(ucFont, "9.Times New Roman MT 30");467 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);468 469 478 UniChar target[300]; 470 479 CHAR ucLangStr[300]; … … 515 524 if (uconv_object1207) 516 525 UniFreeUconvObject(uconv_object1207); 517 } 518 /*else { 526 HMQ hmq = WinQueryWindowULong( hwnd, QWL_HMQ); 527 WinSetCp(hmq, 1207); 528 strcpy(ucFont, "9.Times New Roman MT 30"); 529 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 530 } 531 else if (g_installer) { 519 532 strcpy(ucFont, "9.WarpSans"); 520 533 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 521 } */ 522 534 } 523 535 return MRESULT (FALSE); 524 536 … … 526 538 switch (SHORT1FROMMP (mp1)) 527 539 { 540 #if 1 541 case WID_PB_HELP:{ 542 HWND hwndPage; 543 USHORT usDlgId; 544 ULONG ulPageId = 545 (ULONG) WinSendMsg(WinWindowFromID(hwnd, WID_NB_SETTINGS), 546 BKM_QUERYPAGEID, 0, MPFROM2SHORT(BKA_TOP, 547 0)); 548 hwndPage = 549 LONGFROMMP(WinSendMsg 550 (WinWindowFromID(hwnd, WID_NB_SETTINGS), 551 BKM_QUERYPAGEWINDOWHWND, MPFROMLONG(ulPageId), 552 0)); 553 usDlgId = WinQueryWindowUShort(hwndPage, QWS_ID); 554 555 HMQ hmq; 556 BOOL bUniCodeFont = FALSE; 557 CHAR ucFont[FACESIZE]; 558 559 if (pset->GetLangID() == RU) { 560 hmq = WinQueryWindowULong( hwnd, QWL_HMQ); 561 WinSetCp(hmq, 866); 562 bUniCodeFont = TRUE; 563 } 564 else if (pset->GetLangID() == CZ || pset->GetLangID() == PL) { 565 hmq = WinQueryWindowULong( hwnd, QWL_HMQ); 566 WinSetCp(hmq, 852); 567 bUniCodeFont = TRUE; 568 } 569 else { 570 hmq = WinQueryWindowULong( hwnd, QWL_HMQ); 571 WinSetCp(hmq, 850); 572 } 573 if (usDlgId == ID_DLG_SETTINGSPAGE0) 574 g_phelp->DisplayPanel(2); 575 else if (usDlgId == ID_DLG_SETTINGSPAGE1) 576 g_phelp->DisplayPanel(2210); 577 #ifdef _QUIET_ 578 else if (usDlgId == ID_DLG_SETTINGSPAGE2 && (pset->GetLangID() != IT && 579 pset->GetLangID() != BR)) 580 g_phelp->DisplayPanel(2235); 581 #else 582 else if (usDlgId == ID_DLG_SETTINGSPAGE2) 583 g_phelp->DisplayPanel(3); 584 #endif 585 else if (usDlgId == ID_DLG_SETTINGSPAGE3) 586 g_phelp->DisplayPanel(2230); 587 else if (usDlgId == ID_DLG_SETTINGSPAGE4) 588 g_phelp->DisplayPanel(2240); 589 else 590 g_phelp->DisplayPanel(4); 591 break; 592 } 593 #endif 528 594 case WID_PB_OK: 529 595 #ifdef _DOLOGDEBUG_ … … 679 745 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 680 746 } 681 /*else{747 else if (g_installer) { 682 748 strcpy(ucFont, "9.WarpSans"); 683 749 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 684 } */750 } 685 751 686 752 #ifdef _DOLOGDEBUG_ … … 735 801 MPFROMSHORT(0), MPFROMSHORT(TRUE) ); 736 802 #ifdef _QUIET_ 737 //#if 1738 803 // set play sound button 739 804 pset->AdjustButton (hwnd, WID_CB_DOSOUND, … … 782 847 pset->SetFileSaveStyle (FSS_PROMPT); 783 848 #ifdef _QUIET_ 784 //#if 1785 849 pset->DoSound(WinQueryButtonCheckstate 786 850 (hwnd, WID_CB_DOSOUND)); … … 886 950 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 887 951 } 888 /*else{952 else if (g_installer) { 889 953 strcpy(ucFont, "9.WarpSans"); 890 954 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 891 } */955 } 892 956 return MRESULT (FALSE); 893 957 } … … 915 979 pset->SSWAlwaysOnTop ()); 916 980 #else 917 //#if 1918 981 pset->AdjustButton (hwnd, WID_CB_SERIALCAPTURE, 919 982 pset->SerialCapture ()); … … 972 1035 #endif 973 1036 #ifndef _QUIET_ 974 //#if 0975 1037 // query state of checkbuttons and set flags 976 1038 pset->SSWHide(WinQueryButtonCheckstate(hwnd, WID_CB_SSWHIDE)); … … 1009 1071 pset->SetSSWCaptureType (CAP_SCREEN); 1010 1072 #ifdef _QUIET_ 1011 //#if 11012 1073 // delay time 1013 1074 ULONG ul; … … 1108 1169 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 1109 1170 } 1110 /*else {1111 strcpy(ucFont, "9.WarpSans");1112 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);1113 } */1114 1171 return MRESULT (FALSE); 1115 1172 } … … 1237 1294 #endif 1238 1295 pset = PSETTINGS (mp2); 1296 1239 1297 HMQ hmq = WinQueryWindowULong(hwnd /*WinWindowFromID(hwnd, ID_DLG_SETTINGSPAGE4)*/, QWL_HMQ); 1240 1298 WinSetCp(hmq, 1207); // UPF-8 Unicode … … 1329 1387 UniFreeUconvObject(uconv_object1207); 1330 1388 1331 if (pset->GetLangID() == RU || pset->GetLangID() == CZ || pset->GetLangID() == PL || 1332 pset->GetLangID() == IT) { 1389 if (pset->GetLangID() == RU || pset->GetLangID() == CZ || pset->GetLangID() == PL) { 1333 1390 strcpy(ucFont, "9.Times New Roman MT 30"); 1334 1391 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 1335 1392 } 1336 1337 // WinRemovePresParam(hwnd, PP_FONTNAMESIZE);*/1338 //HMQ hmq = WinQueryWindowULong(hwnd /*WinWindowFromID(hwnd, WID_LB_LANGUAGES)*/, QWL_HMQ);1339 //WinSetCp(hmq, 1207); // UPF-8 Unicode1393 else if (g_installer) { 1394 strcpy(ucFont, "9.WarpSans"); 1395 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 1396 } 1340 1397 return MRESULT (FALSE); 1341 1398 } … … 1367 1424 LM_QUERYITEMHANDLE, 1368 1425 MPFROMLONG(i), NULL)); 1369 // WinQueryLboxItemText (hwndLB, i, ach, sizeof (ach)); 1426 1370 1427 if (stricmp (pset->QueryString(SEI_LANGUAGE), psz) == 0) 1371 1428 break; … … 1423 1480 else 1424 1481 pset->SetString(SEI_LANGUAGE, psz); 1425 #if 0 1426 ul = USHORT (WinSendDlgItemMsg (hwnd, WID_LB_LANGUAGESHELP, 1427 LM_QUERYSELECTION, 1428 MPFROMLONG (LIT_FIRST), 0L)); 1429 WinSendDlgItemMsg (hwnd, WID_LB_LANGUAGESHELP, LM_QUERYITEMTEXT, 1430 MPFROM2SHORT (ul, sizeof (ach)), MPFROMP (ach)); 1431 if (stricmp (pset->QueryString(SEI_LANGUAGEHELP), ach) == 0 && !fChanged) 1432 fChanged = FALSE; 1433 else 1434 pset->SetString (SEI_LANGUAGEHELP, ach); 1435 #endif 1482 1436 1483 if (fChanged) { 1437 1484 if (!stricmp(psz, "gotreses") || !stricmp(psz, "goqreses")) 1438 1485 strcpy(ach, "gotcha_es"); 1439 else if (!stricmp(psz, "gotresbr") || !stricmp(psz, "goqresbr")) 1440 strcpy(ach, "gotcha_br"); 1441 else if (!stricmp(psz, "gotresit") || !stricmp(psz, "goqresit")) 1442 strcpy(ach, "gotcha_it"); 1486 /*else if (!stricmp(psz, "gotresit") || !stricmp(psz, "goqresit")) 1487 strcpy(ach, "gotcha_it");*/ 1443 1488 else 1444 1489 strcpy(ach, "gotcha_en"); … … 1716 1761 return QueryString( SEI_NUMSAVEDIR ); 1717 1762 } 1718 1719 // ************************************************************************1720 1721 ULONG winhDrawFormattedText(HPS hps, // in: presentation space; its settings1722 // are used, but not altered1723 PRECTL prcl, // in/out: rectangle to use for drawing1724 // (modified)1725 const char *pcszText, // in: text to draw (zero-terminated)1726 ULONG flCmd) // in: flags like in WinDrawText; I have1727 // only tested DT_TOP and DT_LEFT though.1728 // DT_WORDBREAK | DT_TEXTATTRS are always1729 // set.1730 // You can specify DT_QUERYEXTENT to only1731 // have prcl calculated without drawing.1732 {1733 PSZ p = (PSZ)pcszText;1734 LONG lDrawn = 1,1735 lTotalDrawn = 0,1736 lLineCount = 0,1737 lOrigYTop = prcl->yTop;1738 ULONG ulTextLen = strlen(pcszText),1739 ulCharHeight,1740 flCmd2,1741 xLeftmost = prcl->xRight,1742 xRightmost = prcl->xLeft;1743 RECTL rcl2;1744 1745 flCmd2 = flCmd | DT_WORDBREAK | DT_TEXTATTRS;1746 1747 ulCharHeight = 30;//gpihQueryLineSpacing(hps);1748 1749 while ( (lDrawn)1750 && (lTotalDrawn < ulTextLen)1751 )1752 {1753 memcpy(&rcl2, prcl, sizeof(rcl2));1754 lDrawn = WinDrawText(hps,1755 ulTextLen-lTotalDrawn,1756 p,1757 &rcl2,1758 0, 0, // colors1759 flCmd2);1760 1761 // update char counters1762 p += lDrawn;1763 lTotalDrawn += lDrawn;1764 1765 // update x extents1766 if (rcl2.xLeft < xLeftmost)1767 xLeftmost = rcl2.xLeft;1768 if (rcl2.xRight > xRightmost)1769 xRightmost = rcl2.xRight;1770 1771 // update y for next line1772 prcl->yTop -= ulCharHeight;1773 1774 // increase line count1775 lLineCount++;1776 }1777 prcl->xLeft = xLeftmost;1778 prcl->xRight = xRightmost;1779 prcl->yBottom = prcl->yTop;1780 prcl->yTop = lOrigYTop;1781 1782 return lLineCount;1783 }
Note:
See TracChangeset
for help on using the changeset viewer.