MFC Combo box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • piyumali2004
    New Member
    • Nov 2008
    • 2

    MFC Combo box

    I'm developing an application using MFC. I'm using Visual Studio 2003 for that. In my application there are two dialog boxes. By click on a menu item in the first dialog box(main dialog) I can connect to the second dialog (Property dialog)box.
    I inserted a combo box in my property dialog box. Then I created a object of property dialog class in the main dialog class.
    The problem is when I run the program, although the object of the property dialog is created, the main dialog class doesn't identify the combo box of the property dialog class.
    I think the reason is, at the moment the object is creating, mapping of the combo box ID and its variable is not happened. (It's happen in the DoDataExchange method in the property dialog class)
    Please let me know a way to initialize the combo box variable in the main class.
    Thank You
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Each dialog should handle its own controls, the combo box in on the property dialogue so the property dialogue class should be the one handling the combo box and with a data member for it.

    Comment

    • piyumali2004
      New Member
      • Nov 2008
      • 2

      #3
      Dear Banfa,
      Thanx lot for your idea. Now I'm changing my code according to it.
      Bye.

      Comment

      Working...