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

CWnd::Updata的作用的更多相关文章

  1. CWnd与HWND的简单辨析

    今天在写一个小的网络应用,需要用到HWND类型的一个参数.而程序中有的“窗口操作句柄”只有一个CWnd类型的指针.这俩不都是“窗口句柄”么?而且反正都是地址直接转换使用如何?结果出现了调用失效的情况. ...

  2. PreTranslateMessage作用和用法

    PreTranslateMessage作用和用法  PreTranslateMessage是消息在送给TranslateMessage函数之前被调用的,绝大多数本窗体的消息都要通过这里,比較经常使用, ...

  3. CWnd中PreCreateWindow、PreSubclassWindow、SubclassWindow的区别

    http://blog.csdn.net/swimmer2000/archive/2007/10/30/1856213.aspx MFC(VC6.0)的CWnd及其子类中,有如下三个函数:     / ...

  4. MFC中的Invalidate、OnDraw、OnPaint函数的作用

    MFC中的Invalidate.OnDraw.OnPaint函数的作用 CWnd::Invalidate voidInvalidate( BOOL bErase = TRUE ); 该函数的作用是使 ...

  5. 【转】 PreTranslateMessage作用和使用方法

    PreTranslateMessage作用和使用方法  PreTranslateMessage是消息在送给TranslateMessage函数之前被调用的,绝大多数本窗口的消息都要通过这里,比较常用, ...

  6. CWnd类虚函数的调用时机、缺省实现

    MFC(VC6.0)的CWnd及其子类中,有如下三个函数: class CWnd : public CCmdTarget{    public:        virtual BOOL PreCrea ...

  7. PreTranslateMessage作用和使用方法

    PreTranslateMessage作用和使用方法  PreTranslateMessage是消息在送给TranslateMessage函数之前被调用的,绝大多数本窗口的消息都要通过这里,比较常用, ...

  8. MFC使用的风格(CButton, CEdit, CStatic, CWnd等等)

    风格 描述按钮风格 应用于CButton类对象,例如单选框.复选框和按钮.在CButton::Create的dwStyle参数中设置一个组合的风格.组合框风格 应用于CComboBox类对象.在CCo ...

  9. if __name__== "__main__" 的意思(作用)python代码复用

    if __name__== "__main__" 的意思(作用)python代码复用 转自:大步's Blog  http://www.dabu.info/if-__-name__ ...

随机推荐

  1. Mac系统下源码编译安装MySQL 5.7.17

    1.下载并解压到:/Users/xiechunping/Softwares/mysql-5.7.17下载地址:http://ftp.ntu.edu.tw/pub/MySQL/Downloads/MyS ...

  2. Android中shape的使用 (转载)

    转自:http://blog.csdn.net/ekeuy/article/details/12349853 在看很多开源代码中都使用到了shape,我看代码的时候一般都一带而过了,没有仔细去研究,这 ...

  3. 51nod 1095【映射】

    思路: 利用一个map记录初始的,利用一个map记录排序后的. #include <bits/stdc++.h> using namespace std; map<string,in ...

  4. 学习Mahout(一)

    Mahout 官方下载地址:http://apache.fayea.com/apache-mirror/mahout/ 环境ubuntu 12.04, hadoop1.2.1 ,mahout 0.9 ...

  5. 7天学完Java基础之5/7

    接口 接口就是一种公共的规范标准 是一种引用数据类型 定义格式 public interface 接口名称{} java7 中接口可以包含常量,抽象方法:Java8 还可以额外包含默认方法,静态方法: ...

  6. Educational Codeforces Round 20 B

    Description You are given the array of integer numbers a0, a1, ..., an - 1. For each element find th ...

  7. rac 添加 资源

    10g : 自动化.监控.os,存储,底成,网络,规范

  8. idea安装mybatis插件

    简介 mybatis_plus主要的作用是自动导航,如下图 点击箭头会跳转到对应的dao接口中,同样,dao接口中也有这样的箭头,点击之后会跳转到对应的sql映射语句处. 还有一个功能就是检查mapp ...

  9. Jquery 中使用String.Format

    第一种方法: String.format = function() { if (arguments.length == 0) return null; var str = arguments[0]; ...

  10. elasticsearch6安装head插件

    1.head 插件Github地址:https://github.com/mobz/elasticsearch-head 2.npm install 3.npm run start 由于head插件监 ...