Alexandre Julliard : comdlg32: Implement WM_CHOOSEFONT_GETLOGFONT in the font dialog.

Alexandre Julliard julliard at winehq.org
Wed Mar 14 13:56:10 CDT 2012


Module: wine
Branch: master
Commit: 66ea6464c20ba24f7844b4eaba4e2e0621a87142
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=66ea6464c20ba24f7844b4eaba4e2e0621a87142

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Mar 13 22:12:07 2012 +0100

comdlg32: Implement WM_CHOOSEFONT_GETLOGFONT in the font dialog.

---

 dlls/comdlg32/fontdlg.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/comdlg32/fontdlg.c b/dlls/comdlg32/fontdlg.c
index c081e91..25dc1e4 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);




More information about the wine-cvs mailing list