comctl32/button: Keep control style.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ffd84dc429
commit
b442a5c0f0
|
@ -91,6 +91,7 @@ typedef struct _BUTTON_INFO
|
|||
{
|
||||
HWND hwnd;
|
||||
HWND parent;
|
||||
LONG style;
|
||||
LONG state;
|
||||
HFONT font;
|
||||
WCHAR *note;
|
||||
|
@ -340,11 +341,16 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
|
|||
break;
|
||||
|
||||
case WM_NCCREATE:
|
||||
{
|
||||
CREATESTRUCTW *cs = (CREATESTRUCTW *)lParam;
|
||||
|
||||
infoPtr = heap_alloc_zero( sizeof(*infoPtr) );
|
||||
SetWindowLongPtrW( hWnd, 0, (LONG_PTR)infoPtr );
|
||||
infoPtr->hwnd = hWnd;
|
||||
infoPtr->parent = GetParent(hWnd);
|
||||
infoPtr->parent = cs->hwndParent;
|
||||
infoPtr->style = cs->style;
|
||||
return DefWindowProcW(hWnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
case WM_NCDESTROY:
|
||||
SetWindowLongPtrW( hWnd, 0, 0 );
|
||||
|
|
|
@ -1004,6 +1004,7 @@ static void test_button_data(void)
|
|||
{
|
||||
HWND self;
|
||||
HWND parent;
|
||||
LONG style;
|
||||
};
|
||||
unsigned int i;
|
||||
HWND parent;
|
||||
|
@ -1027,6 +1028,7 @@ static void test_button_data(void)
|
|||
{
|
||||
ok(desc->self == hwnd, "Unexpected 'self' field.\n");
|
||||
ok(desc->parent == parent, "Unexpected 'parent' field.\n");
|
||||
ok(desc->style == (WS_CHILD | BS_NOTIFY | styles[i]), "Unexpected 'style' field.\n");
|
||||
}
|
||||
|
||||
DestroyWindow(hwnd);
|
||||
|
|
Loading…
Reference in New Issue