MFC 创建一个文件夹

void CFileTestDlg::OnBnClickedButton4()
{
	// TODO: Add your control notification handler code here
	CString   strFolderPath("D:\\test");
	 if   (PathIsDirectory(strFolderPath))
	 {
		 MessageBox(_T("文件夹已经存在!"));
	 }
	 else
	  CreateDirectory(strFolderPath, NULL) ;
}

  

posted @ 2017-05-12 14:20  Henry2017  阅读(170)  评论(0编辑  收藏  举报