• 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;

  • 相关阅读:
    Android.mk高级写法
    Android Bitmap和Canvas学习笔记
    cocos2dx 3.x 开发环境搭建
    quick cocos2d-x 2.2.4 window环境调试
    Android应用开发相关下载资源(2014/12/14更新)
    quick-cocos2dx-2.2.4环境搭建
    U盘重装Windows系统
    Visual Studio 32位64位的问题和如何编译32位64位工程的问题
    使用UE4.16开发Oculus需要Oculus软件版本高于1.11
    UE4打包程序没有声音-需要安装UE4PrereqSetup_x64.exe
  • 原文地址:https://www.cnblogs.com/johnpher/p/2570706.html
Copyright © 2020-2023  润新知