comctl32/listview: LVM_GETVIEWRECT is unsupported on LVS_REPORT style.
This commit is contained in:
parent
e7a07aa3fb
commit
6b63fce757
|
@ -2372,6 +2372,7 @@ static BOOL LISTVIEW_Arrange(LISTVIEW_INFO *infoPtr, INT nAlignCode)
|
|||
/***
|
||||
* DESCRIPTION:
|
||||
* Retrieves the bounding rectangle of all the items, not offset by Origin.
|
||||
* For LVS_REPORT always returns empty rectangle.
|
||||
*
|
||||
* PARAMETER(S):
|
||||
* [I] infoPtr : valid pointer to the listview structure
|
||||
|
@ -2412,11 +2413,6 @@ static void LISTVIEW_GetAreaRect(const LISTVIEW_INFO *infoPtr, LPRECT lprcView)
|
|||
lprcView->right = x * infoPtr->nItemWidth;
|
||||
lprcView->bottom = y * infoPtr->nItemHeight;
|
||||
break;
|
||||
|
||||
case LVS_REPORT:
|
||||
lprcView->right = infoPtr->nItemWidth;
|
||||
lprcView->bottom = infoPtr->nItemCount * infoPtr->nItemHeight;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2439,10 +2435,14 @@ static BOOL LISTVIEW_GetViewRect(const LISTVIEW_INFO *infoPtr, LPRECT lprcView)
|
|||
TRACE("(lprcView=%p)\n", lprcView);
|
||||
|
||||
if (!lprcView) return FALSE;
|
||||
|
||||
LISTVIEW_GetOrigin(infoPtr, &ptOrigin);
|
||||
LISTVIEW_GetAreaRect(infoPtr, lprcView);
|
||||
OffsetRect(lprcView, ptOrigin.x, ptOrigin.y);
|
||||
|
||||
LISTVIEW_GetAreaRect(infoPtr, lprcView);
|
||||
|
||||
if ((infoPtr->dwStyle & LVS_TYPEMASK) != LVS_REPORT)
|
||||
{
|
||||
LISTVIEW_GetOrigin(infoPtr, &ptOrigin);
|
||||
OffsetRect(lprcView, ptOrigin.x, ptOrigin.y);
|
||||
}
|
||||
|
||||
TRACE("lprcView=%s\n", wine_dbgstr_rect(lprcView));
|
||||
|
||||
|
|
|
@ -2475,11 +2475,9 @@ static void test_getviewrect(void)
|
|||
r = SendMessage(hwnd, LVM_GETVIEWRECT, 0, (LPARAM)&rect);
|
||||
expect(TRUE, r);
|
||||
/* left is set to (2e31-1) - XP SP2 */
|
||||
todo_wine {
|
||||
expect(0, rect.right);
|
||||
expect(0, rect.top);
|
||||
expect(0, rect.bottom);
|
||||
}
|
||||
|
||||
/* switch to LVS_ICON */
|
||||
SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~LVS_REPORT);
|
||||
|
|
Loading…
Reference in New Issue