comctl32: LVM_SETITEMTEXT is not supported on LVS_OWNERDATA.
This commit is contained in:
parent
90085afebf
commit
8276a3375b
|
@ -8896,6 +8896,7 @@ static BOOL LISTVIEW_SetItemTextT(LISTVIEW_INFO *infoPtr, INT nItem, const LVITE
|
||||||
LVITEMW lvItem;
|
LVITEMW lvItem;
|
||||||
|
|
||||||
if (!lpLVItem || nItem < 0 || nItem >= infoPtr->nItemCount) return FALSE;
|
if (!lpLVItem || nItem < 0 || nItem >= infoPtr->nItemCount) return FALSE;
|
||||||
|
if (infoPtr->dwStyle & LVS_OWNERDATA) return FALSE;
|
||||||
|
|
||||||
lvItem.iItem = nItem;
|
lvItem.iItem = nItem;
|
||||||
lvItem.iSubItem = lpLVItem->iSubItem;
|
lvItem.iSubItem = lpLVItem->iSubItem;
|
||||||
|
|
|
@ -2627,6 +2627,8 @@ static void test_sorting(void)
|
||||||
|
|
||||||
static void test_ownerdata(void)
|
static void test_ownerdata(void)
|
||||||
{
|
{
|
||||||
|
static char test_str[] = "test";
|
||||||
|
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
LONG_PTR style, ret;
|
LONG_PTR style, ret;
|
||||||
DWORD res;
|
DWORD res;
|
||||||
|
@ -2711,7 +2713,7 @@ static void test_ownerdata(void)
|
||||||
expect(1, res);
|
expect(1, res);
|
||||||
DestroyWindow(hwnd);
|
DestroyWindow(hwnd);
|
||||||
|
|
||||||
/* LVM_SETITEM is unsupported on LVS_OWNERDATA */
|
/* LVM_SETITEM and LVM_SETITEMTEXT is unsupported on LVS_OWNERDATA */
|
||||||
hwnd = create_listview_control(LVS_OWNERDATA | LVS_REPORT);
|
hwnd = create_listview_control(LVS_OWNERDATA | LVS_REPORT);
|
||||||
ok(hwnd != NULL, "failed to create a listview window\n");
|
ok(hwnd != NULL, "failed to create a listview window\n");
|
||||||
res = SendMessageA(hwnd, LVM_SETITEMCOUNT, 1, 0);
|
res = SendMessageA(hwnd, LVM_SETITEMCOUNT, 1, 0);
|
||||||
|
@ -2725,6 +2727,10 @@ static void test_ownerdata(void)
|
||||||
item.state = LVIS_SELECTED;
|
item.state = LVIS_SELECTED;
|
||||||
res = SendMessageA(hwnd, LVM_SETITEM, 0, (LPARAM)&item);
|
res = SendMessageA(hwnd, LVM_SETITEM, 0, (LPARAM)&item);
|
||||||
expect(FALSE, res);
|
expect(FALSE, res);
|
||||||
|
memset(&item, 0, sizeof(item));
|
||||||
|
item.pszText = test_str;
|
||||||
|
res = SendMessageA(hwnd, LVM_SETITEMTEXT, 0, (LPARAM)&item);
|
||||||
|
expect(FALSE, res);
|
||||||
DestroyWindow(hwnd);
|
DestroyWindow(hwnd);
|
||||||
|
|
||||||
/* check notifications after focused/selected changed */
|
/* check notifications after focused/selected changed */
|
||||||
|
|
Loading…
Reference in New Issue