|
-
Apr 22nd, 2002, 07:07 AM
#1
Thread Starter
Lively Member
GetOpenFileName
Couldsomeone please tell me the problem with this?
Compiles properly, but Access Violates!
OPENFILENAME *OpenFile;
int NotCancel = 0;
char FileName[190] ="", FileTitle[190] ="";
OpenFile = new OPENFILENAME;
OpenFile->lStructSize = sizeof(OPENFILENAME);
OpenFile->hwndOwner = Form1->Handle;
OpenFile->hInstance = GetActiveWindow();
OpenFile->lpstrFilter = "All Files (*.*)";
OpenFile->lpstrFile = FileName;
OpenFile->nMaxFile = 200;
OpenFile->lpstrFileTitle = FileTitle;
OpenFile->nMaxFileTitle = 200;
OpenFile->lpstrInitialDir = "C:\\";
OpenFile->lpstrTitle = "Open";
OpenFile->Flags = OFN_READONLY;
NotCancel = GetOpenFileName(OpenFile);
Thank you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|