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. ComboBox and mousebutton?

ComboBox and mousebutton?

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

    How can i catch the LBUTTONUP in the dropdownpart of a Combobox? What i would like to do is to know which item that has been clicked in the list. And the only thing that i can think of is catching the mousebutton and caluculate which item the user has clicked. Or is there another way?

    M G 2 Replies Last reply
    0
    • S Stefan Dahlin

      How can i catch the LBUTTONUP in the dropdownpart of a Combobox? What i would like to do is to know which item that has been clicked in the list. And the only thing that i can think of is catching the mousebutton and caluculate which item the user has clicked. Or is there another way?

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      The combo box sends CBN_SELENDOK and CBN_SELENDCANCEL messages when the drop list is closed. When you receive CBN_SELENDOK, use CB_GETCURSEL to get the selected item. --Mike-- Looks like I picked the wrong week to stop sniffing glue. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm

      S 1 Reply Last reply
      0
      • M Michael Dunn

        The combo box sends CBN_SELENDOK and CBN_SELENDCANCEL messages when the drop list is closed. When you receive CBN_SELENDOK, use CB_GETCURSEL to get the selected item. --Mike-- Looks like I picked the wrong week to stop sniffing glue. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm

        S Offline
        S Offline
        Stefan Dahlin
        wrote on last edited by
        #3

        Thanks for the reply. Unfortunately that doesn't work for me. Maybe i should have said that i'm using the CCheckComboBox that can be found on this site. And when a item is selected the list doesn't close. The user can check/uncheck mutiple items before the list is closed. I could go through all the items when the list is closed and look for what the user has selected. But to catch when the mousebutton is pressed on a item would be a better solution. If it is possible.

        1 Reply Last reply
        0
        • S Stefan Dahlin

          How can i catch the LBUTTONUP in the dropdownpart of a Combobox? What i would like to do is to know which item that has been clicked in the list. And the only thing that i can think of is catching the mousebutton and caluculate which item the user has clicked. Or is there another way?

          G Offline
          G Offline
          Gary R Wheeler
          wrote on last edited by
          #4

          You need to handle the CBN_SELCHANGE notification from the control.


          Software Zen: delete this;

          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