I used this: (works)
#include <commdlg.h> //didn't check for libs, I think you need something
like windlg32.lib
const int MaxPath = 1024;
char file[MaxPath];
char filetitle[256];
OPENFILENAME ofn;
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = hwnd;
ofn.lpstrFilter = "Type of Files being opened\0*.EXT\0\0";
//(do multiple extensions like this: "....\0*.EX1\0*.EX2\0\0"
ofn.lpstrFile = file;
ofn.lpstrFileTitle = filetitle;
ofn.nMaxFile = MaxPath;
ofn.nMaxFileTitle = 256;
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST |
OFN_HIDEREADONLY | OFN_NOREADONLYRETURN | OFN_PATHMUSTEXIST; //see previous
email
ofn.lpstrDefExt = "sav"; //extension to add if user doesn't
type one
if(GetOpenFileName(&ofn)) //if opening file works
{
NameOfVariableToHaveFileTitle = filetitle;
Etc. etc..l..
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Christian
Wallukat
Sent: Tuesday, 7 August 2001 9:54 PM
To: 'dev...@li...'
Subject: AW: [Dev-C++] Create DialogBox on demand
Hi,
i know about the function, but how can i execute this func ???
Did you have a short example ???
Best Regards C
-----Ursprüngliche Nachricht-----
Von: Bruno Berteau [mailto:bbe...@cl...]
Gesendet: Montag, 6. August 2001 23:37
An: dev...@li...
Betreff: Re: [Dev-C++] Create DialogBox on demand
Hi,
The GetOpenFilename function is what your looking for.
Diese Mail wurde auf Viren überprüft.
This mail was checked for virusses.
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|