https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ad61c574f4d3f24eb8e3df...
commit ad61c574f4d3f24eb8e3df855ef96a5bc0a31fe5 Author: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com AuthorDate: Thu Jun 15 10:55:59 2023 +0900 Commit: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com CommitDate: Thu Jun 15 10:55:59 2023 +0900
[MSPAINT] Fix two handle leaks
CORE-18867 --- base/applications/mspaint/toolsettings.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/base/applications/mspaint/toolsettings.cpp b/base/applications/mspaint/toolsettings.cpp index 6ff0aed291d..323956ba7ca 100644 --- a/base/applications/mspaint/toolsettings.cpp +++ b/base/applications/mspaint/toolsettings.cpp @@ -69,8 +69,7 @@ VOID CToolSettingsWindow::drawTrans(HDC hdc, LPCRECT prc) RECT rc[2]; getTransRects(rc, prc);
- HBRUSH hbrHigh = ::GetSysColorBrush(COLOR_HIGHLIGHT); - ::FillRect(hdc, &rc[toolsModel.IsBackgroundTransparent()], hbrHigh); + ::FillRect(hdc, &rc[toolsModel.IsBackgroundTransparent()], (HBRUSH)(COLOR_HIGHLIGHT + 1)); ::DrawIconEx(hdc, rc[0].left, rc[0].top, m_hNontranspIcon, CX_TRANS_ICON, CY_TRANS_ICON, 0, NULL, DI_NORMAL); ::DrawIconEx(hdc, rc[1].left, rc[1].top, m_hTranspIcon, @@ -119,8 +118,7 @@ VOID CToolSettingsWindow::drawBrush(HDC hdc, LPCRECT prc) RECT rects[12]; getBrushRects(rects, prc);
- HBRUSH hbrHigh = ::GetSysColorBrush(COLOR_HIGHLIGHT); - ::FillRect(hdc, &rects[toolsModel.GetBrushStyle()], hbrHigh); + ::FillRect(hdc, &rects[toolsModel.GetBrushStyle()], (HBRUSH)(COLOR_HIGHLIGHT + 1));
for (INT i = 0; i < 12; i++) {