zoukankan      html  css  js  c++  java
  • 使用CFileDialog取得文件路径,然后用CFile打开的

    void CCFileDialog_CFileView::OnButton1()
    {
     // TODO: Add your control notification handler code here
     CString m_szTmp;
      char buf[1000];
      CFileDialog dlg(TRUE,"mdl","*.txt");
      if(dlg.DoModal()==IDOK) {

       m_szEditText = dlg.GetPathName();
        CFile mfile;
         mfile.Open(dlg.GetPathName(), CFile::modeRead);
         mfile.Read(buf,sizeof(buf));
         m_szTmp = buf;
         //m_szEditText = m_szTmp;
         UpdateData(false);
         mfile.Close();
     }
     
    }

  • 相关阅读:
    if 语句
    变量命名
    python变量
    运算符
    注释
    PyCharm
    python版本,执行
    Tornado 【简述】
    Git 【管理篇】
    MySQL的介绍
  • 原文地址:https://www.cnblogs.com/cy163/p/442893.html
Copyright © 2011-2022 走看看