GetItemSpacing(true): Return the default item spacing if the view is

LVS_ICON, and the current 'item size' otherwise.
This commit is contained in:
Francois Gouget 2001-04-16 19:04:12 +00:00 committed by Alexandre Julliard
parent 6d257f5cf5
commit dd30c5c282
1 changed files with 10 additions and 4 deletions

View File

@ -5756,10 +5756,16 @@ static LRESULT LISTVIEW_GetItemSpacing(HWND hwnd, BOOL bSmall)
}
else
{
/* TODO: need to store width of smallicon item */
lResult = MAKELONG(0, infoPtr->nItemHeight);
}
LONG style = GetWindowLongA(hwnd, GWL_STYLE);
if ((style & LVS_TYPEMASK) == LVS_ICON)
{
lResult = MAKELONG(DEFAULT_COLUMN_WIDTH, GetSystemMetrics(SM_CXSMICON)+HEIGHT_PADDING);
}
else
{
lResult = MAKELONG(infoPtr->nItemWidth, infoPtr->nItemHeight);
}
}
return lResult;
}