VC++_Tree控件

请问VC++_Tree控件:如何并操作选打对勾的叶子结点?谢谢!... 请问VC++_Tree控件:如何并操作选打对勾的叶子结点?谢谢! 展开
 我来答
专属sss丶276
2014-07-13 · TA获得超过183个赞
知道答主
回答量:181
采纳率:0%
帮助的人:130万
展开全部
参考msdn CTreeCtrl::SetCheck BOOL SetCheck( HTREEITEM hItem, BOOL fCheck = TRUE ); Return Value Nonzero if successful; otherwise 0. Parameters hItem The HTREEITEM to receive the check state change. fCheck Indicates whether the tree control item is to be checked or unchecked. By default, SetCheck sets the item to be checked. Remarks Call this member function to set the check state for a tree control item. When the tree control item is checked (fCheck set to TRUE), the item appears with an adjacent checkmark. Example // The pointer to my tree control. extern CTreeCtrl* pmyTreeCtrl; UINT i, uCount = pmyTreeCtrl->GetVisibleCount(); HTREEITEM hItem = pmyTreeCtrl->GetFirstVisibleItem(); // Toggle the check state of all the visible items. for (i=0;i < uCount;i++) { ASSERT(hItem != NULL); pmyTreeCtrl->SetCheck(hItem, !pmyTreeCtrl->GetCheck(hItem)); hItem = pmyTreeCtrl->GetNextVisibleItem(hItem); }
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式