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

comctl32/header: Implement HDM_SETFILTERCHANGETIMEOUT.

parent 97fea6d8
......@@ -84,6 +84,7 @@ typedef struct
INT iHotItem; /* index of hot item (cursor is over this item) */
INT iHotDivider; /* index of the hot divider (used while dragging an item or by HDM_SETHOTDIVIDER) */
INT iMargin; /* width of the margin that surrounds a bitmap */
INT filter_change_timeout; /* change timeout set with HDM_SETFILTERCHANGETIMEOUT */
HIMAGELIST himl; /* handle to an image list (may be 0) */
HEADER_ITEM *items; /* pointer to array of HEADER_ITEM's */
......@@ -1540,6 +1541,7 @@ HEADER_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
infoPtr->iMargin = 3*GetSystemMetrics(SM_CXEDGE);
infoPtr->nNotifyFormat =
SendMessageW (infoPtr->hwndNotify, WM_NOTIFYFORMAT, (WPARAM)hwnd, NF_QUERY);
infoPtr->filter_change_timeout = 1000;
hdc = GetDC (0);
hOldFont = SelectObject (hdc, GetStockObject (SYSTEM_FONT));
......@@ -2054,6 +2056,14 @@ static LRESULT HEADER_ThemeChanged(const HEADER_INFO *infoPtr)
return 0;
}
static INT HEADER_SetFilterChangeTimeout(HEADER_INFO *infoPtr, INT timeout)
{
INT old_timeout = infoPtr->filter_change_timeout;
if (timeout != 0)
infoPtr->filter_change_timeout = timeout;
return old_timeout;
}
static LRESULT WINAPI
HEADER_WindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
......@@ -2112,7 +2122,8 @@ HEADER_WindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case HDM_SETBITMAPMARGIN:
return HEADER_SetBitmapMargin(infoPtr, (INT)wParam);
/* case HDM_SETFILTERCHANGETIMEOUT: */
case HDM_SETFILTERCHANGETIMEOUT:
return HEADER_SetFilterChangeTimeout(infoPtr, (INT)lParam);
case HDM_SETHOTDIVIDER:
return HEADER_SetHotDivider(infoPtr, wParam, lParam);
......
......@@ -994,8 +994,19 @@ static void test_hdm_filterMessages(HWND hParent)
ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq,
"adder header control to parent", FALSE);
timeout = SendMessageA(hChild, HDM_SETFILTERCHANGETIMEOUT, 0, 0);
ok(timeout == 1000, "got %d\n", timeout);
timeout = SendMessageA(hChild, HDM_SETFILTERCHANGETIMEOUT, 0, 0);
ok(timeout == 1000, "got %d\n", timeout);
timeout = SendMessageA(hChild, HDM_SETFILTERCHANGETIMEOUT, 0, -100);
ok(timeout == 1000, "got %d\n", timeout);
timeout = SendMessageA(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, 100);
SendMessageA(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, timeout);
ok(timeout == -100, "got %d\n", timeout);
retVal = SendMessageA(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, timeout);
ok(retVal == 100, "got %d\n", retVal);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
......
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