From 7a704cf1257ebb6774d71985e4671d55af91695c Mon Sep 17 00:00:00 2001 From: SHIRAKATA Kentaro Date: Sun, 16 Jun 2019 02:32:55 +0900 Subject: [PATCH] patch for win32/gui --- win/win32/mhstatus.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/win/win32/mhstatus.c b/win/win32/mhstatus.c index 2fc0952..fd44c85 100644 --- a/win/win32/mhstatus.c +++ b/win/win32/mhstatus.c @@ -348,9 +348,13 @@ onWMPaint(HWND hWnd, WPARAM wParam, LPARAM lParam) cached_font * fnt = mswin_get_font(NHW_STATUS, fntatr, hdc, FALSE); +#if 0 /*JP*/ BOOL useUnicode = fnt->supportsUnicode; +#endif +#if 0 /*JP*//* wchar‚É•ÏŠ·‚µ‚È‚¢ */ winos_ascii_to_wide_str(str, wbuf, SIZE(wbuf)); +#endif nFg = (clr == NO_COLOR ? status_fg_color : ((clr >= 0 && clr < CLR_MAX) ? nhcolor_to_RGB(clr) @@ -406,10 +410,10 @@ onWMPaint(HWND hWnd, WPARAM wParam, LPARAM lParam) } #else /* get bounding rectangle */ - GetTextExtentPoint32(hdc, wbuf, vlen, &sz); + GetTextExtentPoint32(hdc, str, vlen, &sz); /* first draw title normally */ - DrawText(hdc, wbuf, vlen, &rt, DT_LEFT); + DrawText(hdc, str, vlen, &rt, DT_LEFT); #endif int bar_percent = status_string->bar_percent; if (bar_percent > 0) { @@ -433,7 +437,7 @@ onWMPaint(HWND hWnd, WPARAM wParam, LPARAM lParam) else DrawTextA(hdc, str, vlen, &barrect, DT_LEFT); #else - DrawText(hdc, wbuf, vlen, &barrect, DT_LEFT); + DrawText(hdc, str, vlen, &barrect, DT_LEFT); #endif } DeleteObject(back_brush); @@ -468,10 +472,10 @@ onWMPaint(HWND hWnd, WPARAM wParam, LPARAM lParam) } #else /* get bounding rectangle */ - GetTextExtentPoint32(hdc, wbuf, vlen, &sz); + GetTextExtentPoint32(hdc, str, vlen, &sz); /* draw */ - DrawText(hdc, wbuf, vlen, &rt, DT_LEFT); + DrawText(hdc, str, vlen, &rt, DT_LEFT); #endif } assert(sz.cy >= 0); -- 2.11.0