Hi, Fixing the "sample" box in the select font dialog. 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 16:55:24.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 ); } } @@ -982,9 +984,11 @@ HPEN hOrigPen; HFONT hOrigFont; COLORREF rgbPrev; - WCHAR sample[SAMPLE_EXTLEN+5]={'A','a','B','b'}; + WCHAR sample[SAMPLE_EXTLEN+9]={'A','a','B','b','Y','y','Z','z'}; + 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 );