CTreeCtrl的用法

Class Member

CTreeCtrl::SetImageList


CImageList* SetImageList( CImageList * pImageList, intnImageListType );

Return Value

Pointer to the previous image list, if any; otherwise NULL.

Parameters

pImageList

Pointer to the image list to assign. If pImageList is NULL, all images are removed from the tree view control.

nImageListType

Type of image list to set. The image list can be one of the following values:

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

Remarks

Call this function to set the normal or state image list for a tree view control and redraw the control using the new images.

CTreeCtrl::GetNextItem

HTREEITEM GetNextItem( HTREEITEM hItem, UINT nCode );

Return Value

The handle of the next item if successful; otherwise NULL.

Parameters

hItem

Handle of a tree item.

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. The hItem parameter must be NULL.

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

  • TVGN_FIRSTVISIBLE   Retrieves the first visible item.

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

Remarks

Call this function to retrieve the tree view item that has the specified relationship, indicated by the nCode parameter, to hItem.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值