Rojer
September 10th, 1999, 04:16 PM
Hi
I am having a Open file optionin my application menu where from I need to open up some jpg files in the corr default editor. So how can I open up the default editor (say MSPaint) with the jpg file displayed.
I am using like this
void CMainFrame::OnFileDisp()
{
CSpecialFileDialog dlgFile(TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"JPG files (*.jpg)|*.jpg; *.jpg||");
dlgFile.m_ofn.lpstrTitle = "Open Image";
if(dlgFile.DoModal() != IDOK)
return ;
CString strFilePath = dlgFile.GetPathName();
}
Now once I have the FilePath shall I use the WinExec command to open it and if so how. Do let me know
Thanks
I am having a Open file optionin my application menu where from I need to open up some jpg files in the corr default editor. So how can I open up the default editor (say MSPaint) with the jpg file displayed.
I am using like this
void CMainFrame::OnFileDisp()
{
CSpecialFileDialog dlgFile(TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
"JPG files (*.jpg)|*.jpg; *.jpg||");
dlgFile.m_ofn.lpstrTitle = "Open Image";
if(dlgFile.DoModal() != IDOK)
return ;
CString strFilePath = dlgFile.GetPathName();
}
Now once I have the FilePath shall I use the WinExec command to open it and if so how. Do let me know
Thanks