I created a simple MFC application that is Dialog based. I dragged a TreeControl onto the dialog resource editor. I gave it a member variable name. I also have a button with an event handler function. When I click the button, I want to populate the tree.
The problem is, only the root element is being added, nothing else. Any ideas?
`
void CCrysisDialogDecryptorDlg::OnBnClickedButton1()
{
HTREEITEM hItem, hCar;
hItem = m_directoryListing.InsertItem(L"C:\\",TVI_ROOT);
hCar = m_directoryListing.InsertItem(L"Child",hItem);
m_directoryListing.InsertItem(L"Grandchild",hCar);
m_directoryListing.InsertItem(L"Grandchild",hCar);
m_directoryListing.InsertItem(L"Grandchild",hCar);
}
`