Directory Open

Hi,

I would like to create a Button which opens a dialog box, 
not to open a file but to open a directory.

How should I do it?
I thought of using CFileDialog but it does not allow for 
opening just a directory and not a file.
I just want to read in the user selection of directory and 
the file name will be set in my application.

Thanks!

0
anonymous (74718)
12/18/2003 6:15:36 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
960 Views

Similar Articles

[PageSpeed] 49

On Wed, 17 Dec 2003 22:15:36 -0800, Dave wrote:

> I would like to create a Button which opens a dialog box, 
> not to open a file but to open a directory.
> 
> How should I do it?
> I thought of using CFileDialog but it does not allow for 
> opening just a directory and not a file.
> I just want to read in the user selection of directory and 
> the file name will be set in my application.

Use the following: http://www.codeproject.com/dialog/CFolderDialog.asp

 Cheers, Dirk
0
12/18/2003 7:40:54 AM
>I would like to create a Button which opens a dialog box, 
>not to open a file but to open a directory.
>
>How should I do it?

SHBrowseForFolder.

Dave
-- 
MVP VC++ FAQ: http://www.mvps.org/vcfaq
0
davidl (420)
12/18/2003 7:46:08 AM
Take a look at SHBrowseForFolder()

-- 
Bjarne Nielsen

"Dave" <anonymous@discussions.microsoft.com> skrev i en meddelelse
news:03a401c3c52e$5a01a2d0$a101280a@phx.gbl...
> Hi,
>
> I would like to create a Button which opens a dialog box,
> not to open a file but to open a directory.
>
> How should I do it?
> I thought of using CFileDialog but it does not allow for
> opening just a directory and not a file.
> I just want to read in the user selection of directory and
> the file name will be set in my application.
>
> Thanks!
>


0
12/18/2003 7:48:37 AM
Reply:

Similar Artilces:

Opening JPG attachments
Lately I have been having problems opening attachments with jpg images. I have checked and double-checked my file associations and everything appears correct. When I attempt to open a jpg attachment, that box appears asking me if I want to open the attachment or save it to my hard disk. I don't remember that happening in the past. The jpg attachment would always open up in whatever photo program I had it defaulted to. Any suggestions? Thanks ...

Cannot open attachments
I'm running Office 97 and when I try to open an excel attachment in Outlook I get the error message in Excel saying "The system cannot find the file specified" I ahve gone to the options and 'Ignore other applications' is ticked, I have ran the excel.exe /unregserver and /regserver command and reticked 'Ignore other applications', but still the same problem. Any ideas would be grateful. All I can suggest is you try saving the attachments first- it could b xl can't "see" the outlook file. If you want more help you might want to try the outlo...

can't open email attachment in earthlink with office 2007 trial ve
New to pc's. I'm a mac-er. Bought a backup pc. downloaded the free 60 day office 2007 trial for Vista. I can open MS word but can't open a MS word document that comes as an attachment in earthlink. It's a bit of an emergency and of course, Gateway says call Microsoft who says they dont offer support for the free trial and to find it here. I've looked and don't see the answer. Thank you, pc'ers. Mhughu Sorry, but this newsgroup is for questions about Access, the database product that's part of Office Professional. You'd be best off reposting yo...

IE keep saying "Opening page..." for ActiveX with async property
I tried posting this question to microsoft.public.vc.mfcole, but apparently that is an area only suitable for getting answers to simplistic questions. I've not gotten one response for questions I've posted there. I'm hoping there is some knowledgeable, sharing guru in this area that can help... I have a problem that is related to having an asynchronous property in a an ActiveX control that is used on a web page. If you build the MFC ActiveX Control App Wizard project and put it on a page, no problem--IE will load up and the "Opening page..." message wil...

Active Directory problems
I tried to create a new user for a new member of staff and up until now it has been fine but now I create the account using active directories and users but when I login to set this new users outlook it cannot find the name and it looks like it has not created it at all but when creating this user it said it would also create an exchange mailbox but it didn't. PLEASE HELP!!! See if this helps: http://support.microsoft.com/kb/297801/en-us Nue "hannab2005" <hannab2005@discussions.microsoft.com> wrote in message news:600BAAAF-CF9B-4E77-A459-87D1BCDC8D92@microsoft.co...

Unable to obtain DNS hostname of Active Directory domain controlle
Hi , I am trying to use deployment Manager to upgrade trial license but whenever i am running Deployment Manager i get error Unable to obtain DNS hostname of Active Directory domain controller, I am using Full Domain Admin right for CRM Admin user, i done repair install without any issue but still having the same error, CRM server and SQL databases are install on the same server. There is no firewall installed. The server details are the following, Server = 2003 R2 SQL 2005 with SP2 CRM Server 4 Thanks Shakil Error on Deployment Manager. Server stack trace: at System.Directory...

UGH! Trouble downloading, and opening anything
Please can someone help I am running MS XP2, and have had NO trouble getting updates or any downloads before, I downloaded the MS baseline security analyzer 2 nights ago, and now I have major trouble downloading(it keeps telling me my ACTIVEX control is not enabled, But I did enabled it and restarted my computer, I have to download my item without the ACTIVEX. I extract it and open Excel, and it tells me that it cannot read the file!! Is there a way to get ACTIVEX's downloaded if the ones that already have aren't working right? And, How can I fix the downloading and opening probl...

can't open excel
my excel won't start. i get the error message "a required .DLL file, MS097.DLL, was not found". how can i fix this problem? thanks in advance. Reinstalling Office/Excel should install any missing files. -- Jim Rech Excel MVP ...

Set value in a query when opening a form
I have in a database an append query which has a Yes/No field Append. The query appends only those records where the Append field value is set to No (0). In the OnOpen event of a form, I want to first run the append query to add any new records, then set the value of the Append field to Yes (-1), then finish opening or loading the form. How can I do this programmaticaly? Ivor Ivor: You can do this using DAO. In the VBA editor, open the Tools menu, select References, and, in the References dialog, select Microsoft DAO 3.6. Close the References dialog. In the database window, create ...

LPAD Directory
I just upgraded from Outlook 2000 to 2002 and the LPAD Directory with user name/password comes up and user name says Null. Why does this do this. I have been pressing cancel. I have received but am having trouble sending mail. Any ideas how to bypass the LPAD thing. Are you using an LDAP directory for address lookup? If not, then use the Tools-Email accounts-Directories-View or Change to delete this option. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the Swen virus, all e-mails sent to my actual account will be deleted w/out r...

Toubles with installing Security Groups for Active Directory
I have tried to run through the setup installation for CRM 3.0 on our Windows 2003 server, which hosts our Domain Controller. I am logged in as a Domain Administrator. I get an error during the prerequite setup, explaining that the security groups do not exist or have not be created. I thought that the setup would create the security groups. I have tried everything and don't know where I am going wrong. I have looked at article number 908984, and have tried to create a new config_precreate.xml file to work off and have even created the security groups at the root level of our a...

Mac OSX How to open a .pub image.
I received an image in the .pub file format from a non-computer literate person. In what program can I open it, or to what program can I import it to - being on Mac OSX 10.3.9 as I am? Thanks! --Doc. On 7/15/05 6:30 PM, in article BEFDB139.E017%drcocktail@bigfoot.com, "DrCocktail" <drcocktail@bigfoot.com> wrote: > I received an image in the .pub file format from a non-computer literate > person. In what program can I open it, or to what program can I import it to > - being on Mac OSX 10.3.9 as I am? It won't open in anything on the Mac. It needs Microsoft Pu...

Problem Opening Excel 2007
Hello, After installing my Excel 2007, I encountered a quite strange problem : Opening a new document has actually no problem but ! if I open an existing Excel file nothing happens, I see no sheet. I need to double-click on the file (or minimize the window) to make my sheet appear. I've already checked in the Office or xlStartups : there was nothing in it... Allready repaired, un/installed Excel... There's nothing to do. That is why I've turned to you. Thanks for any suggestions. Best regards. Lots of people have complained that when they doubleclick on a file in windows exp...

Using Reporting Services with Active Directory
Does anyone have a link to a good document that explains how to do this? I can seem to find one. thanks OriginalStealth Can you explain what are you trying to achive? "OriginalStealth" <OriginalStealth@discussions.microsoft.com> wrote in message news:512AC6B9-8FBC-42AC-A57D-94071C1AAED9@microsoft.com... > Does anyone have a link to a good document that explains how to do this? > I > can seem to find one. > > thanks ...

Open A Record from a ListBox in Another Form
Hi I have a form name FrmDrVoucher. In this form i have a Button Name BtnOpen. by pressing this a new form opens with a listBox which have all the DrVouchers save by this form. Now plz tell me that how can I open a record in th form DrVoucher by Dbl Click. Thank you -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201001/1 Hi, Does the listbox include the primary key. If so, in the DoubleClk event, you could try something like: DoCmd.OpenForm "FormName", , , "[PrimaryKeyFieldName]=" & Me....

can't open mny2005 file in MSmoney2008
I'm at my wits end! could anyone please help??here is my problem. I have been using money since 6.0 (1998). Every year i have been creating new seperate files. 98,99,2000.2001,2002,2003 etc. I have since upgraded to MSMONEY 2005 (14.0.120.xxxx) which is the US version. We had to format the computer because of a crash. Fortunately, we backup the mny files. We were able to open ALL the files in MSMONEY 2005 (thus being able to convert them to the MNY2005 version). As microsoft is ending production of MSMONEY we decided to move to QUICKEN. Knowing there is a built-i...

Global Address Book as a Company Directory
My users are screaming for a company directory (name, location, phones, manager, reports to, etc). When viewing the Global Address Book there is no way to get anything meaningful from this list. You cannot sort, and by default it is displayed by name. What can I do to make the data from the Global Address Book have a more meaningful and useful purpose? And please don't point me to SharePoint, we've tried it and well ... let's just not go there. You will need to evaluate the 3rd party app space......see http://www.webactivedirectory.com/ for one possibility. "ia...

Parsing directories
Thank you to all who helped with the "Select Directory" dialog. I'm now faced with a new problem that I should have forseen. How do I get all of the file names in this directory (where the path is represented as a CString)? Sorry if this isn't an MFC question. Thanks, -Mike- Look at the splitpath function. AliR. "Debaser" <guest@unknown.com> wrote in message news:hg9k11h2r2fv64rrsfghp1f40vm6al0cb5@4ax.com... > Thank you to all who helped with the "Select Directory" dialog. I'm > now faced with a new problem that I should have forseen. ...

Excel2002 crashing when opening the pivot table
Excel 2002 crashes when I open the file having pivot table. Excel 2002 goes down in processing of showing "Pivot table field list". Please help me if you resolve the problem like that. Thanks. ...

Access database file open read only from window 2003 server
some users has read only access and some user has read and write access using window 2003 security. On Wed, 20 Feb 2008 10:21:02 -0800, iqbal <iqbal@discussions.microsoft.com> wrote: >some users has read only access and some user has read and write access using >window 2003 security. Do you have a question, Iqbal? -- John W. Vinson [MVP] ...

Messages awaiting directory lookup
Hi PLEASE assit. We are running a mixed 2003 and 2000 domain and exchange environment. I have two DC's per site, and one GC per site, all are operational and are working. However, messages are queuing in the "awaiting directory lookup" queue in exchange. I ahve rebuilt the GC, the DNS is responding correctly, but this is happening and there is nothing else in the eventlog. All SP's and hotfixes have been applied... Please assist http://support.microsoft.com/default.aspx?scid=kb;en-%20us;823489&Product=exch2k On Mon, 6 Sep 2004 03:59:15 -0700, "scott" &...

Workbook not opening properly
I have a great deal of important data that I use on a daily basis stored in an excel file which will not open properly for me. When I open the file it comes up with the following error message: Microsoft Excel has encountered a problem and needs to close. We are sorry for the inconvenience. Then the worksheet restarts and the same error message appears a second time. I close this error message and it restarts again but with the formatting missing and all the data mixed into an unintelligible mass including data from other worksheets that are in that workbook. I realise that I should have ma...

Application Directory (Proj Directory)
NOBODY posted a link to an FTP example that I'm currently looking at. This is it: http://support.microsoft.com/kb/175179/EN-US/ The file to download and extract files from is VBFTP.exe. I extracted these files into a folder called VBFTP. I then opened the project from within that directory and attempted to run the program. It comes up with an error '53' that 'open.bmp' cannot be found. When I look in the directory, it is right there. The code is below. It stops at... Set imgI = ImageList1.ListImages.Add(, "open", LoadPicture("open...

Opening forwarded emails
I couldn't find an answer anywhere on the internet, so maybe I just messed something up, but whenever someone forwards me an email as an attachment instead of inline, I can't open the forwarded message. I've tried saving the forwarded ".eml" and setting it to open with WLM, but that doesn't work. I can open it with other mail clients and even text editors, but for some reason, opening with WLM just launches WLM if it hasn't already opened and won't display the email. Any ideas? eml viewer http://www.brothersoft.com/downloads/eml-viewer.ht...

Active Directory & LDAP Directory
Import a list of email from ATT and cannot get rid of Active Directory. When I compose a new message and go to retrieve a address I receive the popup message "Can't contact LDAP Directory server (81)". Getting on my nerves. Any idea's. I tried everything and even Detect and Repair via the Help. If you don't connect to a LDAP you can remove it by going into Tools > Email Accounts > view or change existing directories or address books > highlight the LDAP and remove. "Bernie" <anonymous@discussions.microsoft.com> wrote in message news:0E7244EB-B...