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. How can I clear drop list combo box?

How can I clear drop list combo box?

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 4 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.
  • E Offline
    E Offline
    Emre Zorlu
    wrote on last edited by
    #1

    I can clear drop down combo box with m_comboBox.SetSel (0,-1); m_comboBox.Clear (); but I can't clear drop list combo box ! How can I do this ? emroz

    F W 2 Replies Last reply
    0
    • E Emre Zorlu

      I can clear drop down combo box with m_comboBox.SetSel (0,-1); m_comboBox.Clear (); but I can't clear drop list combo box ! How can I do this ? emroz

      F Offline
      F Offline
      Frank K
      wrote on last edited by
      #2

      Hi, use m_comboBox.ResetContent(); Regards Frank

      E 1 Reply Last reply
      0
      • F Frank K

        Hi, use m_comboBox.ResetContent(); Regards Frank

        E Offline
        E Offline
        Emre Zorlu
        wrote on last edited by
        #3

        m_comboBox.ResetContent(); delete all content and m_comboBox.DeleteString(ndx); delete one string. I don't wanna delete any string. I just wanna make null. emroz

        D 1 Reply Last reply
        0
        • E Emre Zorlu

          I can clear drop down combo box with m_comboBox.SetSel (0,-1); m_comboBox.Clear (); but I can't clear drop list combo box ! How can I do this ? emroz

          W Offline
          W Offline
          wb
          wrote on last edited by
          #4

          m_comboBox.SetCurSel(-1)

          1 Reply Last reply
          0
          • E Emre Zorlu

            m_comboBox.ResetContent(); delete all content and m_comboBox.DeleteString(ndx); delete one string. I don't wanna delete any string. I just wanna make null. emroz

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            Emre Zorlu wrote: I just wanna make null. Which makes no sense in this context. If you are not wanting to remove any items from the control, what are you wanting to do? If you simply want to add an empty string to the control, use AddString("").

            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