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. Event handler for double click in CListCtrl

Event handler for double click in CListCtrl

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

    Hello All, I am using a CListCtrl created in a dialog window. This CListCtrl displays thumbnail images. I want a notification when a user double clicks an image in list. The OnLButtonDblClk function only works when user double clicks in the dialog window. It does not catch the event when a user double clicks in the list control window, probably because the dialog treats list control as a separate window. Can anyone please let me know how do I write a event handler to to catch the event when an image in CListCtrl is double clicked. Thanks in advance for your reply. Abhijit Deshmukh

    E S 2 Replies Last reply
    0
    • A asdeshmukh

      Hello All, I am using a CListCtrl created in a dialog window. This CListCtrl displays thumbnail images. I want a notification when a user double clicks an image in list. The OnLButtonDblClk function only works when user double clicks in the dialog window. It does not catch the event when a user double clicks in the list control window, probably because the dialog treats list control as a separate window. Can anyone please let me know how do I write a event handler to to catch the event when an image in CListCtrl is double clicked. Thanks in advance for your reply. Abhijit Deshmukh

      E Offline
      E Offline
      EXTEIDE
      wrote on last edited by
      #2

      Override your own list control like CMyListCtrl from CListCtrl. Enjoy:rose:

      Anderson Sheen Reduce a time to develop your environment. It's a free! http://www.exteide.com

      1 Reply Last reply
      0
      • A asdeshmukh

        Hello All, I am using a CListCtrl created in a dialog window. This CListCtrl displays thumbnail images. I want a notification when a user double clicks an image in list. The OnLButtonDblClk function only works when user double clicks in the dialog window. It does not catch the event when a user double clicks in the list control window, probably because the dialog treats list control as a separate window. Can anyone please let me know how do I write a event handler to to catch the event when an image in CListCtrl is double clicked. Thanks in advance for your reply. Abhijit Deshmukh

        S Offline
        S Offline
        Shog9 0
        wrote on last edited by
        #3

        The listview control sends a NM_DBLCLK notification to its parent window when the user double-clicks in it. You can listen for this.

        ---- Scripts i've known... CPhog 0.9.9 - make CP better. Forum Bookmark 0.2.1 - bookmark forum posts on Pensieve Print forum 0.1.1 - printer-friendly forums

        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