Im just learning how to run programs from my application
now this code starts solitaire and notepad no problem
but when i go to run paint it doesnt work (I fear that paint might not be accessable for winexec() ) if that is the case how would i alter the code to go to any directory i wish
thanks to any one who responds
void CDay2Dlg::OnRunpgm()
{
UpdateData(TRUE);
CString strPgmName;
strPgmName = m_strProgToRun;
strPgmName.MakeUpper();
if (strPgmName == "PAINT")
WinExec("pbrush.exe", SW_SHOW);
if (strPgmName == "NOTEPAD")
WinExec("notepad.exe", SW_SHOW);
if (strPgmName == "SOLITAIRE")
WinExec("sol.exe", SW_SHOW);
}