반응형
ShellExecute 함수
1)txt 파일 열기
2)경로 열기
//txt 파일 열기
void CDbfReaderDlg::OnBnClickedBtnOpendata()
{
if (openoutputDataPath == "")
{
MessageBox(_T("RUN 해주세요."));
return;
}
//openoutputDataPath.Replace(L"\\", L"\\\\");
// TODO: Add your control notification handler code here
ShellExecute(NULL, _T("open"), _T("notepad"), openoutputDataPath, NULL, SW_SHOW);
}
//폴더 열기
void CDbfReaderDlg::OnBnClickedBtnOutpathopen()
{
if (openoutputPath == "")
{
MessageBox(_T("RUN 해주세요."));
return;
}
// TODO: Add your control notification handler code here
// TODO: Add your control notification handler code here
//ShellExecute(NULL, _T("open"), _T("notepad"), openinputPath, NULL, SW_SHOW);
ShellExecute(NULL, _T("open"), openoutputPath,NULL, NULL, SW_SHOW);
}
반응형
'MFC > MFC 파일 입출력' 카테고리의 다른 글
[MFC] TXT 파일 한 줄씩 읽기 (0) | 2020.07.14 |
---|---|
[MFC] 해당디렉토리가 존재하는지 여부 확인 (0) | 2020.07.07 |
[MFC] 파일 입출력 (다른이름으로 저장) 오류해결 (0) | 2020.07.06 |
[MFC] 파일 입출력 - 경로 옵션(Path option) (0) | 2020.07.02 |
C++ MFC 파일 입출력 ofstream (0) | 2020.06.25 |