dd

CTreeCtrl::HitTest
HTREEITEM HitTest(
   CPoint pt,
   UINT* pFlags = NULL
) const;
HTREEITEM HitTest(
   TVHITTESTINFO* pHitTestInfo
) const;

CTreeCtrl::GetCheck
BOOL GetCheck(
   HTREEITEM hItem
) const;
CTreeCtrl::SetCheck
BOOL SetCheck(
   HTREEITEM hItem,
   BOOL fCheck = TRUE
);


CTreeCtrl::ItemHasChildren
BOOL ItemHasChildren(
   HTREEITEM hItem
) const;
CTreeCtrl::GetChildItem
HTREEITEM GetChildItem(
   HTREEITEM hItem
) const;
CTreeCtrl::GetParentItem
HTREEITEM GetParentItem(
   HTREEITEM hItem
) const;


CTreeCtrl::GetNextItem
HTREEITEM GetNextItem(
   HTREEITEM hItem,
   UINT nCode
) const;
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.

CWnd::CreateEx
virtual BOOL CreateEx(
   DWORD dwExStyle,    //WS_EX_CLIENTEDGE   Specifies that a window has a 3D look — that is, a border with a sunken edge.
   LPCTSTR lpszClassName,
   LPCTSTR lpszWindowName,
   DWORD dwStyle,   //这里是建立Ctreectrl应用Tree-View Control Window Styles,见msdn
   const RECT& rect,
   CWnd* pParentWnd,
   UINT nID,
   LPVOID lpParam = NULL
);

DWORD dwStyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP |
     TVS_HASBUTTONS | TVS_SHOWSELALWAYS | TVS_LINESATROOT | TVS_CHECKBOXES;
dwStyle |= ( m_bUseFriendryTree ? TVS_SINGLEEXPAND | TVS_TRACKSELECT : TVS_HASLINES );


CTreeCtrl::SetImageList
CImageList* SetImageList(
   CImageList * pImageList,
   int nImageListType
);
TVSIL_NORMAL   Sets the normal image list, which contains the selected and nonselected images for the tree view item.
TVSIL_STATE   Sets the state image list, which contains the images for tree view items that are in a user-defined state.
CTreeCtrl::GetImageList
CImageList* GetImageList(
   UINT nImageList
) const;
BOOL SetItemState(
   HTREEITEM hItem,
   UINT nState,
   UINT nStateMask   //Specifies which states are to be changed.

);

CTreeCtrl::SetItemState


const ShellItem* pShellItem = reinterpret_cast< ShellItem* >( GetItemData( m_hLastSelectedTreeItem ) );
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值