zoukankan      html  css  js  c++  java
  • CTreeCtrl控件使用技巧

    一、CTreeCtrl::GetRootItem

          Call this function to retrieve the root item of the tree view control.

             HTREEITEM GetRootItem( ) const;

    二、CTreeCtrl::GetItemText

          

          Returns the text of the item specified by hItem.

          

            CString GetItemText(
                   HTREEITEM hItem 
            ) const;
    三、CTreeCtrl::GetNextItem 

          Call this function to retrieve the tree view item that has the 
    specified relationship, indicated by the nCode parameter, to 
    hItem. 
     
           HTREEITEM GetNextItem(
                    HTREEITEM hItem,
                    UINT nCode 
           ) const;
    nCode

    A flag indicating the type of relation to hItem. This flag can be one of the following values:

    • TVGN_CARET   Retrieves the currently selected item.

    • TVGN_CHILD   Retrieves the first child item of the item specified by the hItem parameter.

    • TVGN_DROPHILITE   Retrieves the item that is the target of a drag-and-drop operation.

    • TVGN_FIRSTVISIBLE   Retrieves the first visible item.

    • TVGN_LASTVISIBLE   Retrieves the last expanded item in the tree. This does not retrieve the last item visible in the tree-view window.

    • TVGN_NEXT   Retrieves the next sibling item.

    • TVGN_NEXTVISIBLE   Retrieves the next visible item that follows the specified item.

    • TVGN_PARENT   Retrieves the parent of the specified item.

    • TVGN_PREVIOUS   Retrieves the previous sibling item.

    • TVGN_PREVIOUSVISIBLE   Retrieves the first visible item that precedes the specified item.

    • TVGN_ROOT   Retrieves the first child item of the root item of which the specified item is a part.

    四、CTreeCtrl::ItemHasChildren 

    Use this function to determine whether the tree item specified by hItem has child items.

    BOOL ItemHasChildren(
       HTREEITEM hItem 
    ) const;
    五、CTreeCtrl::GetChildItem

    Call this function to retrieve the tree view item that is the child of the item specified by hItem.

    HTREEITEM GetChildItem(
       HTREEITEM hItem 
    ) const;

  • 相关阅读:
    Asp.net 程序连接orcle如果在安装 32 位 Oracle 客户端组件的情况下以 64 位模式运行,
    Navicat 远程连接 Oracle11g 数据库报错 No listener 的问题
    springMVC中@DateTimeFormat 失效的处理
    单例设计模式中懒汉式线程安全的处理
    ajax同步请求
    vue.js在标签属性中拼接字符串
    vue.js进行遍历
    html页面之间的传值
    URL编码和解码的一个小问题(JS方法和JAVA方法)
    SolrJ的配置及使用
  • 原文地址:https://www.cnblogs.com/johnpher/p/2570706.html
Copyright © 2011-2022 走看看