Commit b442a5c0 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/button: Keep control style.

parent ffd84dc4
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment