ShellExecute() 을 이용한 외부 프로그램 실행 방법 입니다.
1. ini 파일 수정 하는 메모장 띄우는 거 입니다.
void CDlg_main::OnBnClickedmButEdini()
{
CString fn,
strExeFileName = _T("notepad.exe");
fn.Format(_T("%s.ini"), pDlgini->getExePathName() ); // AfxMessageBox(fn);
HINSTANCE hErr = ShellExecute(NULL, _T("open"), strExeFileName, fn, NULL, SW_SHOW);
}
2. browser 띄우기
ShellExecute(NULL,
_T("open"),
_T("iexplore"), // 또는 _T("chrome")
_T("https://bahk33.tistory.com/238"), //주소
NULL,
SW_SHOW);
'개발 > mfc' 카테고리의 다른 글
| mfc: 자식 Dialog 앞, 뒤 로 보내기 (0) | 2025.09.30 |
|---|---|
| win32 경과 시간을 계산, GetTickCount, GetSystemTimeAsFileTime 등 (0) | 2025.09.09 |
| visual studio 에서 dos (win32) project 시작 하기 (0) | 2025.09.08 |
| mfc, Static Text 글자,바닦에 빛깔 입히기 (0) | 2025.09.03 |
| mfc: Rich Edit Control 2 쓰기 (6) | 2025.08.25 |