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::OnLButtonUp doesn't get called

CTreeCtrl::OnLButtonUp doesn't get called

Scheduled Pinned Locked Moved C / C++ / MFC
4 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.
  • A Offline
    A Offline
    Arjan Schouten
    wrote on last edited by
    #1

    Hi, I derived a class from CTreeCtrl and added a handler for OnLButtonUp. But clicking on an Item never gets it fired. After some debugging I found that it only gets called if you don't click on an Item, but within the client area or if you doubleclick an item. Couldn't find anything in the MSDN. van Padoea.

    T 1 Reply Last reply
    0
    • A Arjan Schouten

      Hi, I derived a class from CTreeCtrl and added a handler for OnLButtonUp. But clicking on an Item never gets it fired. After some debugging I found that it only gets called if you don't click on an Item, but within the client area or if you doubleclick an item. Couldn't find anything in the MSDN. van Padoea.

      T Offline
      T Offline
      Tibor Blazko
      wrote on last edited by
      #2

      are you transfering buttondown to base class? t!

      A 1 Reply Last reply
      0
      • T Tibor Blazko

        are you transfering buttondown to base class? t!

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

        I do but that doesn't matter because it won't come there anyway! void CSelectionTree::OnLButtonUp(UINT nFlags, CPoint point) { UINT uFlags = 0; <-- will not reach this! HTREEITEM hti = HitTest(point, &uFlags); if( uFlags & TVHT_ONITEMSTATEICON ) { if(GetCheck(hti)) SetItemImage(hti, 2, 2); else SetItemImage(hti, 0, 0); } CTreeCtrl::OnLButtonUp(nFlags, point); }

        T 1 Reply Last reply
        0
        • A Arjan Schouten

          I do but that doesn't matter because it won't come there anyway! void CSelectionTree::OnLButtonUp(UINT nFlags, CPoint point) { UINT uFlags = 0; <-- will not reach this! HTREEITEM hti = HitTest(point, &uFlags); if( uFlags & TVHT_ONITEMSTATEICON ) { if(GetCheck(hti)) SetItemImage(hti, 2, 2); else SetItemImage(hti, 0, 0); } CTreeCtrl::OnLButtonUp(nFlags, point); }

          T Offline
          T Offline
          Tibor Blazko
          wrote on last edited by
          #4

          i know you speaking about but i spoke about down message (or maybe any pretranslate, ...) make minimal tree example and it must work t!

          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