CTreeCtrl::GetItemPartRect
Retrieves the bounding rectangle for a specified part of a specified item in the current tree-view control.
BOOL GetItemPartRect(
HTREEITEM hItem,
int nPart,
LPRECT lpRect
)const;
Параметры
Parameter |
Description |
---|---|
[in] hItem |
Handle to a tree-view control item. |
[in] nPart |
Identifier for the part. Must be set to TVGIPR_BUTTON. |
[out] lpRect |
Pointer to a RECT structure. If this method is successful, the structure receives the rectangle coordinates of the part specified by hItem and nPart. |
Возвращаемое значение
true if this method is successful; otherwise, false.
Заметки
Each tree control item is bounded by a graphics rectangle. Whenever a point in that rectangle is clicked, the item is said to be hit. This method returns the largest rectangle such that when a point in the rectangle is clicked, the item identified by the hItem parameter is hit.
This method sends the TVM_GETITEMPARTRECT message, which is described in the Windows SDK. For more information, see the TreeView_GetItemPartRect macro.
Требования
Header: afxcmn.h
This method is supported in Windows Vista and later.
Additional requirements for this method are described in Build Requirements for Windows Vista Common Controls.