09-26-2006 02:50 AM
09-29-2006 09:36 AM
09-29-2006 10:14 AM
It seems to me that Mile is trying to do this at runtime, not at design time.
The usual way I use to detect if the user has changed some value on a panel is to add to the panel a hidden checkbox and turn it on every time the values in the controls are changed. Next, the first thing to look at when the user clicks OK button is this checkbox value: if 1 it means some value has changed.
To simplify this procedure, I have created one callback linked to all controls that simply traps EVENT_VAL_CHANGED and sets checkbox value to 1. This callback can be chained to existing controls callbacks, if any.
To make this procedure general-use, I use the callbackData parameter of each control to store checkbox ID and in the callback I simply SetCtrlVal (panel, (int)callbackData, 1); to turn the checkbox on. Since callbackData parameter cannot be assigned at design time, I use a series of SetCtrlAttribute (,,,,,, ATTR_CALLBACK_DATA, (void *)checkBoxID); when I load the panel. An even simpler method could be to create a list of control IDs and to create a SetCallbackDataForList function as a customized copy of SetAttributeForList function.
Just my 2c...
10-09-2006 06:05 AM