15,471
社区成员
发帖
与我相关
我的任务
分享
CFileDialog dlg(TRUE);
CString path;
if(dlg.DoModal()==IDOK)
{
path=dlg.GetPathName();
MessageBox(path);
}
HANDLE hFile = NULL;
hFile = ::CreateFile("f:\\SourceFromCsdn2.exe",
FILE_ALL_ACCESS,
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL
);
if( hFile == INVALID_HANDLE_VALUE )
{
MessageBox("hFile is NULL!\n", "Error",MB_OK);
return;
}