Alexander Nicolaysen Sørnes : wordpad: Set default font to 'Times New Roman', like native does.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Feb 26 12:19:36 CST 2007


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

Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date:   Mon Feb 26 18:32:11 2007 +0100

wordpad: Set default font to 'Times New Roman', like native does.

---

 programs/wordpad/wordpad.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c
index 0d45cb7..dccbfef 100644
--- a/programs/wordpad/wordpad.c
+++ b/programs/wordpad/wordpad.c
@@ -253,6 +253,21 @@ static void HandleCommandLine(LPWSTR cmdline)
         MessageBox(hMainWnd, "Printing not implemented", "WordPad", MB_OK);
 }
 
+static void DoDefaultFont()
+{
+    static const WCHAR szFaceName[] = {'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n',0};
+    CHARFORMAT2W fmt;
+
+    ZeroMemory(&fmt, sizeof(fmt));
+
+    fmt.cbSize = sizeof(fmt);
+    fmt.dwMask = CFM_FACE;
+
+    lstrcpyW(fmt.szFaceName, szFaceName);
+
+    SendMessage(hEditorWnd, EM_SETCHARFORMAT,  SCF_DEFAULT, (LPARAM)&fmt);
+}
+
 static LRESULT OnCreate( HWND hWnd, WPARAM wParam, LPARAM lParam)
 {
     HWND hToolBarWnd, hReBarWnd;
@@ -332,6 +347,8 @@ static LRESULT OnCreate( HWND hWnd, WPARAM wParam, LPARAM lParam)
     SetFocus(hEditorWnd);
     SendMessage(hEditorWnd, EM_SETEVENTMASK, 0, ENM_SELCHANGE);
 
+    DoDefaultFont();
+
     DoLoadStrings();
 
     return 0;




More information about the wine-cvs mailing list