TVS_TRACKSELECT for treeview?

  • Thread starter Thread starter =?ISO-8859-1?Q?Roland_M=FCller?=
  • Start date 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!
 
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
 
Back
Top