MFC 指定路径创建文件夹

A、使用环境 

       MFC 

B、核心代码 使用示例

CString m_FilePath(L"C:\\File");

if  ( FALSE == CreateDirectory(m_FilePath, NULL) )
{
	if ( ERROR_ALREADY_EXISTS == GetLastError() )
	{
		TRACE("\n this path is invalid");
	}
	else
	{
		TRACE("\n this path is exists");
	}
}

猜你喜欢

转载自blog.csdn.net/hk_5788/article/details/80303400