10. void CProgDlg::OnBnClickedButton1()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
CString prg = m_strProg;
LPCSTR prg1 = (LPCSTR)(LPCTSTR)prg;
prg.MakeUpper();
if (prg == _T("PAINT"))
WinExec("mspaint.exe", SW_SHOW);
else if (prg == _T("NOTEPAD"))
WinExec("notepad.exe", SW_SHOW);
else
WinExec(prg1, SW_SHOW);
• }
11.
12.
13. Populate the ComboBox in CProgDlg::OnInitDialog()
…………………………
// TODO: Add extra initialization here
m_ctrlCombo.AddString(_T("Notepad"));
m_ctrlCombo.AddString(_T("Paint"));
return TRUE; // return TRUE unless you set the focus to a control
}