C++ TreeView

C++ TreeView

orion201324
Explorer Explorer
744 Views
4 Replies
Message 1 of 5

C++ TreeView

orion201324
Explorer
Explorer

Hi everyone,

I'm using C++ to build a tool which should make use of a Tree View, and that allow users to drag and drop nodes into it. However, I only see examples in the documents of tools using MAXScript to create a Tree.

Currently, I can add a TreeView into the resource file using:

CONTROL "", IDC_MY_TREE "SysTreeView32", WS_BORDER | WS_HSCROLL | WS_TABSTOP, 50, 110, 60, 50

Which will make it appear in the UI. Unfortunately I don't know what parameter types to use to register this in a Parameter Block, or enable drag-and-drop.

Is this method possible? Or is there a better alternative for including hierarchical lists in the dialog.

Thanks

0 Likes
Accepted solutions (1)
745 Views
4 Replies
Replies (4)
Message 2 of 5

klvnk
Collaborator
Collaborator
Accepted solution

think you're out of luck, there's no parameter ui type to tie listview to parameterblock

 

Parameter UI Control Types

 

you'll have to write your own code to link it with/sync it with a TYPE_INODE_TAB 

0 Likes
Message 3 of 5

orion201324
Explorer
Explorer

@klvnk that's a pity! Thanks for the help.

0 Likes
Message 4 of 5

klvnk
Collaborator
Collaborator

also I think you'll have difficulty dragging Nodes off the viewport or the scene explorer without max changing selection, not saying it's not possible but I don't think it's trivial/easy.... stuff like this is usual handle with a

 

PickModeCallback, PickNodeCallback  combo and or an HitByNameDlgCallback

 

Message 5 of 5

istan
Advisor
Advisor

There's also dotNet but... well.. actually this was the point, where I switched to C++ and QT..