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. Default data in data tab of combo box not working

Default data in data tab of combo box not working

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
6 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
    Sujay chakraborty
    wrote on last edited by
    #1

    Hello all, i m working on a MFC application using Visual C++ 6.0. I am stuck with a problem where i have put certain values in the combo box which is in a dialog window...... now the problem that arises is that when i run that application i find no data present in the combo box, i have search for the problem but every where it is mentioned in the same manner ( i.e. just enter the values in data tab using Ctrl+Enter for next element) to display the data but i am confused why my application is not working that way.......as i don't want to load data using AddString() method. Please help me out with this !!! any help will be highly appreciated !! regards Sujay

    _ D 2 Replies Last reply
    0
    • S Sujay chakraborty

      Hello all, i m working on a MFC application using Visual C++ 6.0. I am stuck with a problem where i have put certain values in the combo box which is in a dialog window...... now the problem that arises is that when i run that application i find no data present in the combo box, i have search for the problem but every where it is mentioned in the same manner ( i.e. just enter the values in data tab using Ctrl+Enter for next element) to display the data but i am confused why my application is not working that way.......as i don't want to load data using AddString() method. Please help me out with this !!! any help will be highly appreciated !! regards Sujay

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      I'm sure the values are being populated, but you're not seeing any by default because none has been selected. Try viewing the list contents of the combo box by clicking on its down arrow. Do you see the items there? If you do and want the first to be selected by default, use the CComboBox::SetCurSel() method.

      «_Superman_» I love work. It gives me something to do between weekends.
      Microsoft MVP (Visual C++)

      1 Reply Last reply
      0
      • S Sujay chakraborty

        Hello all, i m working on a MFC application using Visual C++ 6.0. I am stuck with a problem where i have put certain values in the combo box which is in a dialog window...... now the problem that arises is that when i run that application i find no data present in the combo box, i have search for the problem but every where it is mentioned in the same manner ( i.e. just enter the values in data tab using Ctrl+Enter for next element) to display the data but i am confused why my application is not working that way.......as i don't want to load data using AddString() method. Please help me out with this !!! any help will be highly appreciated !! regards Sujay

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

        Sujay chakraborty wrote:

        ...when i run that application i find no data present in the combo box...

        How are you verifying this?

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        S 1 Reply Last reply
        0
        • D David Crow

          Sujay chakraborty wrote:

          ...when i run that application i find no data present in the combo box...

          How are you verifying this?

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          S Offline
          S Offline
          Sujay chakraborty
          wrote on last edited by
          #4

          hello David, Actually i have tried a few steps for this..... -- I have clicked on the down arrow key in combo box to check for data -- I have tried to set default selection using CComboBox::SetCurSel() method but i have found a strange pattern in this the moment i run a combo box within Win32 Wizard Application rather than empty project of win32 app (which i have done earlier) i found the combo box to be running absolutely perfect. :omg: I found it weired but couldn't figure out the reason for this to happen.!!!:~

          D 1 Reply Last reply
          0
          • S Sujay chakraborty

            hello David, Actually i have tried a few steps for this..... -- I have clicked on the down arrow key in combo box to check for data -- I have tried to set default selection using CComboBox::SetCurSel() method but i have found a strange pattern in this the moment i run a combo box within Win32 Wizard Application rather than empty project of win32 app (which i have done earlier) i found the combo box to be running absolutely perfect. :omg: I found it weired but couldn't figure out the reason for this to happen.!!!:~

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

            Sujay chakraborty wrote:

            -- I have clicked on the down arrow key in combo box to check for data

            Are you sure the list-part of the combobox is large enough? By default, it isn't. It's kludgy, but you can call the combobox's GetCount() method to see how many items are in it.

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            S 1 Reply Last reply
            0
            • D David Crow

              Sujay chakraborty wrote:

              -- I have clicked on the down arrow key in combo box to check for data

              Are you sure the list-part of the combobox is large enough? By default, it isn't. It's kludgy, but you can call the combobox's GetCount() method to see how many items are in it.

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              S Offline
              S Offline
              Sujay chakraborty
              wrote on last edited by
              #6

              Hello David, Thanks for your valuable suggestions. Actually i have figure out a weird notion in VC++ 6.0, this default data items (from data tab of properties window of the combo-box control) works superbly well with Win32 wizard application but its not working with Win32 blank application, i am trying to figure it why ?????? but couldn't succeed till now....... If you kindly help me to sought out this issue, and please correct me if i am wrong in any sense. Your help will be greatly appreciated. Regards Sujay

              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