comctl32/listview: Create header when LVS_EX_FULLROWSELECT is requested.
This commit is contained in:
parent
06f65740b2
commit
485fde811d
|
@ -8450,6 +8450,11 @@ static DWORD LISTVIEW_SetExtendedListViewStyle(LISTVIEW_INFO *infoPtr, DWORD mas
|
||||||
LISTVIEW_UpdateSize(infoPtr);
|
LISTVIEW_UpdateSize(infoPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if((infoPtr->dwLvExStyle ^ old_ex_style) & LVS_EX_FULLROWSELECT)
|
||||||
|
{
|
||||||
|
LISTVIEW_CreateHeader(infoPtr);
|
||||||
|
}
|
||||||
|
|
||||||
if((infoPtr->dwLvExStyle ^ old_ex_style) & LVS_EX_TRANSPARENTBKGND)
|
if((infoPtr->dwLvExStyle ^ old_ex_style) & LVS_EX_TRANSPARENTBKGND)
|
||||||
{
|
{
|
||||||
if (infoPtr->dwLvExStyle & LVS_EX_TRANSPARENTBKGND)
|
if (infoPtr->dwLvExStyle & LVS_EX_TRANSPARENTBKGND)
|
||||||
|
|
|
@ -1557,6 +1557,20 @@ static void test_create(void)
|
||||||
ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n");
|
ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n");
|
||||||
DestroyWindow(hList);
|
DestroyWindow(hList);
|
||||||
|
|
||||||
|
/* setting LVS_EX_FULLROWSELECT creates header */
|
||||||
|
hList = CreateWindow("SysListView32", "Test", LVS_REPORT, 0, 0, 100, 100, NULL, NULL,
|
||||||
|
GetModuleHandle(NULL), 0);
|
||||||
|
hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0);
|
||||||
|
ok(!IsWindow(hHeader), "Header shouldn't be created\n");
|
||||||
|
ok(NULL == GetDlgItem(hList, 0), "NULL dialog item expected\n");
|
||||||
|
SendMessage(hList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT);
|
||||||
|
hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0);
|
||||||
|
ok(IsWindow(hHeader) ||
|
||||||
|
broken(!IsWindow(hHeader)), /* 4.7x common controls */
|
||||||
|
"Header should be created\n");
|
||||||
|
ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n");
|
||||||
|
DestroyWindow(hList);
|
||||||
|
|
||||||
/* not report style accepts LVS_EX_HEADERDRAGDROP too */
|
/* not report style accepts LVS_EX_HEADERDRAGDROP too */
|
||||||
hList = create_listview_control(LVS_ICON);
|
hList = create_listview_control(LVS_ICON);
|
||||||
SendMessage(hList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_HEADERDRAGDROP);
|
SendMessage(hList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_HEADERDRAGDROP);
|
||||||
|
|
Loading…
Reference in New Issue