Keeping the values in controls when closing and opening a Dialog
-
Hello everybody: I have a Dialog with a combo box. I supposed to pick a value from the combo box and then when I close the dialog and open the same dialog again, the value that I was selected before closing the dialog is gone. Is there a way of keeping those values when opening and closing a dialog? Any answer is more than welcome. Thanks and have a good day, Luis E. Cuadrado :0)
-
Hello everybody: I have a Dialog with a combo box. I supposed to pick a value from the combo box and then when I close the dialog and open the same dialog again, the value that I was selected before closing the dialog is gone. Is there a way of keeping those values when opening and closing a dialog? Any answer is more than welcome. Thanks and have a good day, Luis E. Cuadrado :0)
-
Hello everybody: I have a Dialog with a combo box. I supposed to pick a value from the combo box and then when I close the dialog and open the same dialog again, the value that I was selected before closing the dialog is gone. Is there a way of keeping those values when opening and closing a dialog? Any answer is more than welcome. Thanks and have a good day, Luis E. Cuadrado :0)
Are you using DDX_ routines in DoDataExchange, or rather you've done data transfer yourself? Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
-
Are you using DDX_ routines in DoDataExchange, or rather you've done data transfer yourself? Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
Hello: Thanks for the reply. DDX_routines? I think I heard about those but I don't think I'm using those in my application. I was going to do data transfer my self but looks like DDX_ routines is the best way, I guess. Is there any resource over the internet that I can find about DDX_routines? Thanks, Luis E. Cuadrado :0)
-
Hello: Thanks for the reply. DDX_routines? I think I heard about those but I don't think I'm using those in my application. I was going to do data transfer my self but looks like DDX_ routines is the best way, I guess. Is there any resource over the internet that I can find about DDX_routines? Thanks, Luis E. Cuadrado :0)
Ok, I'll try to keep it simple. Did you use ClassWizard to associate some variable with combo box? Or you're just calling Get/SetCurSel? Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
-
Ok, I'll try to keep it simple. Did you use ClassWizard to associate some variable with combo box? Or you're just calling Get/SetCurSel? Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
Yes, I used ClassWizard to add a variable to the ComboBox. With that variable I call GetCurSel(). Sorry if my questions sound kind of newbie. I'm starting with MFC not long ago :0). Thanks, Luis E. Cuadrado :0)
-
Yes, I used ClassWizard to add a variable to the ComboBox. With that variable I call GetCurSel(). Sorry if my questions sound kind of newbie. I'm starting with MFC not long ago :0). Thanks, Luis E. Cuadrado :0)
Luis E. Cuadrado wrote: With that variable I call GetCurSel(). Variable is 'control' (CComboBox) or 'value' (int)? Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.