LVM_GETITEMPOSITION LVM_GETITEMPOSITION wParam = (WPARAM) (int) i; lParam = (LPARAM) (POINT FAR *) ppt; Retrieves the position of a list view item. You can send this message explicitly or by using the ListView_GetItemPosition macro. Returns TRUE if successful, or FALSE otherwise. i Index of the list view item. ppt Address of aPOINT structure that receives the position of the item's upper-left corner, in view coordinates. LVM_GETITEMRECT LVM_GETITEMRECT wParam = (WPARAM) (int) i; lParam = (LPARAM) (LPRECT) prc; Retrieves the bounding rectangle for all or part of an item in the current view. You can send this message explicitly or by using the ListView_GetItemRect macro. Returns TRUE if successful, or FALSE otherwise. i Index of the list view item. prc Address of aRECT structure that receives the bounding rectangle. When the message is sent, the left member of this structure is used to determine the portion of the list view item for which to retrieve the bounding rectangle. This will be one of the code values defined in ListView_GetItemRect. This parameter is specified by the left member of theRECT structure pointed to by prc.
Dim TempRect as RectSendMessage ListView.hWnd, LVM_GETITEMRECT, 项目索引, TempRect
我是通过给bbbbbbbb.name赋值实现过
Dim nod As NodePrivate Sub TreeView1_NodeCheck(ByVal Node As MSComctlLib.Node) If Node.Selected Then nod = Node.Key End Sub 用点击测试
LVM_GETITEMPOSITION
wParam = (WPARAM) (int) i;
lParam = (LPARAM) (POINT FAR *) ppt; Retrieves the position of a list view item. You can send this message explicitly or by using the ListView_GetItemPosition macro. Returns TRUE if successful, or FALSE otherwise.
i
Index of the list view item.
ppt
Address of aPOINT structure that receives the position of the item's upper-left corner, in view coordinates. LVM_GETITEMRECT
LVM_GETITEMRECT
wParam = (WPARAM) (int) i;
lParam = (LPARAM) (LPRECT) prc; Retrieves the bounding rectangle for all or part of an item in the current view. You can send this message explicitly or by using the ListView_GetItemRect macro. Returns TRUE if successful, or FALSE otherwise.
i
Index of the list view item.
prc
Address of aRECT structure that receives the bounding rectangle. When the message is sent, the left member of this structure is used to determine the portion of the list view item for which to retrieve the bounding rectangle. This will be one of the code values defined in ListView_GetItemRect.
This parameter is specified by the left member of theRECT structure pointed to by prc.
If Node.Selected Then
nod = Node.Key
End Sub
用点击测试