win32gui menu color attribute fix

from Alex Kompel...
This commit is contained in:
nhmall
2016-01-14 23:02:09 -05:00
parent 52b8139a4b
commit 2a0c69700f
2 changed files with 3 additions and 1 deletions

View File

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

View File

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