CWnd::UpdateData
BOOL UpdateData( BOOL bSaveAndValidate = 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.
Parameters
bSaveAndValidate
Flag that indicates whether dialog box is being initialized (FALSE) or data is being retrieved (TRUE).
Remarks
Call this member function to initialize data in a dialog box, or to retrieve and validate dialog data.
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.)
说明:
该函数的参数:
FALSE:函数将成员变量的值传递给对话框的变量;
TRUE:反之;
本文介绍了 CWnd::UpdateData 函数的功能及其参数含义。该函数用于初始化对话框中的数据或将数据从对话框中检索出来并进行验证。当 bSaveAndValidate 参数为 FALSE 时,函数将成员变量的值传递给对话框的变量;为 TRUE 时,则相反。
1316

被折叠的 条评论
为什么被折叠?



