Ignore:
Timestamp:
Nov 12, 2001, 7:01:05 PM (24 years ago)
Author:
sandervl
Message:

Fix for calculating font size for a dialog box

File:
1 edited

Legend:

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

    r7305 r7325  
    1 /* $Id: win32dlg.cpp,v 1.73 2001-11-08 18:32:59 sandervl Exp $ */
     1/* $Id: win32dlg.cpp,v 1.74 2001-11-12 18:01:05 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    451451                 * of the font
    452452                 */
     453#ifdef __WIN32OS2__
     454                if (GetTextExtentPointA(hDC,szAvgChars,sizeof(szAvgChars)-1,&total))
     455                {
     456                   /* round up */
     457                    pSize->cx = ((2*total.cx/(sizeof(szAvgChars)-1)) + 1)/2;
     458                    Success = TRUE;
     459                }
     460#else
    453461                if (GetTextExtentPointA(hDC,szAvgChars,sizeof(szAvgChars),&total))
    454462                {
     
    457465                    Success = TRUE;
    458466                }
     467#endif
    459468            }
    460469            else
Note: See TracChangeset for help on using the changeset viewer.