LVM_GETSUBITEMRECT message
Applies to: desktop apps only
Retrieves information about the bounding rectangle for a subitem in a list-view control. You can send this message explicitly or by using the ListView_GetSubItemRect macro (recommended). This message is intended to be used only with list-view controls that use the LVS_REPORT style.
Parameters
- wParam
-
Index of the subitem's parent item.
- lParam
-
Pointer to a RECT structure that will receive the subitem bounding rectangle information. Its members must be initialized according to the following member/value relationships:
Value Meaning - top
The one-based index of the subitem.
- left
Flag value (see remarks). Indicates the portion of the list-view subitem for which to retrieve the bounding rectangle.
Return value
Returns nonzero if successful, or zero otherwise.
Remarks
Following are the flag values that may be set.
| Flag Value | Meaning |
| LVIR_BOUNDS | Returns the bounding rectangle of the entire item, including the icon and label. |
| LVIR_ICON | Returns the bounding rectangle of the icon or small icon. |
| LVIR_LABEL | Returns the bounding rectangle of the entire item, including the icon and label. This is identical to LVIR_BOUNDS. |
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
Send comments about this topic to Microsoft
Build date: 3/6/2012
You can get the first Column's width via LVM_GETCOLUMN which returns a valid width for subitem = 0.
The height can be obtained via LVM_GETITEMRECT.
- 8/20/2011
- ElmueSoft
- 12/21/2008
- VadZ
- 4/7/2010
- Stanley Roark