Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/user32/mdi.c | 5 +---- dlls/user32/uitools.c | 11 +++-------- 2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c index 10a38824ad..ada89bc0c6 100644 --- a/dlls/user32/mdi.c +++ b/dlls/user32/mdi.c @@ -865,7 +865,6 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild ) { HDC hMemDC; HBITMAP hBitmap, hOldBitmap; - HBRUSH hBrush; HDC hdc = GetDC(hChild);
if (hdc) @@ -877,10 +876,8 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild ) hBitmap = CreateCompatibleBitmap(hdc, cx, cy); hOldBitmap = SelectObject(hMemDC, hBitmap); SetMapMode(hMemDC, MM_TEXT); - hBrush = CreateSolidBrush(GetSysColor(COLOR_MENU)); - DrawIconEx(hMemDC, 0, 0, hIcon, cx, cy, 0, hBrush, DI_NORMAL); + DrawIconEx(hMemDC, 0, 0, hIcon, cx, cy, 0, GetSysColorBrush(COLOR_MENU), DI_NORMAL); SelectObject (hMemDC, hOldBitmap); - DeleteObject(hBrush); DeleteDC(hMemDC); ReleaseDC(hChild, hdc); hSysMenuBitmap = hBitmap; diff --git a/dlls/user32/uitools.c b/dlls/user32/uitools.c index 73ec34bff1..8657f27869 100644 --- a/dlls/user32/uitools.c +++ b/dlls/user32/uitools.c @@ -1693,26 +1693,22 @@ static BOOL UITOOLS_DrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC func, LPARAM lp }
if (flags & DSS_DISABLED) - hbrtmp = CreateSolidBrush(GetSysColor(COLOR_3DHILIGHT)); + hbrtmp = GetSysColorBrush(COLOR_3DHILIGHT); else if (flags & DSS_DEFAULT) - hbrtmp = CreateSolidBrush(GetSysColor(COLOR_3DSHADOW)); + hbrtmp = GetSysColorBrush(COLOR_3DSHADOW);
/* Draw light or dark shadow */ if (flags & (DSS_DISABLED|DSS_DEFAULT)) { - if(!hbrtmp) goto cleanup; hbsave = SelectObject(hdc, hbrtmp); if(!hbsave) goto cleanup; if(!BitBlt(hdc, x+1, y+1, cx, cy, memdc, 0, 0, 0x00B8074A)) goto cleanup; SelectObject(hdc, hbsave); - DeleteObject(hbrtmp); - hbrtmp = 0; }
if (flags & DSS_DISABLED) { - hbr = hbrtmp = CreateSolidBrush(GetSysColor(COLOR_3DSHADOW)); - if(!hbrtmp) goto cleanup; + hbr = GetSysColorBrush(COLOR_3DSHADOW); } else if (!hbr) { @@ -1731,7 +1727,6 @@ cleanup:
if(hbsave) SelectObject(hdc, hbsave); if(hbmsave) SelectObject(memdc, hbmsave); - if(hbrtmp) DeleteObject(hbrtmp); if(hbm) DeleteObject(hbm); if(memdc) DeleteDC(memdc);