Ignore:
Timestamp:
Feb 14, 2000, 6:31:40 PM (26 years ago)
Author:
cbratschi
Message:

merged comctl32.c and treeview with corel 20000212 + my newest code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/status.c

    r2740 r2782  
    1 /* $Id: status.c,v 1.18 2000-02-10 18:51:19 cbratschi Exp $ */
     1/* $Id: status.c,v 1.19 2000-02-14 17:31:39 cbratschi Exp $ */
    22/*
    33 * Interface code to StatusWindow widget/control
     
    900900    }
    901901
    902     hdc = GetDC(0);
     902    hdc = GetDC(hwnd);
    903903    if (hdc) {
    904904        TEXTMETRICA tm;
     
    907907        hOldFont = SelectObject (hdc,infoPtr->hDefaultFont);
    908908        GetTextMetricsA(hdc, &tm);
    909         infoPtr->textHeight = tm.tmHeight;
     909        infoPtr->textHeight = tm.tmHeight+tm.tmExternalLeading;
    910910        SelectObject (hdc, hOldFont);
    911         ReleaseDC(0, hdc);
     911        ReleaseDC(hwnd, hdc);
    912912    }
    913913
     
    936936    width = rect.right - rect.left;
    937937    infoPtr->height = infoPtr->textHeight + 4 + VERT_BORDER;
    938 //CB: todo: find bug!
     938//CB: todo: find bug in font handling!
    939939infoPtr->height += 4;
    940940    MoveWindow(hwnd,lpCreate->x,lpCreate->y-1,width,infoPtr->height,FALSE);
     
    10701070
    10711071    infoPtr->hFont = (HFONT)wParam;
    1072     if (LOWORD(lParam) == TRUE) {
    1073         HDC hdc = GetDC (hwnd);
    1074         STATUSBAR_Refresh (hwnd, hdc);
    1075         ReleaseDC (hwnd, hdc);
     1072    if (LOWORD(lParam) == TRUE)
     1073    {
     1074      HDC hdc = GetDC (hwnd);
     1075      TEXTMETRICA tm;
     1076      HFONT hOldFont;
     1077
     1078      hOldFont = SelectObject(hdc,infoPtr->hFont);
     1079      GetTextMetricsA(hdc,&tm);
     1080      infoPtr->textHeight = tm.tmHeight+tm.tmExternalLeading;
     1081      SelectObject(hdc,hOldFont);
     1082
     1083      //CB: todo: move window
     1084
     1085      STATUSBAR_Refresh (hwnd, hdc);
     1086      ReleaseDC (hwnd, hdc);
    10761087    }
    10771088
Note: See TracChangeset for help on using the changeset viewer.