Display selected folder.


   I'm creating a dialog box for user to choose a folder.  I'm using the
SHGetSpecialFolderLocation and other related functions.  I would like to
know how to select a default folder when the dialog box is called, so that
the user doesn't need to go through the whole directory tree to find a
particular folder.



leoleong1 (18)
10/22/2003 6:06:32 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 39

>   I'm creating a dialog box for user to choose a folder.  I'm using the
>SHGetSpecialFolderLocation and other related functions.  I would like to
>know how to select a default folder when the dialog box is called, so that
>the user doesn't need to go through the whole directory tree to find a
>particular folder.


I presume you're using SHBrowseForFolder.

Have a look at Knowledge Base article 179378 "HOWTO: Browse for
Folders from the Current Directory".

MVP VC++ FAQ: http://www.mvps.org/vcfaq
davidl (420)
10/22/2003 8:38:56 AM

Similar Artilces:

Dual Displays
I want to connect my Sharp Aquos flat screen TV to my computer, and see my desktop on both the TV and computer monitor. Windows Vista Home Premium. HP Pavilion a1610n computer. Galaxy GeForce 8400 GS graphics card, outputs: 1-VGA, 1-DVI, and 1-SVGA. There is no HDMI port on the card. I connected a VGA cable between the motherboard "on-board" VGA port and the TV, figuring that I could use that output to work with the TV. The computer monitor is plugged into the GeForce graphics card. Tried the Desktop "Display Setting". It says, the number 2 monitor is "N...

view of folders created
Using winxp, outlook 2002. I have created folders under my inbox to organize emails. When I set up my view I would like it to be the default for all of the folders under my inbox. for example, if i select the field received to be shown i want it to show in all the folders i created by applying this view. What i do now is i have to go to every individual folder and change the view. i have tried define views and apply view, could it be that we have to go into every folder. thanks. ...

Vba code cannot select text pasted from .txt file
The data I'm working with is from a .txt file which was created by exporting a .pdf to a text file. I copy all of the text from the .txt file and paste it into a column in Excel. When trying to reference any column, row, or range on the sheet with the pasted text, I get the following error: Run-time error '1004': Application-defined or object-defined error. Sample code: Sheets("Sheet5").Select ' <this works fine Columns("A:A").Select ' <this gets the error I've tried pasting the text with other paste special options. I'v...

Display a message box "this entry is a duplicate"
How can I display a message box on a form if the shipment number is a duplicate? I need a message box to pop up when user attempts to tab out of the field. Thank you. Something like: Private Sub txtShipNum_BeforeUpdate(Cancel As Integer) If DCount("*", "MyTable", "ShipNum = '" & Me.txtShipNum & "'") > 0 Then Msgbox Me.txtShipNum & " already exists." Cancel = True End If End Sub This assumes that your text box is named txtShipNum, that the name of the field in table MyTable is ShipNum...

Folder could not be displayed
I am running Windows XP and Outlook Express 6 just fine then one day my husband does something to my computer and his email account won't work. My email is working just fine but in his he cannot open his inbox. It says folder could not be displayed, and when you send and receive it gives you this error message: "An unknown error has occured. Account: 'incoming.verizon.net'. Server:'incoming.verizon.net'.Protocol:POP3, port: 110, Secure(SSL): No, error number: 0x800C013B" If anyone could help me with this I would greatly appreciate it. Thank you T...

how to display values in 3 cells into one cell
Anyone can help me how do I display the 3 separate different values in 3 cells into just one single cell ? thanks so much in advance. Either there was a typo or there's an echo in here. That line should have been: = A1 & " " & B1 & " " & C1 "Bradley Dawson" <bradleydawson@earthlink.net> wrote in message news:l464b.2224$Lk5.2093@newsread3.news.pas.earthlink.net... > In the target cell, type: > > = A1 & B1 & C1 > > where A1, B1, C1 are the cell addresses that you want to concatenate. > > If these have number...

mail enabled public folder #2
I have created a public folder and mail enabled, I have also made sure that anonymous has contributor permission. However, I cannot send emails to this public folder from an external domain. Internal is OK, anyone have any ideas What's the text of the NDR? kevin wells wrote: > I have created a public folder and mail enabled, I have > also made sure that anonymous has contributor permission. > > However, I cannot send emails to this public folder from > an external domain. Internal is OK, > > anyone have any ideas "Default" must also have contri...

Display Time in Outlook
The time setting in my Outlook is one hour behind my actual time. I cannot determine how to change the time. Outlook is the only item that is incorrect. Other display times in operating system are correct. Thanks, Jodi ...

Unable to open default folders #2
Mail was working fine until I tried to merge documents using to print labels. Now when I try to open out I get the message: Unable to open default e-mail folders.....do not have access to file xxx/xxx/outlook.pst How can I recover this file. It seems to have vanished. If you're using Windows 2000 or XP, the .PST file may be in a hidden or system folder. When searching for all .PST files, make sure you've enabled searching within hidden and system folders. -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the new...

How to select & display distinct values
Hello, I need help with a form please. My form has two controls, the first being a combo box. This box should select the company name from a lookup table. The lookup table has only two companies in it, however, they each are repeated several time. Company 1 has about 10 rows, company 2 has 3 rows. I used the query builder and came up with the statement: "SELECT DISTINCT Lktbl_Role_Master.CompanyName FROM Lktbl_Role_Master;" When I run the statement directly from query view, it executes perfectly and returns exactly two rows (one for each company, in a datasheet view) ho...

PK and FK Displayed
I am a complete Visio newbie, and cannot find the answer I need in books or online help. I am trying to create ER diagrams from scratch, and not connected to real tables, using VEA. I have added tables ('Entities') to the form, connected them with a Relationship connector, and, in the Database Properties window I've assigned the end points to a Primary Key on the left and a Foreign Key on the right. But the model shows the connector as running between the top colums on both sides, whereas I want the keys to be in that upper box and provide the connector's end points. Wh...

Clicking on Contacts folder crashes outlook
Every time I click on the contacts folder in Outlook 2002, a window appear saying that it has encountered a problem and has to close. It sends an error report to MSN but it does not suggest any solution apart from upgrade to the latest version, which I have done. There seems to be some corruption but I cannot find a way to resolve it - Can anyone help Thanks Garry ...

Formulas are displayed, results are not
Hello, For some reason, when I enter a formula into a cell and press enter, the formula just stays there. Anyone know what I can do to show the results? I tried pressing Cntrl + `, but that didn't work. FYI, when I cut and paste a column from a separate workbook, that column works like normal (i.e., the formulas produce results). Thanks for any suggestions! Hi Mike, Maybe your cell is preformatted as Text. Try formatting to general then erase your = and type it in again. HTH Martin "Mike C" <js2k111@yahoo.com> wrote in message news:f699bcd4-ad82-4a88-9759-5638c147b...

How do I shade a region between two selected points on the x axis?
In a line graph of monthly unemployment rates over many years, economists like to shade a region between 2 selected months (x axis) in order to denote a recsession. How can this be done in an Excel chart? Hello: I am sure that someone very cleaver will tell you there is an automated way to do this. But given the irregular nature of the data, and not frequently the easiest way to do it would be to dislay the drawing toolbar. Now choose the rectangle shape and draw the area you want high lighted. Once you have the area you want covered, right click the rectangle and choose format autosh...

Outlook Personal Folder Location
Hi, I have installed Outlook 2007 in "C" Drive.I want to change my Outllok mail (Inbox, Outbox) Storage location in "D" Drive. is it Possible to do it. Please help. Close Outlook. Cut the outlook.pst file and paste it where you want. Open Outlook and when it complains, point it to the new location. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. ALWAYS post your Outlook version. How to ask a question: http://support.microsoft.com/KB/555375 After furious head scratching, Verma asked: | Hi, | I have installed Outlook 20...

Stop displaying a line
I have a line graph/chart and it gets its values using a formula and the values of another column. However this poses a problem because if there is nothing in the targetted column the formula returns 0 cause the line to drop to the bottom, instead of casuing the line to just end until a value is added to the target column. How can I do this? Change your formula to use NA() if the cell is empty. For example: =IF(A1="",NA(),A1) To hide the resulting #N/A errors on the worksheet, you can use conditional formatting. There are instructions here: http://www.contextures.com/xlC...

unattached textboxes disappear when a msgbox is displayed on a tab control
I'm using Access 2003. I have a form with a tab control on it. I was having problems with labels flashing and I followed the suggesting from Allen Browne - http://allenbrowne.com/ser-46.html. The flashing went away but now when a msgbox is displayed the unattached textboxes that I'm using as labels disappear. They come back as soon as the msgbox is removed from the screen. I've searched google looking for an answer but have come up short. Does anyone know why I'm experiencing this behavior and how to make it go away? Thanks, Rick That *is* strange. Have you tr...

A question about Console window(display or not display)
I've redirected the (stdin stdout stderr) of a console window process I spawned to a pipe. And I want to display the redirected console window, the question is: If I display it(set Create_new_CONSOLE in createprocess and some flags in startupinfo), I cannot use the redirected way of pipe, which means if i do not display, i can use the pipe communicating with the child process. Does it mean that as long as I disply the console window, windows will change stdin stdout to "screen&keyboard" instead of my pipe? That's right. If you redirect stdin or stdout then you preemp...

Saving excel to network folder
The file "filename.xls" may have been changed by another user since you last saved it. In that case, what do you want to do save a copy or overwrite changes This is the error message we are receiving in Excel 2002 only. We are saving the file on our network shared folder (network is NT4 server) we also have MAC volume services on this folder because it is also seen on the MAC. Any suggestions. We are not changing the file by another user we can change the file 1 minute after first saving it and it still pops up with the message HELP! ...

Move all replicas in SP2 will move system folders too?
Hi all, Will move all replicas in SP2 move system folders such as offline address book and organizational forms too? I am going to retire the exchange 2000 server and rehome public folder on the new exchange 2003 SP2 server. Thanks for your input. pfmigrate with the /SF switch will move system folders "Peter" <Peter@discussions.microsoft.com> wrote in message news:B2A649D4-1F19-48E5-A20A-4D0155963866@microsoft.com... > Hi all, > > Will move all replicas in SP2 move system folders such as offline address > book and organizational forms too? I am going to r...

Axis not highlighting when viewing selections
Hello! When using Office 2003, we are experiencing a problem with excel graphs. When viewing the source data, I select a series. Then choose the X Values, it WILL show the selected values. I then close out of that which takes me back to the Source data, I then choose the Y Values. This does NOT show the selected values. I tried going directly to the Y Values first on another series, and it appears that whichever axis is selected first will show, the second will not. This is a major hassle when you are dealing with complicated graphs that contain many many rows and several diff...

More than one cell is selected when I left click. Why?
I have an Excel 2007 worksheet. When I left click on a cell, instead of that cell having a box around it, the selection box is around that cell and 5 others under it. And when I try to select a row, that row and five below it are selected. How do I fix this? I'm betting that you have merged some cells. This gives the appearance of a giant cell. Rightclick on that cell Format|cells|alignment tab|uncheck merge (select all the cells on the worksheet first to get get rid of all these merged cells) womusic wrote: > > I have an Excel 2007 worksheet. When I left click on a cell,...

How to default the "From:" value when replying to email in public folders
Does anyone know if it's possible to configure an exchange 2003 public folder to automatically fill in the FROM: field when replying to email sent to a public folder. For example, i've created a public folder to receive all mail sent to support@domain.com. Regardless of which support staff member replies to email in that folder, i want the FROM: field to automatically appear as support@domain.com - not the support persons personal email address. I know that if i leave it up to the support staff to manually change the FROM: field, they'll forget to do that. Thanks. p.s. assume ...

OL2K can't kill Personal Folders...?
Howdy, I can't seem to remove a set of Personal Folders from the folder tree in OL2K SP3. Here's the situation: I travel with a notebook. I run OL on it. After a few days, I copied its (new, and thus very small) PST file to my desktop system. I added the new PST in Tools | Services so that at that point I had two sets of Personal Folders displayed in the tree. I then copied messages from the small PST to the larger PST that my desktop ordinarily uses. When that was done, I went back into Tools | Services to remove the PST that I no longer needed. With that completed, I was surpri...

Select column range in VB?
Hi - I am using MS XL 2002 and I have created a macro that inputs data to a specific cell. I want the macro to input this data in a range of cells; the data should be input into all the same row cells in column A, providing there is data in the same rows in Column B. For example, it should look at column B, realize that there is data in all cells B2:B121 and input the data into cells A2:A121 I am not concerned with the inputting of the data, it is specifying the range of cells to be affected that I am having trouble with. Hope that is clear enough...... Thanks! Alan Sub demo() Dim r As...