⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_17145.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:17145 发表者:liuwenjun 发表日期:2002-10-08 21:35:31
<br>主题:UpdateData()函数及延时函数
<br>内容:我在读一个源程序时遇到了UpdateData()函数,不知其作用为何,另外我想在我的程序中用个延时函数,但不知是什么?请指教!!!!
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:黄飚 回复日期:2002-10-08 22:05:57
<br>内容:1Sleep(xx)是该线程休眠单位是ms<BR><BR>2CWnd::UpdateData 一般是指界面上的内容与该控件的变量的交换<BR>BOOL UpdateData( BOOL bSaveAndValidate = TRUE );<BR><BR>Return Value<BR><BR>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.<BR><BR>Parameters<BR><BR>bSaveAndValidate<BR><BR>Flag that indicates whether dialog box is being initialized (FALSE) or data is being retrieved (TRUE).<BR><BR>Remarks<BR><BR>Call this member function to initialize data in a dialog box, or to retrieve and validate dialog data.<BR><BR>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.)<BR><BR>CWnd Overview |&nbsp;&nbsp;Class Members |&nbsp;&nbsp;Hierarchy Chart<BR><BR>See Also&nbsp;&nbsp; CWnd::DoDataExchange<BR>谢谢,给分<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:Norton AntivVirus 回复日期:2002-10-08 22:23:32
<br>内容:以CEdit为例:变量m_nEdit<BR>UpdateData(FALSE);将m_nEdit中的值显示在CEdit控件上;<BR>UpdateData(TRUE);将CEdit中当前显示文字写入变量m_nEdit中;<BR><BR><BR>延时用Sleep(xxx);xxx以毫秒为单位,此时整个程序停止运行,等待xxx毫秒
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:liuwenjun 回复日期:2002-10-09 14:57:29
<br>内容:分数怎么只能给一个人么?我刚给完黄飚朋友分,回头再回来给Norton AntivVirus 分就没有给分的那行标志了。你们给了我这么完满的答案,我本来想每人给你们100分的!结果却不行。<BR><BR>另外,Sleep函数是API函数吧!我刚才实验的时候发现他不是哪个类的成员函数,不怕你们笑话,我还是要证实一下:API函数是只要在Windows下编程(如:VC,BCB,VB等)就可以直接在任何地方直接用,而不像类成员函数那样受到诸多限制。<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:Norton AntivVirus 回复日期:2002-10-09 17:29:52
<br>内容:555555555555555,好惨啊!!!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:黄飚 回复日期:2002-10-09 19:57:50
<br>内容: 不好意思,谢谢了
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -