[PATCH] shell32: Fix return value for CreateWindowExW.

Alexandre Julliard julliard at winehq.org
Thu Jan 4 04:30:06 CST 2018


Andrey Gusev <andrey.goosev at gmail.com> writes:

> @@ -634,12 +634,13 @@ static void    Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst)
>  
>      if (!RegisterClassExW(&wc)) return;
>  
> -    CreateWindowExW(0, wc.lpszClassName, appName,
> -		    WS_OVERLAPPEDWINDOW | WS_VISIBLE,
> -		    CW_USEDEFAULT, CW_USEDEFAULT,
> -		    CW_USEDEFAULT, CW_USEDEFAULT,
> -		    hWnd, NULL, hInst, panel);
> -    if (!panel->hWnd) return;
> +    panel->hWnd = CreateWindowExW(0, wc.lpszClassName, appName,
> +		                  WS_OVERLAPPEDWINDOW | WS_VISIBLE,
> +		                  CW_USEDEFAULT, CW_USEDEFAULT,
> +		                  CW_USEDEFAULT, CW_USEDEFAULT,
> +		                  hWnd, NULL, hInst, panel);
> +    if (!panel->hWnd)
> +        return FALSE;

You are again returning a value from a void function, please check
compiler warnings for your patches. Also note that the existing code is
correct, panel->hWnd is already set.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list