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. Capture LButtonUp in a CListBox ??

Capture LButtonUp in a CListBox ??

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

    Hi, I have at CListBox in a dialog box but I'm not able to capture mouse click (ex. LButtonUp() ) ? Context-menu works fine on the mouse right click. Can anybody help me ?

    V 1 Reply Last reply
    0
    • J jwd

      Hi, I have at CListBox in a dialog box but I'm not able to capture mouse click (ex. LButtonUp() ) ? Context-menu works fine on the mouse right click. Can anybody help me ?

      V Offline
      V Offline
      Vladimir Georgiev
      wrote on last edited by
      #2

      If the List box does not provide a way handle a message - WM_LBUTTONUP message in your case, you will have to use subclassing (write your own message procedure) for this control. See the articles on subclassing here at CP, or at msdn.microsoft.com... "Needless redundancy is the hobgoblin of software engineering." - Peter Darnell

      D 1 Reply Last reply
      0
      • V Vladimir Georgiev

        If the List box does not provide a way handle a message - WM_LBUTTONUP message in your case, you will have to use subclassing (write your own message procedure) for this control. See the articles on subclassing here at CP, or at msdn.microsoft.com... "Needless redundancy is the hobgoblin of software engineering." - Peter Darnell

        D Offline
        D Offline
        Diddy
        wrote on last edited by
        #3

        Have MFC subclass it for you with a DDX_Control statment, if its based on a resource: 1. Derive a class from CListBox 2. Double click on the list box in the resource editor with CTRL held down 3. Select control 4. Select your new derived list box class 5. Give it a name Then use class wizard to add a handler to your LB for WM_LBUTTONUP to your new LB

        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