https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b3033b81a4256cd3482b3…
commit b3033b81a4256cd3482b36acbd60870ef1ddb23d
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Fri Nov 1 09:52:18 2019 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Fri Nov 1 09:52:18 2019 +0900
[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.
---
win32ss/user/ntuser/draw.c | 4 +---
win32ss/user/user32/windows/draw.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/win32ss/user/ntuser/draw.c b/win32ss/user/ntuser/draw.c
index 4b30a325a86..eb97e1e1f16 100644
--- a/win32ss/user/ntuser/draw.c
+++ b/win32ss/user/ntuser/draw.c
@@ -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);
diff --git a/win32ss/user/user32/windows/draw.c b/win32ss/user/user32/windows/draw.c
index 65bacc848d8..62798c89b26 100644
--- a/win32ss/user/user32/windows/draw.c
+++ b/win32ss/user/user32/windows/draw.c
@@ -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);