CWnd::UpdateData BOOL UpdateData( BOOL bSaveAndValidate = TRUE );返回值:如果操作成功返回非零值;否则为 0. 如果 bSaveAndValidate 是 TRUE, 这个非零值就是有效的.参数:bSaveAndValidate是一个简要说明对话框是已经初始化(FALSE)或数据已重新返回(TRUE)的标记.注意:调用这个函数来初始化对话框中的数据或者是重新返回并验证对话框数据.在调用CDialog::OnInitDialog来缺省创建模式对话框时,框架自动调用bSaveAndValidate=FALSE 的UpdateData函数。这个调用发生在对话框可见前。缺省执行CDialog::OnOK 时会调用令bSaveAndValidate=TRUE 的这个函数去返回数据,如果成功则关闭对话框(如果是按下的CANCEL button,则不会返回数据。) 以上是我翻译的中的MSDN中解释,不知是否正确附英文在下:CWnd::UpdateData BOOL UpdateData( BOOL bSaveAndValidate = TRUE );Return ValueNonzero if the operation is successful; otherwise 0. If bSaveAndValidate is TRUE, then a return value of nonzero means that the data is successfully validated.ParametersbSaveAndValidateFlag that indicates whether dialog box is being initialized (FALSE) or data is being retrieved (TRUE).ResCall 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.)
2.http://bingle.pku.edu.cn/scripts/submit.exe?ToMatch=MSDN&TypeID=305
是不是你名字错了UpdateData(TRUE);
BOOL UpdateData( BOOL bSaveAndValidate = TRUE );返回值:如果操作成功返回非零值;否则为 0. 如果 bSaveAndValidate 是 TRUE, 这个非零值就是有效的.参数:bSaveAndValidate是一个简要说明对话框是已经初始化(FALSE)或数据已重新返回(TRUE)的标记.注意:调用这个函数来初始化对话框中的数据或者是重新返回并验证对话框数据.在调用CDialog::OnInitDialog来缺省创建模式对话框时,框架自动调用bSaveAndValidate=FALSE 的UpdateData函数。这个调用发生在对话框可见前。缺省执行CDialog::OnOK 时会调用令bSaveAndValidate=TRUE 的这个函数去返回数据,如果成功则关闭对话框(如果是按下的CANCEL button,则不会返回数据。)
以上是我翻译的中的MSDN中解释,不知是否正确附英文在下:CWnd::UpdateData
BOOL UpdateData( BOOL bSaveAndValidate = TRUE );Return ValueNonzero if the operation is successful; otherwise 0. If bSaveAndValidate is TRUE, then a return value of nonzero means that the data is successfully validated.ParametersbSaveAndValidateFlag that indicates whether dialog box is being initialized (FALSE) or data is being retrieved (TRUE).ResCall 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.)