CString FileName;
CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, _T("JPEG Files (*.jpeg, *.jpg)|*.jpeg; *.jpg||"), NULL );
if (dlg.DoModal() == IDOK)
{
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
FileName = dlg.GetPathName();
}