Changeset 99 for trunk/settings.cpp
- Timestamp:
- Jul 23, 2021, 10:11:05 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/settings.cpp
r94 r99 98 98 Settings :: Settings (VOID) : 99 99 #ifdef _QUIET_ 100 //#if 1101 100 ththSettings(apse, "gotchaq.ini", L_PROFILEVERSION) 102 101 #else … … 108 107 SetLong( SEI_SERIALTIME, QueryLong( SEI_SERIALTIME ) * 20 ); 109 108 SetFlag( SEI_UPDATE178DONE ); 110 } else {109 } /*else { 111 110 //DisplayError( "NOT Updated", "true" ); 112 }111 } */ 113 112 #ifdef _QUIET_ 114 113 HINI hini = PrfOpenProfile (hab, "gotchaq.ini"); … … 465 464 HMQ hmq = WinQueryWindowULong( hwnd, QWL_HMQ); 466 465 WinSetCp(hmq, 1207); 467 strcpy(ucFont, " 8.Times New Roman MT 30");466 strcpy(ucFont, "9.Times New Roman MT 30"); 468 467 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 469 468 … … 517 516 UniFreeUconvObject(uconv_object1207); 518 517 } 519 else {520 strcpy(ucFont, " 10.WarpSans");518 /*else { 519 strcpy(ucFont, "9.WarpSans"); 521 520 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 522 } 521 } */ 523 522 524 523 return MRESULT (FALSE); … … 658 657 } 659 658 HMQ hmq; 660 BOOL bUniCodeFont ;659 BOOL bUniCodeFont = FALSE; 661 660 CHAR ucFont[FACESIZE]; 662 661 … … 677 676 678 677 if (bUniCodeFont) { 679 strcpy(ucFont, " 8.Times New Roman MT 30");678 strcpy(ucFont, "9.Times New Roman MT 30"); 680 679 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 681 680 } 682 else {683 strcpy(ucFont, " 10.WarpSans");681 /*else { 682 strcpy(ucFont, "9.WarpSans"); 684 683 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 685 } 684 } */ 686 685 687 686 #ifdef _DOLOGDEBUG_ … … 690 689 return MRESULT (FALSE); 691 690 } 692 693 case WM_DRAWITEM:694 695 POWNERITEM poItem;696 HPS hps;697 RECTL rcl, // window area698 rclClip; // clipping region for drawn text699 POINTL ptl; // current text position700 FATTRS fontAttrs; // current font attributes701 FONTMETRICS fm; // current font metr702 703 704 poItem = POWNERITEM (mp2);705 706 //hps = WinBeginPaint( hwnd, NULLHANDLE, NULLHANDLE );707 memset( &fontAttrs, 0, sizeof(FATTRS) );708 PmpfF(("PageID %i", poItem->hItem));709 // set the font attributes and create the logical font710 fontAttrs.usRecordLength = sizeof(FATTRS);711 fontAttrs.usCodePage = 852;712 fontAttrs.fsType = FATTR_TYPE_MBCS;713 fontAttrs.fsFontUse = FATTR_FONTUSE_NOMIX;714 strcpy( fontAttrs.szFacename, "10.WarpSans");715 GpiCreateLogFont( poItem->hps, NULL, 1L, &fontAttrs );716 GpiSetCharSet( poItem->hps, 1L );717 // paint the window background718 //WinQueryWindowRect( hwnd, &rcl ); ????719 WinFillRect( hps, &poItem->rclItem, SYSCLR_WINDOW );720 GpiQueryFontMetrics( poItem->hps, sizeof(FONTMETRICS), &fm );721 rclClip.xLeft = poItem->rclItem.xLeft + fm.lAveCharWidth;722 rclClip.yBottom = poItem->rclItem.yBottom + fm.lXHeight;723 rclClip.xRight = poItem->rclItem.xRight - fm.lAveCharWidth;724 rclClip.yTop = poItem->rclItem.yTop - fm.lXHeight;725 ptl.x = rclClip.xLeft;726 ptl.y = rclClip.yTop - fm.lExternalLeading - fm.lMaxAscender;727 GpiCharStringPosAt( poItem->hps, &ptl, &rclClip, CHS_CLIP,728 /*Strlen(pszPageTab[i])*/5, (PCH) /*pszPageTab[i]*/ "Test", NULL );729 WinEndPaint( hps );730 731 //poItem->hwnd = hwndNB; /* Window handle. */732 //poItem->hps = hps; /* Presentation-space handle. */733 //poItem->fsState = BKS_BACKPAGESTR | BKS_MAJORTABTOP | BKS_TABBEDDIALOG; /* State. */734 //poItem->fsAttribute = BKA_MAJOR | BKA_AUTOPAGESIZE; /* Attribute. */735 //poItem->rclItem; ???? /* Item rectangle. */736 //poItem->hItem = idPage[i];737 738 break;739 691 740 692 case WM_COMMAND: … … 903 855 switch (msg) 904 856 { 905 case WM_INITDLG: 857 case WM_INITDLG: { 906 858 #ifdef _DOLOGDEBUG_ 907 859 LogDebug( "Page1Procedure: start WM_INITDLG" ); … … 912 864 #endif 913 865 HMQ hmq; 914 BOOL bUniCodeFont ;866 BOOL bUniCodeFont = FALSE; 915 867 CHAR ucFont[FACESIZE]; 916 868 … … 931 883 932 884 if (bUniCodeFont) { 933 strcpy(ucFont, " 8.Times New Roman MT 30");885 strcpy(ucFont, "9.Times New Roman MT 30"); 934 886 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 935 887 } 936 //else 937 // WinRemovePresParam(hwnd, PP_FONTNAMESIZE); 888 /*else { 889 strcpy(ucFont, "9.WarpSans"); 890 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 891 } */ 938 892 return MRESULT (FALSE); 939 893 } 940 894 case WM_COMMAND: 941 895 … … 1123 1077 switch (msg) 1124 1078 { 1125 case WM_INITDLG: 1079 case WM_INITDLG: { 1126 1080 #ifdef _DOLOGDEBUG_ 1127 1081 LogDebug( "Page3Procedure: start WM_INITDLG" ); … … 1132 1086 #endif 1133 1087 HMQ hmq; 1134 BOOL bUniCodeFont ;1088 BOOL bUniCodeFont = FALSE; 1135 1089 CHAR ucFont[FACESIZE]; 1136 1090 … … 1151 1105 1152 1106 if (bUniCodeFont) { 1153 strcpy(ucFont, " 8.Times New Roman MT 30");1107 strcpy(ucFont, "9.Times New Roman MT 30"); 1154 1108 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 1155 1109 } 1156 //else 1157 // WinRemovePresParam(hwnd, PP_FONTNAMESIZE); 1110 /*else { 1111 strcpy(ucFont, "9.WarpSans"); 1112 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 1113 } */ 1158 1114 return MRESULT (FALSE); 1115 } 1159 1116 1160 1117 case WM_COMMAND: … … 1374 1331 if (pset->GetLangID() == RU || pset->GetLangID() == CZ || pset->GetLangID() == PL || 1375 1332 pset->GetLangID() == IT) { 1376 strcpy(ucFont, " 8.Times New Roman MT 30");1333 strcpy(ucFont, "9.Times New Roman MT 30"); 1377 1334 WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont); 1378 1335 }
Note:
See TracChangeset
for help on using the changeset viewer.