TVS_TRACKSELECT for treeview?

  • Thread starter =?ISO-8859-1?Q?Roland_M=FCller?=
  • Start date
?

=?ISO-8859-1?Q?Roland_M=FCller?=

Hi NG,

i want for my drag and drop treeview control the style TVS_TRACKSELECT
(for example the IE 6 uses this; go to favorites sidebar and drag/drop a
bookmark...): the bold horizontal line between the nodes...

I tried this:

--------------------------------------------------------------------------------
private int TVS_TRACKSELECT = 0x200;
private int GWL_STYLE=-16;
[DllImport("user32.dll")] private extern static IntPtr
SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
[DllImport("user32.dll")] private extern static int
GetWindowLong(IntPtr hWnd, int nIndex);

int style = GetWindowLong(m_SchemaTreeView.Handle,GWL_STYLE);
SetWindowLong(m_SchemaTreeView.Handle,GWL_STYLE, style |
TVS_TRACKSELECT);
--------------------------------------------------------------------------------

But it does not appear in my treeview. How can I get this style the
right way?


Thanks, Roland!
 
A

Atul

The code for enabling TrackSelect is OK, but I don't think enabling this
style causes the treeview to show the dragdrop insertion bold horizontal
line. You have to draw that yourself.

-Atul, Sky Software http://www.ssware.com
Shell MegaPack For ActiveX & .Net - Windows Explorer Like Shell UI Controls
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top