IssacJones
asked on
control chnages in a dialog MFC
Hiya
Suppose I have a dialog with numerous controls in it e.g. edit boxes, radio buttons, check boxes.
Is there a simple way for me to find out if the dialog is opened, controls modified e.g. values in edit boxes changed or radio button selections changed, and then closed. That is, is there a way to determine whether values or changed or not during the opening and closing of the dialog?
I could of course look at the OnChange message for each control in the dialog but if there are many controls this maybe difficult and time consuming. It also doesn't deal with the issue of changing a value and then re-setting it to its original before leaving the dialog i.e. no changes have been made.
Any ideas?
John
Suppose I have a dialog with numerous controls in it e.g. edit boxes, radio buttons, check boxes.
Is there a simple way for me to find out if the dialog is opened, controls modified e.g. values in edit boxes changed or radio button selections changed, and then closed. That is, is there a way to determine whether values or changed or not during the opening and closing of the dialog?
I could of course look at the OnChange message for each control in the dialog but if there are many controls this maybe difficult and time consuming. It also doesn't deal with the issue of changing a value and then re-setting it to its original before leaving the dialog i.e. no changes have been made.
Any ideas?
John
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Another idea is to add a boolean (integer) variable that becomes true when the user changes any data. This variable becomes false when the changed values were saved/handled.
@pgnatyuk - good idea to flag a change simply, but it fails on following requirement I think:
>>It also doesn't deal with the issue of changing a value and then re-setting it to its original before leaving the dialog i.e. no changes have been made.
>>It also doesn't deal with the issue of changing a value and then re-setting it to its original before leaving the dialog i.e. no changes have been made.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys