Hi, Resubmit, following the comment from Shachar. Hopefully now with the right patch. Changelog: dlls/commdlg : fontdlg.c Fix "sample" box drawing by adding some needed coordinate and size transformations. Rein. -- Rein Klazes rklazes@xxxxxxxxx
--- wine/dlls/commdlg/fontdlg.c 2003-09-10 05:56:48.000000000 +0200 +++ mywine/dlls/commdlg/fontdlg.c 2003-11-25 18:14:36.000000000 +0100 @@ -916,6 +916,7 @@ if( GetWindowInfo( GetDlgItem( hDlg, stc5), &wininfo ) ) { + MapWindowPoints( 0, hDlg, (LPPOINT) &wininfo.rcWindow, 2); InvalidateRect( hDlg, &wininfo.rcWindow, TRUE ); } } @@ -932,6 +933,7 @@ if( GetWindowInfo( GetDlgItem( hDlg, stc5), &wininfo ) ) { + MapWindowPoints( 0, hDlg, (LPPOINT) &wininfo.rcWindow, 2); InvalidateRect( hDlg, &wininfo.rcWindow, TRUE ); } } @@ -983,8 +985,10 @@ HFONT hOrigFont; COLORREF rgbPrev; WCHAR sample[SAMPLE_EXTLEN+5]={'A','a','B','b'}; + LOGFONTA lf = *(lpcf->lpLogFont); /* Always start with this basic sample */ + MapWindowPoints( 0, hDlg, (LPPOINT) &info.rcWindow, 2); hdc=BeginPaint( hDlg, &ps ); /* Paint frame */ @@ -1006,7 +1010,8 @@ info.rcWindow.bottom--; info.rcWindow.top++; info.rcWindow.left++; - hOrigFont=SelectObject( hdc, CreateFontIndirectA( lpcf->lpLogFont ) ); + lf.lfHeight = MulDiv(lf.lfHeight, GetDeviceCaps(hdc, LOGPIXELSY), 72); + hOrigFont = SelectObject( hdc, CreateFontIndirectA( &lf ) ); rgbPrev=SetTextColor( hdc, lpcf->rgbColors ); DrawTextW( hdc, sample, -1, &info.rcWindow, DT_CENTER|DT_VCENTER|DT_SINGLELINE );