[PATCH 1/2] comctl32/propsheet: Diverse UI fixes

Nikolay Sivov bunglehead at gmail.com
Thu Mar 9 16:17:36 CST 2017


On 09.03.2017 23:19, Hermès BÉLUSCA-MAÏTO wrote:
> [PATCH 1/2] 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.
> 
> 
> 
> 

Hi, Hermès.

Thanks for the patches, some comments follow.

>      case WM_CTLCOLORSTATIC:
> -      SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
> -      return (INT_PTR)GetSysColorBrush(COLOR_WINDOW);
> +      SetBkMode((HDC)wParam, TRANSPARENT);
> +      return (INT_PTR)GetStockObject(HOLLOW_BRUSH);
>    }

Do you have a simple test program to confirm this? This should be a
separate patch.

> @@ -3373,7 +3373,7 @@ 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);
> -            if (!IS_INTRESOURCE(ppshpage->pszHeaderTitle))
> +            if (!IS_INTRESOURCE(ppshpage->pszHeaderSubTitle))
>                  DrawTextW(hdc, ppshpage->pszHeaderSubTitle, -1, &r, DT_LEFT | DT_WORDBREAK);
>  	    else
>  	    {

Looks good, please make it a separate patch too.

> @@ -3298,7 +3298,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
>  
>          hOldFont = SelectObject(hdc, psInfo->hFontBold);
>  
> -        if (psInfo->ppshheader.dwFlags & PSH_USEHBMHEADER)
> +        if (psInfo->ppshheader.u5.hbmHeader)
>          {
>              hbmp = SelectObject(hdcSrc, psInfo->ppshheader.u5.hbmHeader);
>  

I'll need a visual test to confirm this, looks a bit strange that flags
are ignored.

> @@ -3395,7 +3395,8 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
>  
>      if ( (ppshpage && (ppshpage->dwFlags & PSP_HIDEHEADER)) &&
>  	 (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW)) &&
> -	 (psInfo->ppshheader.dwFlags & PSH_WATERMARK) ) 
> +	 (psInfo->ppshheader.dwFlags & PSH_WATERMARK) &&
> +	 (psInfo->ppshheader.u4.hbmWatermark) ) 
>      {
>  	HWND hwndLine = GetDlgItem(hwnd, IDC_SUNKEN_LINE);

This looks reasonable, also deserved a separate patch.




More information about the wine-devel mailing list