|
-
March 31st, 1999, 10:06 AM
#1
changing initial search directory
Hello. I have a button that upon pushing it, it opens a dialog box so a user can open a file. How can I specify in the code where I want the initial directory to start from? The files that go with the application are always in the same directory and I want to be able to specify this directory when the user first clicks on the button to open the file dialog box. THanks.
-
April 23rd, 1999, 04:06 AM
#2
Re: changing initial search directory
Hi,
I suppose you are using CFileDialog class to do this, so:
CFileDialog MyOpenFileDialog (//parameters for constructor...//);
LPCTSTR MyPath = "c:\\MyFolder\\";
MyOpenFileDialog.m_ofn.lpstrInitialDir = MyPath;
MyOpenFileDialog.DoModal();
Hope it wil be useful.
Kepa Metola
-
April 23rd, 1999, 04:16 AM
#3
Re: changing initial search directory
Try SetCurrentDirectory(...)
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
|