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. CTreeCtrl, CDockingPane, and mouse events

CTreeCtrl, CDockingPane, and mouse events

Scheduled Pinned Locked Moved C / C++ / MFC
phpcssdatabasecombeta-testing
3 Posts 2 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.
  • R Offline
    R Offline
    Rob Bryce
    wrote on last edited by
    #1

    Hi All, many thanks up-front to anyone who can help here. I have a client that wants me to migrate a CTreeView-derived class to one which works like a docking pane. The class is so large now that it's not feasible to rewrite everything. So...I still have the underlying CTreeCtrl-derived class (more/less untouched), which is a child of a class derived from CDockablePane (migrated from the CView class). I've also derived from CMultiPaneFrameWnd (used when the pane is floating) to try to trap events. I've got it working about 80%. I need help/direction with the other 20%. I've got the CDockablePane derived class working with bulk of the MESSAGE_MAP events (menu handlers, ON_UPDATE_COMMAND_UI, etc.) working correctly. The events associated with the mouse are giving me grief. I see 3 standard modes for the dockable pane: floating, docked, and tabbed. And they all behave differently w/r to mouse events - and depending on the docking mode. For example: * If the docking mode is DT_SMART *and* the pane is NOT floating, then drag&drop and double-clicking work correctly. * If the docking mode isn't DT_SMART, then drag&drop usually tries to drag the complete docking pane instead of working correctly (regardless of floating, docked, tabbed). * When the pane is floating, I can't trap WM_LBUTTONDBLCLK (unless you click on the lines and little [+] boxes...) or the respective notify or reflect messages - even Spy++ doesn't record them. I just don't see any left button double-click events - at all! Google searches show that I'm not the only one with these types of issues. I've read and tried pretty well every suggestion...and I still have these issues. I'm now concerned about bugs or assumptions in the framework after reading this: http://connect.microsoft.com/VisualStudio/feedback/details/641096/cdockablepane-calls-releasecapture[^] This link: http://www.johnbyrd.org/blog/index.php?itemid=405[^] helped a lot but didn't solve all issues either. I can also replicate these issues (unable to trap double-clicking when floating) in the VisualStudioDemo feature pack demo. Any sug

    E R 2 Replies Last reply
    0
    • R Rob Bryce

      Hi All, many thanks up-front to anyone who can help here. I have a client that wants me to migrate a CTreeView-derived class to one which works like a docking pane. The class is so large now that it's not feasible to rewrite everything. So...I still have the underlying CTreeCtrl-derived class (more/less untouched), which is a child of a class derived from CDockablePane (migrated from the CView class). I've also derived from CMultiPaneFrameWnd (used when the pane is floating) to try to trap events. I've got it working about 80%. I need help/direction with the other 20%. I've got the CDockablePane derived class working with bulk of the MESSAGE_MAP events (menu handlers, ON_UPDATE_COMMAND_UI, etc.) working correctly. The events associated with the mouse are giving me grief. I see 3 standard modes for the dockable pane: floating, docked, and tabbed. And they all behave differently w/r to mouse events - and depending on the docking mode. For example: * If the docking mode is DT_SMART *and* the pane is NOT floating, then drag&drop and double-clicking work correctly. * If the docking mode isn't DT_SMART, then drag&drop usually tries to drag the complete docking pane instead of working correctly (regardless of floating, docked, tabbed). * When the pane is floating, I can't trap WM_LBUTTONDBLCLK (unless you click on the lines and little [+] boxes...) or the respective notify or reflect messages - even Spy++ doesn't record them. I just don't see any left button double-click events - at all! Google searches show that I'm not the only one with these types of issues. I've read and tried pretty well every suggestion...and I still have these issues. I'm now concerned about bugs or assumptions in the framework after reading this: http://connect.microsoft.com/VisualStudio/feedback/details/641096/cdockablepane-calls-releasecapture[^] This link: http://www.johnbyrd.org/blog/index.php?itemid=405[^] helped a lot but didn't solve all issues either. I can also replicate these issues (unable to trap double-clicking when floating) in the VisualStudioDemo feature pack demo. Any sug

      E Offline
      E Offline
      Eugen Podsypalnikov
      wrote on last edited by
      #2

      Hm... My trees can register the double clicks in their floating panes :) For example, it is possible to extend a node by the double click at its item... The model in my case is (from outside): CXDocablePane->CXFrameWndEx->CXTreeCtrl :)

      They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)

      1 Reply Last reply
      0
      • R Rob Bryce

        Hi All, many thanks up-front to anyone who can help here. I have a client that wants me to migrate a CTreeView-derived class to one which works like a docking pane. The class is so large now that it's not feasible to rewrite everything. So...I still have the underlying CTreeCtrl-derived class (more/less untouched), which is a child of a class derived from CDockablePane (migrated from the CView class). I've also derived from CMultiPaneFrameWnd (used when the pane is floating) to try to trap events. I've got it working about 80%. I need help/direction with the other 20%. I've got the CDockablePane derived class working with bulk of the MESSAGE_MAP events (menu handlers, ON_UPDATE_COMMAND_UI, etc.) working correctly. The events associated with the mouse are giving me grief. I see 3 standard modes for the dockable pane: floating, docked, and tabbed. And they all behave differently w/r to mouse events - and depending on the docking mode. For example: * If the docking mode is DT_SMART *and* the pane is NOT floating, then drag&drop and double-clicking work correctly. * If the docking mode isn't DT_SMART, then drag&drop usually tries to drag the complete docking pane instead of working correctly (regardless of floating, docked, tabbed). * When the pane is floating, I can't trap WM_LBUTTONDBLCLK (unless you click on the lines and little [+] boxes...) or the respective notify or reflect messages - even Spy++ doesn't record them. I just don't see any left button double-click events - at all! Google searches show that I'm not the only one with these types of issues. I've read and tried pretty well every suggestion...and I still have these issues. I'm now concerned about bugs or assumptions in the framework after reading this: http://connect.microsoft.com/VisualStudio/feedback/details/641096/cdockablepane-calls-releasecapture[^] This link: http://www.johnbyrd.org/blog/index.php?itemid=405[^] helped a lot but didn't solve all issues either. I can also replicate these issues (unable to trap double-clicking when floating) in the VisualStudioDemo feature pack demo. Any sug

        R Offline
        R Offline
        Rob Bryce
        wrote on last edited by
        #3

        Found it! There is an intermediate class which inherited from CTreeCtrl. It was originally set up to support a CView, and forwarded the LButtonDown event to its parent. Well, now that the parent is a dockable pane, the behaviour changed a lot! Removing that handler got lots of stuff working!

        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