Inserare icons pe CTreeCtrl

Intrebari legate de programarea cu biblioteci precum MFC, ATL, WTL si GDI+.
Post Reply
mesajflaviu
Membru++
Membru++
Posts: 684
Joined: 10 Sep 2008, 21:40
Judet: Cluj

Inserare icons pe CTreeCtrl

Post by mesajflaviu » 20 Nov 2014, 13:48

Este vreo posibilitate de a insera iconite intr-un CTreeCtrl, dar numai pe unele item-uri doar ?
Daca da, cum ?



mesajflaviu
Membru++
Membru++
Posts: 684
Joined: 10 Sep 2008, 21:40
Judet: Cluj

Re: Inserare icons pe CTreeCtrl

Post by mesajflaviu » 24 Nov 2014, 14:26

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 ...
Attachments
TestTree.zip
(98.87 KiB) Downloaded 154 times

Post Reply