I have a dialog in a MFC project that contains a combobox with the following items: blue, black, yellow. When I start the dialog the combobox has the blue item selected. If I change to yellow, close the dialog and open the dialog again, I want the selected item to be yellow and not blue.
Any idee how can I remember the last selected item ?
In your dialog class, have a static member and always set it to the last color used in the combo box. Since the member is static, it will persist even if you change the actual dialog object