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. Problems with Dialog Controls in VS2003

Problems with Dialog Controls in VS2003

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++visual-studiotestingbeta-testing
5 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.
  • N Offline
    N Offline
    NTense
    wrote on last edited by
    #1

    Hi All, I'm working on my first project in VS 2003 (coming from 6.0), and have run into a snag while creating a simple dialog. The problem is this. I am building a CAD application with MFC, and needed a dialog to manage the creation of one of the primitives. Simple enough.. I placed 2 radio buttons on the form (along with other controls), and then began assigning variables to the controls. The problem arose when the class wizard would not display any of the control ID's for the radio buttons. So, I tried to add the variable relations in by using DDX_Radio(). The program would give me a runtime error at that point that I couldn't track down. After troubleshooting for about an hour, I decided to place a CComboBox in instead since I could essentially track/manage the variable just as easily. After assigning a variable to the combo box, I went to fill it using AddString in the OnInitDialog() function. The problem is that the combobox doesn't drop. I can't see a way to manipulate it in the resource editor, and this has consumed and insane amount of time for such a simple task. I've never had a problem with this in VS 6.0, and it's a bit confusing. Here's the code in my InitDialog (m_typeBox is the CComboBox control): BOOL CTerminalPrompt::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here m_Elements = 1; m_typeBox.AddString("testing"); m_typeBox.AddString("testing2"); this->UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } Does anyone have any suggestions? Am I missing something? Thanks, your help is a GREATLY appreciated :-D

    L 1 Reply Last reply
    0
    • N NTense

      Hi All, I'm working on my first project in VS 2003 (coming from 6.0), and have run into a snag while creating a simple dialog. The problem is this. I am building a CAD application with MFC, and needed a dialog to manage the creation of one of the primitives. Simple enough.. I placed 2 radio buttons on the form (along with other controls), and then began assigning variables to the controls. The problem arose when the class wizard would not display any of the control ID's for the radio buttons. So, I tried to add the variable relations in by using DDX_Radio(). The program would give me a runtime error at that point that I couldn't track down. After troubleshooting for about an hour, I decided to place a CComboBox in instead since I could essentially track/manage the variable just as easily. After assigning a variable to the combo box, I went to fill it using AddString in the OnInitDialog() function. The problem is that the combobox doesn't drop. I can't see a way to manipulate it in the resource editor, and this has consumed and insane amount of time for such a simple task. I've never had a problem with this in VS 6.0, and it's a bit confusing. Here's the code in my InitDialog (m_typeBox is the CComboBox control): BOOL CTerminalPrompt::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here m_Elements = 1; m_typeBox.AddString("testing"); m_typeBox.AddString("testing2"); this->UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } Does anyone have any suggestions? Am I missing something? Thanks, your help is a GREATLY appreciated :-D

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      One thing off the top of my head. Make sure that the combobox is big enough to display the dropdown. It may be showing the dropdown but the control isn't big enough for you to see it. There appears to be two sizes for the combo. One size is what you see and the other is with the dropdown. At least, that's how I look at it. Artificial intelligence is no match for natural stupidity. Never argue with an idiot. They will drag you down to their level where they are an expert.

      N 2 Replies Last reply
      0
      • L Lost User

        One thing off the top of my head. Make sure that the combobox is big enough to display the dropdown. It may be showing the dropdown but the control isn't big enough for you to see it. There appears to be two sizes for the combo. One size is what you see and the other is with the dropdown. At least, that's how I look at it. Artificial intelligence is no match for natural stupidity. Never argue with an idiot. They will drag you down to their level where they are an expert.

        N Offline
        N Offline
        NTense
        wrote on last edited by
        #3

        I can see the values in the editbox portion of the combo when I cycle through the mouse wheel, but the dropdown doesn't show up. I can't find a method to change the dropdown size, and it's not in the properties dialog.

        1 Reply Last reply
        0
        • L Lost User

          One thing off the top of my head. Make sure that the combobox is big enough to display the dropdown. It may be showing the dropdown but the control isn't big enough for you to see it. There appears to be two sizes for the combo. One size is what you see and the other is with the dropdown. At least, that's how I look at it. Artificial intelligence is no match for natural stupidity. Never argue with an idiot. They will drag you down to their level where they are an expert.

          N Offline
          N Offline
          NTense
          wrote on last edited by
          #4

          Ahh, found in another recently posted thread.. I needed to click the 'down button' in the resource editor, and then it will allow me to resize the display rect, but only after clicking on the down button. Weird. I don't remember that:confused: . Oh well, thanks for your help Anon

          L 1 Reply Last reply
          0
          • N NTense

            Ahh, found in another recently posted thread.. I needed to click the 'down button' in the resource editor, and then it will allow me to resize the display rect, but only after clicking on the down button. Weird. I don't remember that:confused: . Oh well, thanks for your help Anon

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            That's the thing. That one bit me a time or two. You're welcome.

            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