Monday, January 10, 2005

[Tech] UpdateData method in MFC

When we use UpdateData ( FALSE ) in MFC form, the values from Document will be put into View. On the other hand, UpdateData ( TRUE ) will store user input shown on the View into the Document.

To preserve user input before writing over it, we can use UpdateData ( TRUE ) and then perform business logic to modify document variables. When we are ready to update the View, use UpdateData ( FALSE ) and the variables we modified will affect the View.

No comments: