I am working with Creo 8. I would like to implement a dialog with tree view in it. The tree has 3 columns. I have spent few of hours trying to understand API to create and populate tree. But not able to figure how to do it. With C++ I wasn't even able to add node to tree. With C I could add node but not able to figure how to add column. If anyone has tried this already I would appreciate the help in from of sample code.
FWIW -
For C I have following working code to add node -
auto status = ProUITreeColumnCreate("dialog_material_assign_assembly",
"MatAssignTree", nullptr, L"Test", 10,
PROUITREECOL_LEFT);
status = ProUITreeNodeInsert("dialog_material_assign_assembly",
"MatAssignTree", "root", L"Root Node", nullptr,
"node_type", nullptr);
With C++ I tried I this but its not working -
uifcTree_ptr ptrMatAssignTree =
uifcTreeFind("dialog_material_assign_assembly", "MatAssignTree");
auto ptrItem = uifcTreeItemDefine("root_item");
ptrItem->SetText("Root Item");
auto ptrPos = uifcItemPositionData::Create();
ptrPos->SetIndex(0);
ptrPos->SetIsBefore(false);
ptrMatAssignTree->InsertItem(ptrItem, ptrPos);