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

oldstable
Alexander Nicolaysen Sørnes 2007-02-26 18:32:11 +01:00 committed by Alexandre Julliard
parent cdac075e41
commit b603927c31
1 changed files with 17 additions and 0 deletions

View File

@ -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;