From c013e44b1eae46a996334f063047bd34384c9210 Mon Sep 17 00:00:00 2001 From: Reece Dunn Date: Tue, 8 Feb 2011 19:03:25 +0000 Subject: [PATCH] winefile: In the Options > Font menu handler, initially select the current font. --- programs/winefile/winefile.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c index aed4d14f7e9..1135407a3a6 100644 --- a/programs/winefile/winefile.c +++ b/programs/winefile/winefile.c @@ -263,11 +263,14 @@ static inline void choose_font(HWND hwnd) LOGFONTW lFont; HDC hdc = GetDC(hwnd); + + GetObjectW(Globals.hfont, sizeof(LOGFONTW), &lFont); + chFont.lStructSize = sizeof(CHOOSEFONTW); chFont.hwndOwner = hwnd; chFont.hDC = NULL; chFont.lpLogFont = &lFont; - chFont.Flags = CF_SCREENFONTS | CF_FORCEFONTEXIST | CF_LIMITSIZE | CF_NOSCRIPTSEL; + chFont.Flags = CF_SCREENFONTS | CF_FORCEFONTEXIST | CF_LIMITSIZE | CF_NOSCRIPTSEL | CF_INITTOLOGFONTSTRUCT; chFont.rgbColors = RGB(0,0,0); chFont.lCustData = 0; chFont.lpfnHook = NULL;