Save dialog problem
Jun 16, 2015 at 3:55am UTC
Hi
I call a save dialog to save a xml file (ex: a.xml), then save a clone of it(ex: a_clone.xml) to other location silently. But it only work for a.xml file.
This my code for save dialog:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
string Savefilename(char *filter = "Mission Files (*.mmf)\0*.mmf" , HWND owner = NULL){
OPENFILENAME ofn;
char fileName[MAX_PATH] = "" ;
ZeroMemory(&ofn, sizeof (ofn));
ofn.lStructSize = sizeof (OPENFILENAME);
ofn.hwndOwner = owner;
ofn.lpstrFilter = filter;
ofn.lpstrFile = fileName;
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
ofn.lpstrDefExt = "" ;
ofn.lpstrInitialDir ="Missions\\" ;
string fileNameStr;
if ( GetSaveFileName(&ofn) )
fileNameStr = fileName;
return fileNameStr;
}
Can anyone help me please!
Last edited on Jun 16, 2015 at 3:56am UTC
Jun 21, 2015 at 1:53pm UTC
I don't understand. Where it is supposed to save the backup copy silently ? You never show us how you do it.
Topic archived. No new replies allowed.