Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CTreeCtrl Drop Highlight Node

CTreeCtrl Drop Highlight Node

Scheduled Pinned Locked Moved C / C++ / MFC
c++comdata-structuresquestion
4 Posts 2 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RS Ratheesh
    wrote on last edited by
    #1

    Hi, I am using MFC MDI uses CTreeCtrl,when i drag and drop an item from one tree to the another tree i have three options TVI_LAST,TVI_FIRST and TVI_SORT but in my case i need to drop item where i placed the mouse please see this image http://www.codeproject.com/KB/tree/treeviewadv/treeviewadv2.png[^] like this, for this what i need to do? Thanks in Advance, Ratheesh.

    PJ ArendsP 1 Reply Last reply
    0
    • R RS Ratheesh

      Hi, I am using MFC MDI uses CTreeCtrl,when i drag and drop an item from one tree to the another tree i have three options TVI_LAST,TVI_FIRST and TVI_SORT but in my case i need to drop item where i placed the mouse please see this image http://www.codeproject.com/KB/tree/treeviewadv/treeviewadv2.png[^] like this, for this what i need to do? Thanks in Advance, Ratheesh.

      PJ ArendsP Offline
      PJ ArendsP Offline
      PJ Arends
      wrote on last edited by
      #2

      You can just insert it after the item above where you want to insert it. You are not limited to the TVI_* positions.


      You may be right I may be crazy -- Billy Joel -- Within you lies the power for good - Use it!

      Within you lies the power for good; Use it!

      R 1 Reply Last reply
      0
      • PJ ArendsP PJ Arends

        You can just insert it after the item above where you want to insert it. You are not limited to the TVI_* positions.


        You may be right I may be crazy -- Billy Joel -- Within you lies the power for good - Use it!

        R Offline
        R Offline
        RS Ratheesh
        wrote on last edited by
        #3

        i need to insert item in a selected position eg: if i have tree having one root and five child i need to add new item in the 3rd position but now i can only add it as a first or last item in my child (1st or 6th).

        PJ ArendsP 1 Reply Last reply
        0
        • R RS Ratheesh

          i need to insert item in a selected position eg: if i have tree having one root and five child i need to add new item in the 3rd position but now i can only add it as a first or last item in my child (1st or 6th).

          PJ ArendsP Offline
          PJ ArendsP Offline
          PJ Arends
          wrote on last edited by
          #4

          Get the HTREEITEM handle of the second item, and use it as the hInsertAfter parameter.


          You may be right I may be crazy -- Billy Joel -- Within you lies the power for good - Use it!

          Within you lies the power for good; Use it!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups