From 66ea6464c20ba24f7844b4eaba4e2e0621a87142 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 13 Mar 2012 22:12:07 +0100 Subject: [PATCH] comdlg32: Implement WM_CHOOSEFONT_GETLOGFONT in the font dialog. --- dlls/comdlg32/fontdlg.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/comdlg32/fontdlg.c b/dlls/comdlg32/fontdlg.c index c081e91a31..25dc1e4241 100644 --- a/dlls/comdlg32/fontdlg.c +++ b/dlls/comdlg32/fontdlg.c @@ -1194,9 +1194,14 @@ static INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, case WM_DESTROY: return CFn_WMDestroy(hDlg, lpcfw); case WM_CHOOSEFONT_GETLOGFONT: + { + LOGFONTA *logfont = (LOGFONTA *)lParam; TRACE("WM_CHOOSEFONT_GETLOGFONT lParam=%08lX\n", lParam); - FIXME("current logfont back to caller\n"); + memcpy( logfont, lpcfw->lpLogFont, FIELD_OFFSET( LOGFONTA, lfFaceName )); + WideCharToMultiByte( CP_ACP, 0, lpcfw->lpLogFont->lfFaceName, LF_FACESIZE, + logfont->lfFaceName, LF_FACESIZE, NULL, NULL ); break; + } case WM_PAINT: return CFn_WMPaint(hDlg, wParam, lParam, lpcfw); } @@ -1242,7 +1247,7 @@ static INT_PTR CALLBACK FormatCharDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, return TRUE; case WM_CHOOSEFONT_GETLOGFONT: TRACE("WM_CHOOSEFONT_GETLOGFONT lParam=%08lX\n", lParam); - FIXME("current logfont back to caller\n"); + memcpy( (LOGFONTW *)lParam, lpcf->lpLogFont, sizeof(LOGFONTW) ); break; case WM_PAINT: return CFn_WMPaint(hDlg, wParam, lParam, lpcf); -- 2.32.0.93.g670b81a890