Data update on property page
Posted on 2002-07-15
I got a bunch of property pages, and am creating more. I am looking for a way to detect changes in the controls (mostly Edit, Check box and radio buttons) on the property pages. The way I want it to work is like this:
Associated with the controls, I have data members with current values. When the user makes the changes on the property page and switch to another page before doing UpdateData() or Apply(), I want some way to know that and give an alert.
I know I could write a function for each control to handle this, but that is a lot of repeated work. Ideally I want to have a common base class, say CMyPropertyPage, that handles this once for all, and a particular property page, say CMySpecificPage, will be derived from CMyPropertyPage.
The best would be it will compare the values on the page with the data members and alert any differences. Or it would also be fine if any actions by the user on the controls are detected, values change or not.
Thank you very much. I am new here with only 75 points. I thought the problems is worth more than that.