Commit 32bfaeb3 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/header: Do not touch 'hwnd' field in HDM_LAYOUT.

parent 38a71457
......@@ -1465,7 +1465,6 @@ HEADER_InsertItemT (HEADER_INFO *infoPtr, INT nItem, const HDITEMW *phdi, BOOL b
static LRESULT
HEADER_Layout (HEADER_INFO *infoPtr, LPHDLAYOUT lpLayout)
{
lpLayout->pwpos->hwnd = infoPtr->hwndSelf;
lpLayout->pwpos->hwndInsertAfter = 0;
lpLayout->pwpos->x = lpLayout->prc->left;
lpLayout->pwpos->y = lpLayout->prc->top;
......
......@@ -11184,7 +11184,7 @@ static void LISTVIEW_UpdateSize(LISTVIEW_INFO *infoPtr)
wp.cy = 0;
}
SetWindowPos(wp.hwnd, wp.hwndInsertAfter, wp.x, wp.y, wp.cx, wp.cy, wp.flags);
SetWindowPos(infoPtr->hwndHeader, wp.hwndInsertAfter, wp.x, wp.y, wp.cx, wp.cy, wp.flags);
TRACE(" after SWP wp=%d,%d (%dx%d)\n", wp.x, wp.y, wp.cx, wp.cy);
infoPtr->rcList.top = max(wp.cy, 0);
......
......@@ -873,9 +873,12 @@ static void test_hdm_layout(HWND hParent)
ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq,
"adder header control to parent", FALSE);
windowPos.hwnd = (HWND)0xdeadbeef;
flush_sequences(sequences, NUM_MSG_SEQUENCES);
retVal = SendMessageA(hChild, HDM_LAYOUT, 0, (LPARAM) &hdLayout);
expect(TRUE, retVal);
ok(windowPos.hwnd == (HWND)0xdeadbeef, "Unexpected value %p.\n", windowPos.hwnd);
ok(!windowPos.hwndInsertAfter, "Unexpected value %p.\n", windowPos.hwndInsertAfter);
ok_sequence(sequences, HEADER_SEQ_INDEX, layout_seq, "layout sequence testing", FALSE);
......@@ -1884,6 +1887,7 @@ START_TEST(header)
test_hdf_fixedwidth(parent_hwnd);
test_hds_nosizing(parent_hwnd);
test_item_auto_format(parent_hwnd);
test_hdm_layout(parent_hwnd);
unload_v6_module(ctx_cookie, hCtx);
......
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