wineconsole: Apply the selected background colour to the entire font preview dialog.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2016-01-25 21:01:02 +11:00 committed by Alexandre Julliard
parent 0311c6adb2
commit 969151755a
1 changed files with 4 additions and 1 deletions

View File

@ -190,12 +190,15 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam,
hFont = (HFONT)GetWindowLongPtrW(hWnd, 0); hFont = (HFONT)GetWindowLongPtrW(hWnd, 0);
if (hFont) if (hFont)
{ {
COLORREF bkcolor;
WCHAR ascii[] = {'A','S','C','I','I',':',' ','a','b','c','X','Y','Z','\0'}; WCHAR ascii[] = {'A','S','C','I','I',':',' ','a','b','c','X','Y','Z','\0'};
WCHAR buf[256]; WCHAR buf[256];
int len; int len;
hOldFont = SelectObject(ps.hdc, hFont); hOldFont = SelectObject(ps.hdc, hFont);
SetBkColor(ps.hdc, WCUSER_ColorMap[GetWindowLongW(GetDlgItem(di->hDlg, IDC_FNT_COLOR_BK), 0)]); bkcolor = WCUSER_ColorMap[GetWindowLongW(GetDlgItem(di->hDlg, IDC_FNT_COLOR_BK), 0)];
FillRect(ps.hdc, &ps.rcPaint, CreateSolidBrush(bkcolor));
SetBkColor(ps.hdc, bkcolor);
SetTextColor(ps.hdc, WCUSER_ColorMap[GetWindowLongW(GetDlgItem(di->hDlg, IDC_FNT_COLOR_FG), 0)]); SetTextColor(ps.hdc, WCUSER_ColorMap[GetWindowLongW(GetDlgItem(di->hDlg, IDC_FNT_COLOR_FG), 0)]);
len = LoadStringW(GetModuleHandleW(NULL), IDS_FNT_PREVIEW, len = LoadStringW(GetModuleHandleW(NULL), IDS_FNT_PREVIEW,
buf, sizeof(buf) / sizeof(buf[0])); buf, sizeof(buf) / sizeof(buf[0]));