Код: Выделить всё
tree = NativeMethods.FindWindowEx(leftChild1, IntPtr.Zero, "SysTreeView32", null);
IntPtr hItem = NativeMethods.SendMessage(tree, (uint)NativeMethods.TVM.TVM_GETNEXTITEM, (int)NativeMethods.TVGN.TVGN_ROOT, IntPtr.Zero);
< /code>
Теперь проблема в том, как сделать щелчок по элементу. < /p>
NativeMethods.SendMessage(tree, (uint)NativeMethods.TVM.TVM_SELECTITEM, (int)NativeMethods.TVGN.TVGN_CARET, item);
< /code>
Выберите элемент только выберите его, но содержимое не отображается. < /p>
NativeMethods.SendMessage(item, NativeMethods.BM_CLICK, 0, IntPtr.Zero);
Окно не вверху, поэтому я не могу использовать mouse_event .
Подробнее здесь: https://stackoverflow.com/questions/797 ... treeview32