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. c++ combo box: how to retrieve value selected in a combo box

c++ combo box: how to retrieve value selected in a combo box

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++tutorial
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.
  • M Offline
    M Offline
    mrby123
    wrote on last edited by
    #1

    Hi Gurus, I used two combo boxes in a dialogue, it seems that the two combo boxes interference each other. When I tried to retrieve the value from one combo box, I got value from the other Combo box selection. The response to SelectChange to other Combo box. How to make sure retrieve the correct value from the Combo box A, prevent from interference from Combo Box B. What is the code to call to retrieve the value from a Comb Box selection? Thank you

    K S 2 Replies Last reply
    0
    • M mrby123

      Hi Gurus, I used two combo boxes in a dialogue, it seems that the two combo boxes interference each other. When I tried to retrieve the value from one combo box, I got value from the other Combo box selection. The response to SelectChange to other Combo box. How to make sure retrieve the correct value from the Combo box A, prevent from interference from Combo Box B. What is the code to call to retrieve the value from a Comb Box selection? Thank you

      K Offline
      K Offline
      KingsGambit
      wrote on last edited by
      #2

      According to MSDN, CBN_SELCHANGE gives combo box ID in wParam. I think you can use this id to distinguish between combo boxes.

      1 Reply Last reply
      0
      • M mrby123

        Hi Gurus, I used two combo boxes in a dialogue, it seems that the two combo boxes interference each other. When I tried to retrieve the value from one combo box, I got value from the other Combo box selection. The response to SelectChange to other Combo box. How to make sure retrieve the correct value from the Combo box A, prevent from interference from Combo Box B. What is the code to call to retrieve the value from a Comb Box selection? Thank you

        S Offline
        S Offline
        Sakhalean
        wrote on last edited by
        #3

        You add two variables for the two comboboxes. from class wizard add the two different CBN_SELCHANGE handlers.

        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