MFC/MFC 파일 입출력
[MFC] 버튼 클릭 이벤트 (경로, 파일 열기)
WantAirpod
2020. 7. 10. 11:17
반응형
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);
}
반응형