I am attempting to update a tree control with checkmarks so that on initialization all tree items are checked.
I am trying a loop in the OnInitDialog() looking something like this:
for( k=0;k<j;k++)
m_Property.SetCheck(hTreeItem[k]);
if(m_Property.ItemHasChildren(hTreeItem[k])){
HTREEITEM hNextItem;
HTREEITEM hChildItem = m_Property.GetChildItem(hTreeItem[k]);
while (hChildItem != NULL){
hNextItem = m_Property.GetNextItem(hChildItem, TVGN_NEXT);
m_Property.SetCheck(hChildItem);
hChildItem = hNextItem;
}
}
}
Unfortunately it doesn't work.....anyone know why