Example #1
0
//*************************************************************************************
void CFavoritesManager::FillTree (CTreeCtrl& wndTree)
{
	ASSERT (wndTree.GetSafeHwnd () != NULL);

	wndTree.DeleteAllItems ();
	wndTree.SetImageList (CImageList::FromHandle (m_himSystem), TVSIL_NORMAL);
	m_Root.FillTree (wndTree, NULL);
}
Example #2
0
// @pymethod object|PyCTreeCtrl|DeleteAllItems|Deletes all items in the control
PyObject *PyCTreeCtrl_DeleteAllItems( PyObject *self, PyObject *args )
{
	if (!PyArg_ParseTuple( args, ":DeleteAllItems"))
		return NULL;
	CTreeCtrl *pList = GetTreeCtrl(self);
	if (!pList) return NULL;
	GUI_BGN_SAVE;
	BOOL ok = pList->DeleteAllItems();
	GUI_END_SAVE;
	if (!ok)
		RETURN_ERR("DeleteAllItems failed");
	RETURN_NONE;
}