473,385 Members | 1,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Changing places on items in treeview!

Hello!

During drag&drop of items in a CTreeView - how do I replace items on the
tree which I drag an item on top of.

We can use the example of WindowsXP. In the start menu -> Programs ->
Startup. I can change places on items in that folder. How can I do that in
the treeview? Anyone know?

--
- Lars

Nov 17 '05 #1
1 1404
Use TreeView_SelectItem for the drop source and TreeView_SelectDropTarget
for the drop target. You may also want the "track select" style turned on
and use TreeView_CreateDragImage for the source item.

Use TreeView_GetItem, then TreeView_DeleteItem and TreeView_InsertItem to
move it. (Using TreeView_GetItem with all the flags set should get you as
much information as you need to re-insert the item without losing
information.)

This still won't quite be like the menus (it will select an item rather than
show an insertion point between items) but it's probably as near as you are
going to get with a tree.

See "CTreeCtrl, drag and drop operations" in MSDN for more information.

"Lars Grøtteland" <lars@nospam> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hello!

During drag&drop of items in a CTreeView - how do I replace items on the
tree which I drag an item on top of.

We can use the example of WindowsXP. In the start menu -> Programs ->
Startup. I can change places on items in that folder. How can I do that in
the treeview? Anyone know?

--
- Lars

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: KK | last post by:
Hi All... For my purpose, I need to handle listbox selection changed event.I must be notified before changing occurs and after.After I can handle using SelectedIndexChanged event.Is there anyway...
10
by: tmaster | last post by:
When I try to dynamically add a second sub menu item to this ContextMenu item, I get an error 'Specified argument was out of the range of valid values'. Private Sub mnuTopics_Show_Select(ByVal...
7
by: Progalex | last post by:
Hi everybody! I have a listview and a treeview in a form . With an OpenDialog I let the user select multiple files and then these files are added to the listview with the complete pathname,...
3
by: Ray Booysen | last post by:
Hi all I have a treeview bound to a sitemap. Once the user is logged in, I'm wanting the menu to expand to include additional items from a database while retaining the items in the sitemap. Is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.