zoukankan      html  css  js  c++  java
  • MFC如何创建目录

    1. 1.    MFC只能使用CString类,它的格式化

          CString m_strFolderPath;

          m_strFolderPath.Format(_T("F:\%s"),load.m_name);

    1. 如何创建目录

    CString m_strFolderPath;

            m_strFolderPath.Format(_T("F:\%s"),load.m_name);   

     

            if(!PathIsDirectory(m_strFolderPath))

            {

                CString strMsg;

                strMsg.Format (_T("指定路径"%s"不存在,是否创建?"), m_strFolderPath);

                if (AfxMessageBox(strMsg, MB_YESNO) == IDYES)

                {

                if (!CreateDirectory(m_strFolderPath, NULL ) )

                {

                strMsg.Format(_T("创建路径"%s"失败!是否继续?"), m_strFolderPath);

                if (AfxMessageBox(strMsg, MB_YESNO) == IDYES)

                return;

            }

            }

            }

  • 相关阅读:
    获取平台所有接口的IP和MAC地址
    共享内存
    消息队列
    shell常见语法
    保存结构体到文件
    Bookmarks
    js打开新窗口
    要买的书
    批量下载辅助工具
    解决word没有菜单栏和工具栏
  • 原文地址:https://www.cnblogs.com/hualimengyu/p/3986853.html
Copyright © 2011-2022 走看看