主题:关于CTreeCtrl::InsertItem()的参数问题
HTREEITEM InsertItem(
LPCTSTR lpszItem,
int nImage,
int nSelectedImage,
HTREEITEM hParent = TVI_ROOT,
HTREEITEM hInsertAfter = TVI_LAST );
这个函数的第二个和第三个参数是什么东西?
nImage
Specifies the index of the image for the item in the image list of the tree view control.
nSelectedImage
Specifies the index of the item’s selected image in the image list of the tree view control.
上面是MSDN的解释,我没看懂
有段例子中的代码是这样写的:
m_tree.InsertItem("李四",3,3,userItem[0]);
我把3和3改成任意数字好象都行
希望有人帮我解释下这个两个参数是干嘛的
LPCTSTR lpszItem,
int nImage,
int nSelectedImage,
HTREEITEM hParent = TVI_ROOT,
HTREEITEM hInsertAfter = TVI_LAST );
这个函数的第二个和第三个参数是什么东西?
nImage
Specifies the index of the image for the item in the image list of the tree view control.
nSelectedImage
Specifies the index of the item’s selected image in the image list of the tree view control.
上面是MSDN的解释,我没看懂
有段例子中的代码是这样写的:
m_tree.InsertItem("李四",3,3,userItem[0]);
我把3和3改成任意数字好象都行
希望有人帮我解释下这个两个参数是干嘛的