Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio .NET
Visual C++
Reference
MFC Reference
MFC Classes
CWnd Class
Member Functions
 CWnd::UpdateData

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
MFC Library Reference
CWnd::UpdateData

Call this member function to initialize data in a dialog box, or to retrieve and validate dialog data.

BOOL UpdateData(
   BOOL bSaveAndValidate = TRUE 
);

Parameters

bSaveAndValidate
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 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 member function 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.)

See Also

CWnd Overview | Class Members | Hierarchy Chart | CWnd::DoDataExchange

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker