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. handling a listbox's LButtonUp in parent-dialog

handling a listbox's LButtonUp in parent-dialog

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
4 Posts 3 Posters 1 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.
  • L Offline
    L Offline
    Led 0
    wrote on last edited by
    #1

    Should not be too hard but I'm probably just very stupid :) I have a dialog with a listbox. I want to know when the mouse-button is released in the listbox's client-area. I DON'T want to create a special class for the listbox. So how can my dialog get an OnLButtonUp from the listbox..? Any help would be greatly appreciated! :)

    V P 2 Replies Last reply
    0
    • L Led 0

      Should not be too hard but I'm probably just very stupid :) I have a dialog with a listbox. I want to know when the mouse-button is released in the listbox's client-area. I DON'T want to create a special class for the listbox. So how can my dialog get an OnLButtonUp from the listbox..? Any help would be greatly appreciated! :)

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      One solution is to add the appropriate mouse message handler and determine whether the mouse is over the client area via PtInRect(). Kuphryn

      L 1 Reply Last reply
      0
      • L Led 0

        Should not be too hard but I'm probably just very stupid :) I have a dialog with a listbox. I want to know when the mouse-button is released in the listbox's client-area. I DON'T want to create a special class for the listbox. So how can my dialog get an OnLButtonUp from the listbox..? Any help would be greatly appreciated! :)

        P Offline
        P Offline
        pibos
        wrote on last edited by
        #3

        your dialog is receiving only notification messages from it's childs WM_NOTIFY message and notification code. You could simulate this behaviour by subclasing the listbox and send a message to it's parent (dialog) use CHookWnd class By PJ Naughter http://www.codeproject.com/cpp/chookwnd.asp

        1 Reply Last reply
        0
        • V valikac

          One solution is to add the appropriate mouse message handler and determine whether the mouse is over the client area via PtInRect(). Kuphryn

          L Offline
          L Offline
          Led 0
          wrote on last edited by
          #4

          Well, that was my first try too. But when the mouse is over the listbox's client-area the dialog doesn't receive the OnLButtonUp-message...

          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