From b1b42795a94d8e3cb69e2d9e5bd0af4929610361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Thu, 9 Mar 2017 20:30:16 +0000 Subject: [PATCH] [COMCTL32]: comctl32/propsheet: Diverse UI fixes: - Draw static text elements with a transparent background, so that they acquire the correct background color of the wizard window. - Modify the check for the header bitmap, as the header's hbmHeader is initialized also if the flag PSH_HEADER but not PSH_USEHBMHEADER is set (see function PROPSHEET_LoadWizardBitmaps). - Add a check for header's hbmWatermark so that the watermark is drawn only when a valid bitmap handle is present. - Fix a copy-pasta error when drawing the header's subtitle. CORE-12912 #comment Patch for the wizard visual problem sent upstream. CORE-12823 svn path=/trunk/; revision=74136 --- reactos/dll/win32/comctl32/propsheet.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/reactos/dll/win32/comctl32/propsheet.c b/reactos/dll/win32/comctl32/propsheet.c index bfdfa50df9c..59652824cad 100644 --- a/reactos/dll/win32/comctl32/propsheet.c +++ b/reactos/dll/win32/comctl32/propsheet.c @@ -1176,8 +1176,13 @@ PROPSHEET_WizardSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, return TRUE; case WM_CTLCOLORSTATIC: +#ifdef __REACTOS__ + SetBkMode((HDC)wParam, TRANSPARENT); + return (INT_PTR)GetStockObject(HOLLOW_BRUSH); +#else SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); return (INT_PTR)GetSysColorBrush(COLOR_WINDOW); +#endif } return DefSubclassProc(hwnd, uMsg, wParam, lParam); @@ -3281,7 +3286,11 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam) hOldFont = SelectObject(hdc, psInfo->hFontBold); +#ifdef __REACTOS__ + if (psInfo->ppshheader.u5.hbmHeader) +#else if (psInfo->ppshheader.dwFlags & PSH_USEHBMHEADER) +#endif { hbmp = SelectObject(hdcSrc, psInfo->ppshheader.u5.hbmHeader); @@ -3356,7 +3365,11 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam) if (ppshpage->dwFlags & PSP_USEHEADERSUBTITLE) { SelectObject(hdc, psInfo->hFont); SetRect(&r, 40, 25, rzone.right - 69, rzone.bottom); +#ifdef __REACTOS__ + if (!IS_INTRESOURCE(ppshpage->pszHeaderSubTitle)) +#else if (!IS_INTRESOURCE(ppshpage->pszHeaderTitle)) +#endif DrawTextW(hdc, ppshpage->pszHeaderSubTitle, -1, &r, DT_LEFT | DT_WORDBREAK); else { @@ -3378,7 +3391,12 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam) if ( (ppshpage && (ppshpage->dwFlags & PSP_HIDEHEADER)) && (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW)) && +#ifdef __REACTOS__ + (psInfo->ppshheader.dwFlags & PSH_WATERMARK) && + (psInfo->ppshheader.u4.hbmWatermark) ) +#else (psInfo->ppshheader.dwFlags & PSH_WATERMARK) ) +#endif { HWND hwndLine = GetDlgItem(hwnd, IDC_SUNKEN_LINE);