码迷,mamicode.com
首页 > Windows程序 > 详细

GetWindowText

时间:2015-07-16 09:28:06      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:

用于得到窗口中的数据

{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
if(judge==true)
{
CString x;
// TODO: Add your control notification handler code here
CFile mFile("data.in",CFile::modeWrite|CFile::modeCreate);//打开文件仅仅用于读写
UpdateData(1);//更新数据
GetDlgItem(IDC_EDIT1)->GetWindowText(x);
CArchive ar(&mFile,CArchive::store);
ar.WriteString(x);
UpdateData(FALSE);
ar.Close();
mFile.Close();
}

GetWindowText

标签:

原文地址:http://www.cnblogs.com/llforeverlove/p/4650222.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!