有关TREE CONTROL 的 Expand!

microsy 2004-04-30 10:55:02
BOOL Expand( HTREEITEM hItem, UINT nCode );

nCode

A flag indicating the type of action to be taken. This flag can have one of the following values:

TVE_COLLAPSERESET Collapses the list and removes the child items.

请问有人用过该标志吗?有成功删除子项目的吗,我试了几次,均告失败?不知是何原因?
...全文
115 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
microsy 2004-05-06
  • 打赏
  • 举报
回复
多谢提醒!
结贴!
蒋晟 2004-05-03
  • 打赏
  • 举报
回复
TVE_COLLAPSERESET Collapses the list and removes the child items. The TVIS_EXPANDEDONCE state flag is reset. This flag must be used with the TVE_COLLAPSE flag
说了要和TVE_COLLAPSE一起用了
microsy 2004-05-02
  • 打赏
  • 举报
回复
Expand函数不仅仅可以展开tree,根据不同的flag它还可以实现删除子项!
以上的注释全部来自MSDN,当然也可以有其它可以替代的方法,但是我想知道既然提供了该函数,为什么无法使用,每次均返回0?
zhangnanonnet 2004-05-01
  • 打赏
  • 举报
回复
Expand是展开TREE用的吧,和删除子项有什么关系

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧