CWnd::Updata的作用

CWnd::Updata的作用

CWnd::UpdateData

调用此成员函数以在对话框中初始化数据,或者取回和验证对话框数据。

BOOL UpdateData(BOOL bSaveAndValidate = TRUE);

参数

bSaveAndValidate

标志(FLASE)表示初始化对话框,(TRUE)表示数据被取回。

返回值

操作成功返回非零,否则返回零。如果bSaveAndValidate 是TRUE, 返回值为非零表示数据获取成功。

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.

 

评论:

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.)

转载于:https://www.cnblogs.com/2018shawn/p/10565822.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值