I'm having trouble getting the selected text of a treeview control using the following code:
form = Application.FindForm("form title", SearchMatchMode.MatchExact, "AfxFrameOrView70u", false, 5000);
form.Activate();
control = form.FindControlId(5858);
control.Focus();
TreeView treeview = form.FindTreeView(5858);
string text = treeview.SelectedText;
The text is always null. I have had trouble with this control in the past and have had to walk the tree with keystrokes to populate all of the nodes, but now I can't get any info on it. ItemCounts, selected text and rootItems are all empty.
Any help would be great