CWnd::UpdateData
This method initializes data in a dialog box, or retrieves and validates dialog data.
BOOL UpdateData(
BOOL
bSaveAndValidate
= TRUE);
Parameters
- bSaveAndValidate
Specifies a flag that indicates whether dialog box is being initialized (FALSE) or data is being retrieved (TRUE).
Return Value
Nonzero if the operation is successful; otherwise, it is 0. If bSaveAndValidate is TRUE, then a return value of nonzero means that the data is successfully validated.
Remarks
The framework automatically calls UpdateData with bSaveAndValidate set to FALSE when a modal dialog box is created in the default implementation of CDialog::OnInitDialog. The call occurs before the dialog box is visible. The default implementation of CDialog::OnOK calls this method with bSaveAndValidate set to TRUE to retrieve the data, and if successful, will close the dialog box. If the Cancel button is clicked in the dialog box, the dialog box is closed without the data being retrieved.
Requirements
Windows CE versions: 1.0 and later
Header file: Declared in Afxwin.h
See Also