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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Right Click in TreeCtrl

Right Click in TreeCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
question
8 Posts 6 Posters 0 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.
  • A Offline
    A Offline
    Angel Kid
    wrote on last edited by
    #1

    Hi, I right click in treectrl, but it seems to that I can't use CTreeCtrl::GetSelectedItem () to get my selected node,I wanna why I can't use this function as I use left click? :confused Thanks YES, I am here.

    U A J 3 Replies Last reply
    0
    • A Angel Kid

      Hi, I right click in treectrl, but it seems to that I can't use CTreeCtrl::GetSelectedItem () to get my selected node,I wanna why I can't use this function as I use left click? :confused Thanks YES, I am here.

      U Offline
      U Offline
      User 423850
      wrote on last edited by
      #2

      ur question is bit confusing!!!!!!!!! Thanx TAKE CARE

      1 Reply Last reply
      0
      • A Angel Kid

        Hi, I right click in treectrl, but it seems to that I can't use CTreeCtrl::GetSelectedItem () to get my selected node,I wanna why I can't use this function as I use left click? :confused Thanks YES, I am here.

        A Offline
        A Offline
        Arjan Schouten
        wrote on last edited by
        #3

        You can use this to get the selected Item.

        void C3StateTree::OnRButtonDown(UINT nFlags, CPoint point)
        {
        UINT uFlags = 0;

        HTREEITEM hItem = HitTest(point, &uFlags);
        

        Arjan.

        1 Reply Last reply
        0
        • A Angel Kid

          Hi, I right click in treectrl, but it seems to that I can't use CTreeCtrl::GetSelectedItem () to get my selected node,I wanna why I can't use this function as I use left click? :confused Thanks YES, I am here.

          J Offline
          J Offline
          jhwurmbach
          wrote on last edited by
          #4

          Maybe knowledgebase article Q222905 can help you? It describes how to get the item that was right-clicked. Angel Kid wrote: YES, I am here. No, you are not! *I* am here, but you are there!:laugh::laugh:;P


          Who is 'General Failure'? And why is he reading my harddisk?!?

          R A 2 Replies Last reply
          0
          • J jhwurmbach

            Maybe knowledgebase article Q222905 can help you? It describes how to get the item that was right-clicked. Angel Kid wrote: YES, I am here. No, you are not! *I* am here, but you are there!:laugh::laugh:;P


            Who is 'General Failure'? And why is he reading my harddisk?!?

            R Offline
            R Offline
            Ryan Binns
            wrote on last edited by
            #5

            jhwurmbach wrote: Angel Kid wrote: YES, I am here. No, you are not! *I* am here, but you are there! :rolleyes: *shakes head in disbelief* ;P

            Ryan

            "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

            1 Reply Last reply
            0
            • J jhwurmbach

              Maybe knowledgebase article Q222905 can help you? It describes how to get the item that was right-clicked. Angel Kid wrote: YES, I am here. No, you are not! *I* am here, but you are there!:laugh::laugh:;P


              Who is 'General Failure'? And why is he reading my harddisk?!?

              A Offline
              A Offline
              Angel Kid
              wrote on last edited by
              #6

              I found in the MSDN ,but can't found the Q222905???????? YES, I am here.

              J 1 Reply Last reply
              0
              • A Angel Kid

                I found in the MSDN ,but can't found the Q222905???????? YES, I am here.

                J Offline
                J Offline
                jhwurmbach
                wrote on last edited by
                #7

                On this[^] page, on the top right, enter Q222905 into the edit field and click the radiobutton for 'Knowledgebase' below. Now click the button labled 'Go'. You will get exactly one result link.


                Who is 'General Failure'? And why is he reading my harddisk?!?

                PJ ArendsP 1 Reply Last reply
                0
                • J jhwurmbach

                  On this[^] page, on the top right, enter Q222905 into the edit field and click the radiobutton for 'Knowledgebase' below. Now click the button labled 'Go'. You will get exactly one result link.


                  Who is 'General Failure'? And why is he reading my harddisk?!?

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

                  I use this tool by Mike Dunn http://www.codeproject.com/tips/kblaunch.asp[^]


                  [

                  ](http://www.canucks.com)Sonork 100.11743 Chicken Little "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 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