VC学习,Dialog中文本刷新问题
来源:互联网 发布:苹果手机自带软件 编辑:程序博客网 时间:2024/05/16 11:17
1, UpdateData的使用
UpdateData(FALSE)是将变量的值传到控件。
UpdateData(TRUE)是从控件中取值到关联的变量。
UpdateData(FALSE)会调用DoDataExchange,这样会刷新整个Dialog。如果要频繁地刷新一个控件,请不要用这个函数。
2, 怎样只刷新指定的控件?
a, 直接调用:控件->SetWindowText();
b,
m_strHello = "Hello";//这是我定义的一个编辑框,关联变量为CString m_strHello;
CDataExchange de(this, FALSE);//因为你是UpdateData(FALSE),所以这里直接用FALSE了
DDX_Text(&de, IDC_EDIT1, m_strHello);
3, DoDataExchange() function
Called by the framework to exchange and validate dialog data. It is called by the UpdateData member function. Call UpdateData to initialize a dialog box's controls or retrieve data from a dialog box.
4, 对话框中的DDX DDV机制
这样可以使变量于Dialog上的显示关联上。
CDataExchange class
Use this class if you are writing data exchange routines for custom data types or controls, or if you are writing your own data validation routines.
Dialog data exchange (DDX) is an easy way to initialize the controls in your dialog box and to gather data input by the user. Dialog data validation (DDV) is an easy way to validate data entry in a dialog box.
5, SetWindowText() function
If the target window is owned by the current process, SetWindowText causes a WM_SETTEXT message to be sent to the specified window or control.
- VC学习,Dialog中文本刷新问题
- FormView Dialog刷新问题
- ThinkPHP+DWZ, Dialog刷新问题
- dwz中一级dialog刷新问题
- VC 对话框背景图刷新问题
- dialog 刷新
- dialog 删除刷新dialog
- dwz 个人学习笔记(三)dialog弹出框,最小化,弹出位置,dialog中刷新dialog
- 100本c c++ vc学习资料
- 100本c c++ vc学习资料
- VC中文件路径问题
- VC中文件路径问题
- VC Static 背景图 文字刷新问题 解决方法
- RDLC报表中文本换行问题
- Android中文本字体的问题
- PHP html 刷新网页中文乱码问题:
- wince VC++ Common dialog box 打不开的问题
- DWZ刷新dialog
- 成长?????
- JavaFX是什么?
- 简洁 DIV+CSS布局入门之四 ( DIV+CSS常用 常用CSS DIV+CSS实例 简单DIV+CSS DIV+CSS布局分析 DIV+CSS流程)
- Silverlight是什么
- 如何写一份好的工程师简历
- VC学习,Dialog中文本刷新问题
- GB2312和Utf-8编码的转换[1]
- 如何准备软件工程师的面试
- BPMN 2.0虚拟圆桌访谈
- 磁带操作总结
- 开始写博了
- Linux中DNS的配置
- 健康问题,爱生活,爱健康
- 用flex生成C++的文件实例分析