From 2a0c69700f5e1d80de99199acd57726c8735d81c Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 14 Jan 2016 23:02:09 -0500 Subject: [PATCH] win32gui menu color attribute fix from Alex Kompel... --- doc/fixes36.1 | 1 + win/win32/mhmenu.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/fixes36.1 b/doc/fixes36.1 index bcc189206..301a6749c 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -130,6 +130,7 @@ unix: options file with CR+LF line ends and an invalid option line resulted in because embedded carriage return character changed cursor's position win32gui: getversionstring() was overflowing the provided Help About buffer win32gui: guard against buffer overflow in in mswin_getlin() +win32gui: handle menu_color attribute MacOSX: initial binary release was built from out of date source code that had 'BETA' and 'DEBUG' inappropriately enabled MacOSX: force TIMED_DELAY build option on so that 'runmode' run-time option diff --git a/win/win32/mhmenu.c b/win/win32/mhmenu.c index e7519a69e..74cee9880 100644 --- a/win/win32/mhmenu.c +++ b/win/win32/mhmenu.c @@ -1021,7 +1021,8 @@ onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam) if (iflags.use_menu_color && (menucolr = get_menu_coloring(item->str, &color, &attr))) { - /* TODO: use attr too */ + SelectObject(lpdis->hDC, + mswin_get_font(NHW_MENU, attr, lpdis->hDC, FALSE)); if (color != NO_COLOR) SetTextColor(lpdis->hDC, nhcolor_to_RGB(color)); }