AAAAAAA
   |
   |_______ BBBBBBBB
   |
   |_______ CCCCCCCC我现在想得到文本“BBBBBBB”或“CCCCCCC”的坐标值。

解决方案 »

  1.   

    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. 

    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. 

    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.
      

  2.   

    Dim TempRect as RectSendMessage ListView.hWnd, LVM_GETITEMRECT, 项目索引, TempRect
      

  3.   

    我是通过给bbbbbbbb.name赋值实现过
      

  4.   

    Dim nod As NodePrivate Sub TreeView1_NodeCheck(ByVal Node As MSComctlLib.Node)
       If Node.Selected Then
          nod = Node.Key
    End Sub
    用点击测试
      

  5.   

    node.text 就是你要的...可在TreeView1_NodeCheck取出来
      

  6.   

    我想你要的应该是纵向坐标(有用的也就是纵向的了)这样吧。别想着用什么API了那是挺麻烦的事,要做到这一点其实有一个很简单的办法就是将可视的个数(TREEVIEW有这样的属性的)与它的高度除一下就是单行的高度了,而你选择的节点是第几行也不难算出的,不过要注意有些节点没有展开,然后怎么办我想你是知道的了,不再多说了。祝你成功!好请你给分!哈哈哈!