Page 1 of 1

Inserare icons pe CTreeCtrl

Posted: 20 Nov 2014, 13:48
by mesajflaviu
Este vreo posibilitate de a insera iconite intr-un CTreeCtrl, dar numai pe unele item-uri doar ?
Daca da, cum ?

Re: Inserare icons pe CTreeCtrl

Posted: 24 Nov 2014, 14:26
by mesajflaviu
Am incercat asa:
Image
dar e biberon fals ...

Code: Select all

	m_Tree.RedrawWindow();
	HTREEITEM hItem = m_Tree.InsertItem(_T("Root"), 0, 0);
	m_Tree.InsertItem(_T("John"), 1, 1, hItem);
	HTREEITEM hItem2 = hItem = m_Tree.InsertItem(_T("Secada"), 1, 1, hItem);
	m_Tree.InsertItem(_T("Age"), 0, 0, hItem);
	m_Tree.InsertItem(_T("Skills"), 0, 0, hItem);
	m_Tree.SetItemState(hItem2, INDEXTOSTATEIMAGEMASK(0), TVIS_STATEIMAGEMASK);
atasez si aplicatia de test ...