记事本程序的VC++编程实例(3)

2020-02-21 18:17

附录1

voidCTxtDlg::OnOpen() { // TODO: Add your control notification handler code here CFileDialogdlg(TRUE,NULL,NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, \ CStringstrPath,strText=\ if(dlg.DoModal() == IDOK) { strPath = dlg.GetPathName(); m_OP.SetWindowText(strPath); CFilefile(strPath,CFile::modeRead); char read[10000]; file.Read(read,10000); for(int i=0;i

附录2

voidCTxtDlg::OnSave() { // TODO: Add your control notification handler code here CFileDialogdlg(FALSE,NULL,NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, \ CStringstrPath,strText=\ char write[10000]; if(dlg.DoModal() == IDOK) { strPath = dlg.GetPathName(); if(strPath.Right(4) != \ strPath += \ m_SP.SetWindowText(strPath); CFilefile(_T(strPath),CFile::modeCreate|CFile::modeWrite); m_Edit1.GetWindowText(strText); strcpy(write,strText); file.Write(write,strText.GetLength()); file.Close(); } }


记事本程序的VC++编程实例(3).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:中国新能源汽车发展的现状 - 图文

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: