Commit 3845ed79 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/tests: Tests for LVM_GETCOLUMNORDERARRAY: it actually uses HDM_GETORDERARRAY.

parent 3ae2e3a7
...@@ -152,6 +152,12 @@ static const struct message listview_ownerdata_switchto_seq[] = { ...@@ -152,6 +152,12 @@ static const struct message listview_ownerdata_switchto_seq[] = {
{ 0 } { 0 }
}; };
static const struct message listview_getorderarray_seq[] = {
{ LVM_GETCOLUMNORDERARRAY, sent|id|wparam, 2, 0, LISTVIEW_ID },
{ HDM_GETORDERARRAY, sent|id|wparam, 2, 0, HEADER_ID },
{ 0 }
};
struct subclass_info struct subclass_info
{ {
WNDPROC oldproc; WNDPROC oldproc;
...@@ -800,9 +806,10 @@ static void test_items(void) ...@@ -800,9 +806,10 @@ static void test_items(void)
static void test_columns(void) static void test_columns(void)
{ {
HWND hwnd; HWND hwnd, hwndheader;
LVCOLUMN column; LVCOLUMN column;
DWORD rc; DWORD rc;
INT order[2];
hwnd = CreateWindowEx(0, "SysListView32", "foo", LVS_REPORT, hwnd = CreateWindowEx(0, "SysListView32", "foo", LVS_REPORT,
10, 10, 100, 200, hwndparent, NULL, NULL, NULL); 10, 10, 100, 200, hwndparent, NULL, NULL, NULL);
...@@ -821,6 +828,31 @@ static void test_columns(void) ...@@ -821,6 +828,31 @@ static void test_columns(void)
"Inserting column with no mask failed to set width to 10 with %d\n", rc); "Inserting column with no mask failed to set width to 10 with %d\n", rc);
DestroyWindow(hwnd); DestroyWindow(hwnd);
/* LVM_GETCOLUMNORDERARRAY */
hwnd = create_listview_control(0);
hwndheader = subclass_header(hwnd);
memset(&column, 0, sizeof(column));
column.mask = LVCF_WIDTH;
column.cx = 100;
rc = ListView_InsertColumn(hwnd, 0, &column);
ok(rc == 0, "Inserting column failed with %d\n", rc);
column.cx = 200;
rc = ListView_InsertColumn(hwnd, 1, &column);
ok(rc == 1, "Inserting column failed with %d\n", rc);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
rc = SendMessage(hwnd, LVM_GETCOLUMNORDERARRAY, 2, (LPARAM)&order);
ok(rc != 0, "Expected LVM_GETCOLUMNORDERARRAY to succeed\n");
ok(order[0] == 0, "Expected order 0, got %d\n", order[0]);
ok(order[1] == 1, "Expected order 1, got %d\n", order[1]);
ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_getorderarray_seq, "get order array", TRUE);
DestroyWindow(hwnd);
} }
/* test setting imagelist between WM_NCCREATE and WM_CREATE */ /* test setting imagelist between WM_NCCREATE and WM_CREATE */
static WNDPROC listviewWndProc; static WNDPROC listviewWndProc;
......
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