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. Set Combo Box values??

Set Combo Box values??

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
2 Posts 2 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
    Aoife
    wrote on last edited by
    #1

    Hello, I'm using MFC dialog based app. In it I have two dialog boxes Dialog1 and Dialog2. There is a Combo Box in Dialog2 that I want to populate with integer values obtained from Dialog1. The following explains what I want to do. Dialog1.cpp #include "Dialog2.h" clear all contents from the Combo Box in Dialog2 while (number < 10) { ... if(some condition) { write whatever the 'number' value is to the combo box in Dialog2 } ... number++; } Does anyone know how I can do this or know of any document explaining this. Thanks in advance, Aoife

    R 1 Reply Last reply
    0
    • A Aoife

      Hello, I'm using MFC dialog based app. In it I have two dialog boxes Dialog1 and Dialog2. There is a Combo Box in Dialog2 that I want to populate with integer values obtained from Dialog1. The following explains what I want to do. Dialog1.cpp #include "Dialog2.h" clear all contents from the Combo Box in Dialog2 while (number < 10) { ... if(some condition) { write whatever the 'number' value is to the combo box in Dialog2 } ... number++; } Does anyone know how I can do this or know of any document explaining this. Thanks in advance, Aoife

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

      Use ResetContent() to clear the contents of a combobox. To add elements, use AddString() or InsertString(). /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

      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