Changeset 5796 for trunk/src/user32/win32dlg.cpp
- Timestamp:
- May 24, 2001, 9:27:00 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32dlg.cpp
r5725 r5796 1 /* $Id: win32dlg.cpp,v 1.6 3 2001-05-17 09:50:30 sandervl Exp $ */1 /* $Id: win32dlg.cpp,v 1.64 2001-05-24 19:27:00 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 83 83 /* and must be converted to pixels first */ 84 84 /* (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 } 88 94 89 95 hUserFont = CreateFontW(-pixels, 0, 0, 0, … … 496 502 BOOL Win32Dialog::getCharSize( HFONT hUserFont, SIZE * pSize ) 497 503 { 498 HDC hDC = GetDC(0);504 HDC hDC = CreateCompatibleDC(0); 499 505 BOOL Success = getCharSizeFromDC( hDC, hUserFont, pSize ); 500 ReleaseDC(0,hDC);506 DeleteDC(hDC); 501 507 return Success; 502 508 }
Note:
See TracChangeset
for help on using the changeset viewer.