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 to add dynamically to Combo Box

how to add dynamically to Combo Box

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

    Hi, I have MDI project. In one of the dialog boxes, I have a Combo Box, and according to a file (this file is read before the dialog is opened), I have to add items to the combo box, and the number of items is different according to the read file. how can I add dynamically to the Combo Box? Ehsan Behboudi

    R M T 3 Replies Last reply
    0
    • M mr2003

      Hi, I have MDI project. In one of the dialog boxes, I have a Combo Box, and according to a file (this file is read before the dialog is opened), I have to add items to the combo box, and the number of items is different according to the read file. how can I add dynamically to the Combo Box? Ehsan Behboudi

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

      CComBox has AddString() and InsertString() methods to add items --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber Pinky, are you pondering what I'm pondering? I think so Brain, but how will we fit the hamster inside the accordion?

      1 Reply Last reply
      0
      • M mr2003

        Hi, I have MDI project. In one of the dialog boxes, I have a Combo Box, and according to a file (this file is read before the dialog is opened), I have to add items to the combo box, and the number of items is different according to the read file. how can I add dynamically to the Combo Box? Ehsan Behboudi

        R Offline
        R Offline
        Ravi Bhavnani
        wrote on last edited by
        #3

        CComboBox::AddString() /ravi Let's put "civil" back in "civilization" Home | Articles | Freeware | Music ravib@ravib.com

        1 Reply Last reply
        0
        • M mr2003

          Hi, I have MDI project. In one of the dialog boxes, I have a Combo Box, and according to a file (this file is read before the dialog is opened), I have to add items to the combo box, and the number of items is different according to the read file. how can I add dynamically to the Combo Box? Ehsan Behboudi

          T Offline
          T Offline
          Terry ONolley
          wrote on last edited by
          #4

          Combo boxes only work with strings. They are "dumb" as far as data types, formating, etc. are concerned. If you want data from the file to go to a combo box, then you are responsible for reading in the data from the file, parsing the data, and adding the data to the Combo Box.


          Have you answered an MTQ? Check out the stats!


          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