comctl32/listview: Always forward LVM_GETCOLUMNORDERARRAY to header.
This commit is contained in:
parent
3c9db1df60
commit
5c2e7075df
|
@ -6502,14 +6502,9 @@ static BOOL LISTVIEW_GetColumnT(const LISTVIEW_INFO *infoPtr, INT nColumn, LPLVC
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline BOOL LISTVIEW_GetColumnOrderArray(const LISTVIEW_INFO *infoPtr, INT iCount, LPINT lpiArray)
|
||||||
static BOOL LISTVIEW_GetColumnOrderArray(const LISTVIEW_INFO *infoPtr, INT iCount, LPINT lpiArray)
|
|
||||||
{
|
{
|
||||||
TRACE("iCount=%d, lpiArray=%p\n", iCount, lpiArray);
|
if (!infoPtr->hwndHeader) return FALSE;
|
||||||
|
|
||||||
if (!lpiArray)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return SendMessageW(infoPtr->hwndHeader, HDM_GETORDERARRAY, iCount, (LPARAM)lpiArray);
|
return SendMessageW(infoPtr->hwndHeader, HDM_GETORDERARRAY, iCount, (LPARAM)lpiArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -176,6 +176,8 @@ static const struct message listview_ownerdata_switchto_seq[] = {
|
||||||
static const struct message listview_getorderarray_seq[] = {
|
static const struct message listview_getorderarray_seq[] = {
|
||||||
{ LVM_GETCOLUMNORDERARRAY, sent|id|wparam, 2, 0, LISTVIEW_ID },
|
{ LVM_GETCOLUMNORDERARRAY, sent|id|wparam, 2, 0, LISTVIEW_ID },
|
||||||
{ HDM_GETORDERARRAY, sent|id|wparam, 2, 0, HEADER_ID },
|
{ HDM_GETORDERARRAY, sent|id|wparam, 2, 0, HEADER_ID },
|
||||||
|
{ LVM_GETCOLUMNORDERARRAY, sent|id|wparam, 0, 0, LISTVIEW_ID },
|
||||||
|
{ HDM_GETORDERARRAY, sent|id|wparam, 0, 0, HEADER_ID },
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1413,13 +1415,28 @@ static void test_items(void)
|
||||||
|
|
||||||
static void test_columns(void)
|
static void test_columns(void)
|
||||||
{
|
{
|
||||||
HWND hwnd;
|
HWND hwnd, header;
|
||||||
LVCOLUMNA column;
|
LVCOLUMNA column;
|
||||||
LVITEMA item;
|
LVITEMA item;
|
||||||
INT order[2];
|
INT order[2];
|
||||||
CHAR buff[5];
|
CHAR buff[5];
|
||||||
DWORD rc;
|
DWORD rc;
|
||||||
|
|
||||||
|
hwnd = CreateWindowExA(0, "SysListView32", "foo", LVS_LIST,
|
||||||
|
10, 10, 100, 200, hwndparent, NULL, NULL, NULL);
|
||||||
|
ok(hwnd != NULL, "failed to create listview window\n");
|
||||||
|
|
||||||
|
header = (HWND)SendMessageA(hwnd, LVM_GETHEADER, 0, 0);
|
||||||
|
ok(header == NULL, "got %p\n", header);
|
||||||
|
|
||||||
|
rc = SendMessageA(hwnd, LVM_GETCOLUMNORDERARRAY, 2, (LPARAM)&order);
|
||||||
|
ok(rc == 0, "got %d\n", rc);
|
||||||
|
|
||||||
|
header = (HWND)SendMessageA(hwnd, LVM_GETHEADER, 0, 0);
|
||||||
|
ok(header == NULL, "got %p\n", header);
|
||||||
|
|
||||||
|
DestroyWindow(hwnd);
|
||||||
|
|
||||||
hwnd = CreateWindowExA(0, "SysListView32", "foo", LVS_REPORT,
|
hwnd = CreateWindowExA(0, "SysListView32", "foo", LVS_REPORT,
|
||||||
10, 10, 100, 200, hwndparent, NULL, NULL, NULL);
|
10, 10, 100, 200, hwndparent, NULL, NULL, NULL);
|
||||||
ok(hwnd != NULL, "failed to create listview window\n");
|
ok(hwnd != NULL, "failed to create listview window\n");
|
||||||
|
@ -1457,6 +1474,9 @@ static void test_columns(void)
|
||||||
ok(order[0] == 0, "Expected order 0, got %d\n", order[0]);
|
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(order[1] == 1, "Expected order 1, got %d\n", order[1]);
|
||||||
|
|
||||||
|
rc = SendMessageA(hwnd, LVM_GETCOLUMNORDERARRAY, 0, 0);
|
||||||
|
expect(0, rc);
|
||||||
|
|
||||||
ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_getorderarray_seq, "get order array", FALSE);
|
ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_getorderarray_seq, "get order array", FALSE);
|
||||||
|
|
||||||
/* after column added subitem is considered as present */
|
/* after column added subitem is considered as present */
|
||||||
|
|
Loading…
Reference in New Issue