[WIN32SS][NTUSER][USER32] Fix menu checkmarks (#2009)

CORE-16470
The checkmarks of menu were black boxes. This PR will fix drawing.
- Don't change background mode.
This commit is contained in:
Katayama Hirofumi MZ 2019-11-01 09:52:18 +09:00 committed by GitHub
parent 009dafe391
commit b3033b81a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -955,7 +955,7 @@ BOOL FASTCALL UITOOLS95_DrawFrameMenu(HDC dc, LPRECT r, UINT uFlags)
HFONT hFont, hOldFont;
WCHAR Symbol;
RECT myr;
INT cxy, nBkMode;
INT cxy;
cxy = UITOOLS_MakeSquareRect(r, &myr);
switch(uFlags & 0xff)
{
@ -1014,9 +1014,7 @@ BOOL FASTCALL UITOOLS95_DrawFrameMenu(HDC dc, LPRECT r, UINT uFlags)
IntGdiSetTextColor(dc, IntGetSysColor((uFlags & DFCS_INACTIVE) ? COLOR_BTNSHADOW : COLOR_BTNTEXT));
}
/* draw selected symbol */
nBkMode = IntGdiSetBkMode(dc, TRANSPARENT);
GreTextOutW(dc, myr.left, myr.top, &Symbol, 1);
IntGdiSetBkMode(dc, nBkMode);
/* restore previous settings */
NtGdiSelectFont(dc, hOldFont);
GreDeleteObject(hFont);

View File

@ -977,7 +977,7 @@ static BOOL UITOOLS95_DrawFrameMenu(HDC dc, LPRECT r, UINT uFlags)
HFONT hFont, hOldFont;
TCHAR Symbol;
RECT myr;
INT cxy, nBkMode;
INT cxy;
cxy = UITOOLS_MakeSquareRect(r, &myr);
switch(uFlags & 0xff)
{
@ -1034,9 +1034,7 @@ static BOOL UITOOLS95_DrawFrameMenu(HDC dc, LPRECT r, UINT uFlags)
SetTextColor(dc, GetSysColor((uFlags & DFCS_INACTIVE) ? COLOR_BTNSHADOW : COLOR_BTNTEXT));
}
/* draw selected symbol */
nBkMode = SetBkMode(dc, TRANSPARENT);
TextOut(dc, myr.left, myr.top, &Symbol, 1);
SetBkMode(dc, nBkMode);
/* restore previous settings */
SelectObject(dc, hOldFont);
DeleteObject(hFont);