Changeset 99 for trunk/settings.cpp


Ignore:
Timestamp:
Jul 23, 2021, 10:11:05 PM (4 years ago)
Author:
Gregg Young
Message:

Fix some settings notebook font issues; minor clean up;

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/settings.cpp

    r94 r99  
    9898Settings :: Settings (VOID) :
    9999#ifdef _QUIET_
    100 //#if 1
    101100    ththSettings(apse, "gotchaq.ini", L_PROFILEVERSION)
    102101#else
     
    108107        SetLong( SEI_SERIALTIME, QueryLong( SEI_SERIALTIME ) * 20 );
    109108        SetFlag( SEI_UPDATE178DONE );
    110     } else {
     109    } /*else {
    111110        //DisplayError( "NOT Updated", "true" );
    112     }
     111        } */
    113112#ifdef _QUIET_
    114113    HINI hini = PrfOpenProfile (hab, "gotchaq.ini");
     
    465464           HMQ hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
    466465           WinSetCp(hmq, 1207);
    467            strcpy(ucFont, "8.Times New Roman MT 30");
     466           strcpy(ucFont, "9.Times New Roman MT 30");
    468467           WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
    469468
     
    517516               UniFreeUconvObject(uconv_object1207);
    518517        }
    519         else {
    520         strcpy(ucFont, "10.WarpSans");
     518        /*else {
     519        strcpy(ucFont, "9.WarpSans");
    521520        WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
    522         }
     521        } */
    523522           
    524523        return MRESULT (FALSE);
     
    658657        }
    659658        HMQ hmq;
    660         BOOL bUniCodeFont;
     659        BOOL bUniCodeFont = FALSE;
    661660        CHAR ucFont[FACESIZE];
    662661
     
    677676
    678677        if (bUniCodeFont) {
    679             strcpy(ucFont, "8.Times New Roman MT 30");
     678            strcpy(ucFont, "9.Times New Roman MT 30");
    680679            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
    681680        }
    682         else {
    683             strcpy(ucFont, "10.WarpSans");
     681        /*else {
     682            strcpy(ucFont, "9.WarpSans");
    684683            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
    685         }
     684        } */
    686685
    687686#ifdef _DOLOGDEBUG_
     
    690689        return MRESULT (FALSE);
    691690    }
    692 
    693     case WM_DRAWITEM:
    694 
    695         POWNERITEM poItem;
    696         HPS hps;
    697         RECTL       rcl,          // window area
    698                     rclClip;      // clipping region for drawn text
    699         POINTL      ptl;          // current text position
    700         FATTRS      fontAttrs;    // current font attributes
    701         FONTMETRICS fm;           // current font metr
    702 
    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 font
    710         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 background
    718         //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;
    739691
    740692    case WM_COMMAND:
     
    903855    switch (msg)
    904856    {
    905     case WM_INITDLG:
     857    case WM_INITDLG: {
    906858#ifdef _DOLOGDEBUG_
    907859        LogDebug( "Page1Procedure: start WM_INITDLG" );
     
    912864#endif
    913865        HMQ hmq;
    914         BOOL bUniCodeFont;
     866        BOOL bUniCodeFont = FALSE;
    915867        CHAR ucFont[FACESIZE];
    916868       
     
    931883
    932884        if (bUniCodeFont) {
    933             strcpy(ucFont, "8.Times New Roman MT 30");
     885            strcpy(ucFont, "9.Times New Roman MT 30");
    934886            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
    935887        }
    936         //else
    937            // WinRemovePresParam(hwnd, PP_FONTNAMESIZE);
     888        /*else {
     889            strcpy(ucFont, "9.WarpSans");
     890            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
     891        } */
    938892        return MRESULT (FALSE);
    939 
     893    }
    940894    case WM_COMMAND:
    941895
     
    11231077    switch (msg)
    11241078    {
    1125     case WM_INITDLG:
     1079    case WM_INITDLG: {
    11261080#ifdef _DOLOGDEBUG_
    11271081        LogDebug( "Page3Procedure: start WM_INITDLG" );
     
    11321086#endif
    11331087        HMQ hmq;
    1134         BOOL bUniCodeFont;
     1088        BOOL bUniCodeFont = FALSE;
    11351089        CHAR ucFont[FACESIZE];
    11361090       
     
    11511105
    11521106        if (bUniCodeFont) {
    1153             strcpy(ucFont, "8.Times New Roman MT 30");
     1107            strcpy(ucFont, "9.Times New Roman MT 30");
    11541108            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
    11551109        }
    1156         //else
    1157         //    WinRemovePresParam(hwnd, PP_FONTNAMESIZE);
     1110        /*else {
     1111            strcpy(ucFont, "9.WarpSans");
     1112            WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
     1113        } */
    11581114        return MRESULT (FALSE);
     1115    }
    11591116
    11601117    case WM_COMMAND:
     
    13741331            if (pset->GetLangID() == RU || pset->GetLangID() == CZ || pset->GetLangID() == PL ||
    13751332               pset->GetLangID() == IT) {
    1376                 strcpy(ucFont, "8.Times New Roman MT 30");
     1333                strcpy(ucFont, "9.Times New Roman MT 30");
    13771334                WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
    13781335            }
Note: See TracChangeset for help on using the changeset viewer.