mfc -vc++-点击按钮打开指定文件

void CSZYView::OnMenuitem32804()
{
// TODO: Add your command handler code here
//打开帮助手册
CFileFind finder;
BOOL bWorking=finder.FindFile(“help.chm”);
while(bWorking)
{
bWorking=finder.FindNextFile();
CString szFilePath=finder.GetFilePath();
ShellExecute(NULL, “open”,szFilePath, NULL, NULL, SW_SHOWNORMAL);
}
}

Leave a Reply