ReneG
March 17th, 2004, 04:27 PM
Hi, can anyone help me figure out why my GetSaveFileName fails..?
char FileBuffer[500];
OPENFILENAME ofn;
memset(&ofn, 0, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = MainWindow.Handle;
ofn.lpstrFilter = "Filetype (*.tst)\0*.tst\0\0";
ofn.lpstrFile = FileBuffer;
ofn.nMaxFile = sizeof(FileBuffer);
ofn.lpstrDefExt = "tst";
ofn.Flags = OFN_EXPLORER | OFN_OVERWRITEPROMPT;
GetSaveFileName(&ofn)
I checked CommDlgExtendedError(), and it returns CDERR_INITIALIZATION, so i guess it must be something in the OPENFILENAME structure i haven't filled out correctly...
Any help is greatly appreciated!
Best regards
ReneG
char FileBuffer[500];
OPENFILENAME ofn;
memset(&ofn, 0, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = MainWindow.Handle;
ofn.lpstrFilter = "Filetype (*.tst)\0*.tst\0\0";
ofn.lpstrFile = FileBuffer;
ofn.nMaxFile = sizeof(FileBuffer);
ofn.lpstrDefExt = "tst";
ofn.Flags = OFN_EXPLORER | OFN_OVERWRITEPROMPT;
GetSaveFileName(&ofn)
I checked CommDlgExtendedError(), and it returns CDERR_INITIALIZATION, so i guess it must be something in the OPENFILENAME structure i haven't filled out correctly...
Any help is greatly appreciated!
Best regards
ReneG