[PATCH] user32: Fix RealGetWindowClass() to return what it's supposed to for same process windows (try2)

Alexandre Julliard julliard at winehq.org
Tue Feb 18 07:12:22 CST 2014


Nikolay Sivov <nsivov at codeweavers.com> writes:

> @@ -1098,13 +1098,62 @@ INT WINAPI GetClassNameW( HWND hwnd, LPWSTR buffer, INT count )
>      return ret;
>  }
>  
> +struct builtinclass_name
> +{
> +    const char *nameA;
> +    const WCHAR *nameW;
> +    int len;
> +};
> +
> +static const WCHAR buttonW[] = {'B','u','t','t','o','n',0};
> +static const WCHAR comboboxW[] = {'C','o','m','b','o','B','o','x',0};
> +static const WCHAR dialogW[] = {'#','3','2','7','7','0',0};
> +static const WCHAR editW[] = {'E','d','i','t',0};
> +static const WCHAR listboxW[] = {'L','i','s','t','B','o','x',0};
> +static const WCHAR mdiclientW[] = {'M','D','I','C','l','i','e','n','t',0};
> +static const WCHAR scrollbarW[] = {'S','c','r','o','l','l','B','a','r',0};
> +static const WCHAR staticW[] = {'S','t','a','t','i','c',0};
> +
> +static const struct builtinclass_name builtinclass_names[BUILTINTYPE_MAX] =
> +{
> +    { "Button",    buttonW,    sizeof(buttonW)/sizeof(WCHAR) },
> +    { "ComboBox",  comboboxW,  sizeof(comboboxW)/sizeof(WCHAR) },
> +    { "#32770",    dialogW,    sizeof(dialogW)/sizeof(WCHAR) },
> +    { "Edit",      editW,      sizeof(editW)/sizeof(WCHAR) },
> +    { "ListBox",   listboxW,   sizeof(listboxW)/sizeof(WCHAR) },
> +    { "MDIClient", mdiclientW, sizeof(mdiclientW)/sizeof(WCHAR) },
> +    { "ScrollBar", scrollbarW, sizeof(scrollbarW)/sizeof(WCHAR) },
> +    { "Static",    staticW,    sizeof(staticW)/sizeof(WCHAR) }
> +};

You should use the existing builtin class descriptors instead of
duplicating that info.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list