Ignore:
Timestamp:
May 24, 2001, 9:27:00 PM (24 years ago)
Author:
sandervl
Message:

minor logging updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32dlg.cpp

    r5725 r5796  
    1 /* $Id: win32dlg.cpp,v 1.63 2001-05-17 09:50:30 sandervl Exp $ */
     1/* $Id: win32dlg.cpp,v 1.64 2001-05-24 19:27:00 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    8383        /* and must be converted to pixels first */
    8484        /* (see CreateFont() documentation in the Windows SDK).   */
    85         HDC dc = GetDC(0);
    86         int pixels = dlgInfo.pointSize * GetDeviceCaps(dc , LOGPIXELSY)/72;
    87         ReleaseDC(0, dc);
     85        int pixels;
     86        if (((short)dlgInfo.pointSize) < 0)
     87            pixels = -((short)dlgInfo.pointSize);
     88        else
     89        {
     90            HDC hdc = GetDC(0);
     91            pixels = dlgInfo.pointSize * GetDeviceCaps(hdc, LOGPIXELSY)/72;
     92            ReleaseDC(0, hdc);
     93        }
    8894
    8995        hUserFont = CreateFontW(-pixels, 0, 0, 0,
     
    496502BOOL Win32Dialog::getCharSize( HFONT hUserFont, SIZE * pSize )
    497503{
    498     HDC  hDC = GetDC(0);
     504    HDC  hDC = CreateCompatibleDC(0);
    499505    BOOL Success = getCharSizeFromDC( hDC, hUserFont, pSize );
    500     ReleaseDC(0, hDC);
     506    DeleteDC(hDC);
    501507    return Success;
    502508}
Note: See TracChangeset for help on using the changeset viewer.