SHBrowseForFolder(&bi) How do I set the initial directory

As the subject says how do I Open up the directoy tree to an initial directory?

5/10/2007 9:12:00 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 7

>As the subject says how do I Open up the directoy tree to an initial directory?

Here's an old example that's been posted on the newsgroups before:

Use a callback, and respond to BFFM_INITIALIZED by sending a
BFFM_SETSELECTION message with the directory you want.

  //  SetSelProc
  //  Callback procedure to set the initial selection of the browser.
  int CALLBACK SetSelProc( HWND hWnd, UINT uMsg, LPARAM lParam, LPARAM
lpData )
      if (uMsg==BFFM_INITIALIZED) {
          ::SendMessage(hWnd, BFFM_SETSELECTION, TRUE, lpData );
      return 0;

  void MyFunc(void)
    CString initial = "C:\\WINDOWS\\SYSTEM";
    //... set everything the way you want it and...
    bi.lpfn = SetSelProc;
    bi.lParam = (LPARAM)(LPCSTR) initial;
    ITEMIDLIST * item_list =  ::SHBrowseForFolder(&bi);
    // etc...

davidl7375 (2060)
5/10/2007 11:13:16 PM
This class may work for you as well:


"Nigel in the aerospace buisness" 
<> wrote in message
> As the subject says how do I Open up the directoy tree to an initial 
> directory?
> Thanks 

tom.nospam (3240)
5/10/2007 11:53:41 PM
On Thu, 10 May 2007 14:12:00 -0700, Nigel in the aerospace buisness

>As the subject says how do I Open up the directoy tree to an initial directory?

Worked example:

Bob Moore
(this is a non-commercial site and does not accept advertising)
Do not reply via email unless specifically requested to do so.
Unsolicited email is NOT welcome and will go unanswered.
5/11/2007 11:14:34 PM

Similar Artilces:

inserting bi-fold door
i draw a wall x length then drag a bi fold door to end of wall when attached to wall the wall becomes shorter if i make wall longer door is accepted what am i doing wrong On Thu, 15 Oct 2009 18:46:01 -0700, Dom <> wrote: >i draw a wall x length then drag a bi fold door to end of wall when >attached to wall the wall becomes shorter if i make wall longer door is >accepted what am i doing wrong Seems ok here Dom, which version of Visio are you using? N.B. doors are supposed to be dropped onto walls, not a...

Hi, I have started to use DPM2010RC to backup our servers at work and intend to purchase the full version when it's RTM. As for the problem.. I have setup a custom recovery goal (daily with a retention of one week), and a secondary goal of weekly with a retention of one month. The idea being there is a backup Monday to Friday (which will be overwritten the following week) and then the weekly backup takes place on the Friday (a set of 5 Friday tapes) giving us a months worth of retention in total. It's the Backup Schedule that's the problem. The default setting is to backup...

Public Folder Propagate Settings question
In reading through the Exchange documentation on public folder replication and public folder moving to other servers in the site, there is a reference to going to the public folder top level, and clicking on "propagate settings". What it doesn't clarify is, if you have already established MAPI permissions on some sub-folders, and have already established NTFS security settings on some other sub-folders, will these permissions be overwritten with the propagated top level values? I want to replicate all my public folders to another server in the site without having to enable rep...

Setting "Out Of Office"
Hello, How do we set "Out Of Office" for a outlook with more than 4 inbox? We need to set only 1 of the mailbox to be "Out Of Office"? The rest of the 3 mailbox can still received external mail without sending out "Out of office" As fast as i know, this col of mine has to select the profile she wants before getting into the mailbox. Pls advise how i should got about doing an "Out of office" for her mailbox only. Thanks. ------------------------------------------------ ~~ Message posted from ~~View and post usenet messages dir...

The Same Set of Folders?
I have ten email accounts in WLM. Can I have them download to the same set of folders? This is a multi-part message in MIME format. ------=_NextPart_000_0075_01CA97CA.0C879300 Content-Type: text/plain; charset="Utf-8" Content-Transfer-Encoding: quoted-printable Directly no. WLM does have two methods to accomplish(almost) your request Enable Quick Views(View/Layout/Folder Pane) - right click Quick View icon in left pane and ensure All Inbox is = enabled or If accounts are all pop3, create a rule to move messages after receipt = to on one common folder. ...

How do I set a date function for previous monthend?
I know you can create a =NOW() function to give a date stamp to a file. Is it also possible to have excel return the previous monthend date? Try: =EOMONTH(TODAY(),-1) This function is part of the Analysis ToolPak add-in. If you do not click Tools, and then click Add-ins to install and enable the Analysis ToolPak add-in, the formula will return a #VALUE error. You will also receive a #VALUE error if either of the function arguments is nonnumeric. "JDP289" wrote: > I know you can create a =NOW() function to give a date stamp to a file. Is it > also possible to have exce...

Outlook 2003 folder / view settings
Does anyone know of a way to copy the formatting & display features of a given folder to another existing folder? For example - let's assume that I have a folder with a given number of fields displayed such as... * Importance * Attachment * From * Subject * Received * Size * Flag Status Lest's also assume that I have taken the time to alter the column formats such as width, alignment, etc. Is there any way to essentially copy these settings to another existing folder? Thanks for your assistance... Rich Gory <> wrote: > Does anyone know of a w...

time setting is messed up
Hi, We installed Office 2003 for several users with Exchange 2000. Their e-mails are stamped one hour behind the standard local time. Other users who are using OfficeXP are fine.Server time and PC times are set correctly. Any clue??? is there a special setting in Oulook 2003 that we didn't have in the previous versions? Please help... Thanks Check whether DST is properly configured as well. -- Robert Sparnaaij [MVP-Outlook] Tips of the month: -Navigation Pane Tips & Tricks -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "webmaster&qu...

Set height of form?
I'm new to Access VBA. I'm trying to set the height of the form when it loads. I have controls farther down, but I don't want the form to show everything unless the user needs those other controls. I set CanGrow to No and put in this code: Private Sub Form_Load() Me.Detail.Height = 1440 End Sub But the form loads with its full height displayed. How can I accomplish this? Ed Hi Ed, Try using DoCmd.MoveSize If you put the cursor in MoveSize and press F1, the help will explain what to do. Jeanette Cunningham "Ed from AZ" <> wro...

Set up a dynamic worksheet
How do I set up a dynamic worksheet in Excel that contains all information in the other worksheets? ...

I want to set the pidlRoot member of the BROWSEINFO structure to a default location. How do I get a PIDL from a path represented by a text string like this: _T("C:\Program Files")? Thanks I'm not certain about the pidl for an arbitrarily named folder, but if your real interest is the "Program Files" folder, then you shouldn't use a text string anyway, since the text is user-selectable and in fact changes based on language locales. For "Program Files" and other special folders, you can get the pidl using the SHGetFolderLocation function, passing in a CS...

Outlook Security Settings #3
Hi can anybody give me an idea on how to suppress the outlook security settings to just allow any email with attachment to be sent in behalf of me. its the outlook feature that says a "program is trying to send an e mail in behalf of you" and will just respond to YES right away. thanks very much... -- JamesRussel Cebu See for your options with regard to = the "object model guard" security in Outlook 2000 SP2 and later = versions.=20 --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.tur...

Propagating permission settings for public folders.
Hi, I understand that if you had created a public folder and set permissions to it, the settings will be propagated to subfolders created after it. However if I make any permission setting changes to the main folder, the sub folders will still retain that initial permission setting. Is there any way to propagate the permission settings to the sub folders? Regards, X use pfdavadmin. -- Diane Poremsky [MVP - Outlook] Outlook Tips:

Need formula to calculate bi-monthly pay dates
I need to create a list or table that returns all pay dates for the 15th and last day of the month for an entire year. The date must adjust forward when the normal pay date falls on a weekend or holiday, e.g. the 15th is Sunday so pay day is the 12th. My attempts have resulted in excessive formulas and no concrete answer. Do you need to account for holidays? This formula works but I don't account for holidays although it'd be easy enough to do so. I'm thinking some "date wizard" (a person that is good at date formulas, that's not me!) can probably ...

Setting a dynamic range in a formula
Hi, I have a column of numbers and I always want the following arra formula to use the last 12 entries: =(PRODUCT(1+D1:D12/100)-1)*100 Any suggestions? Thanks, Phillycheese -- Phillycheese ----------------------------------------------------------------------- Phillycheese5's Profile: View this thread: Assuming that Column D contains no blanks, try... =(PRODUCT(1+OFFSET(D1,MAX(0,COUNTA(D:D)-12),0,12,1)/100)-1)*100 ...confirmed with CONTROL+SHIFT+ENTER. Hope th...

How do I set up S-curve
Hello Everybody, I have a data in Excel 2003, What I want is to create a curve using that data. My question is, is it possible to have the curve from Jan-2009 to Dec-2009 if my value is from Jan-2009, Feb-2009, Mar-2009 & Apr-2009 is 100, 150, 200 & 250 successively but from May to Dec-2009 are all zero. However, I need the surve to be shown up to Apr-2009 only even the series ranges up to Dec-2009. How can I do this? Any help please. Thanks. Regards, Arnold Make sure that the series that you are plotting includes NA() where data is missing, instead of zero. -- David Biddul...

Documenting/Comparing Office 2003 settings
My company recently merged with another company. I've been tasked with comparing the Office 2003 settings from each company so we can create a standard build going forward. One company used an MST file to apply settings during the install. The other company captured most information in an OPS file and passed that to the CIW. I've used the ORK viewers to generate dumps of both MST files as well as OPS files. Unfortunately, the MST file and OPS formats are completely different. Is there a way to compare the two? The best method I've found thus far is to take t...

Outlook 2003 Settings Client/Server
Hi, I wanted to know specifically what settings in Outlook 2003 lik whether the reading pane is turned on or off on a particular folder ar store on the Exchange Server or the local client. When I log ont another machine and create my outlook profile, it seems to store t keep the reading pane settings I configured on the previous computer was using. Thank ----------------------------------------------- ~~ Message posted from ~~View and post usenet messages directly from ...

File As setting
Using the sharedFax on our windows server, how do I see the company name instead of the First and Last name when I try to fax someone. I am using Outlook 2000. If anyone knows of any plug-ins please advise. Specify your Fax software more clearly and what repository it is using for fax addresses. The Outlook Address Book can be configured to sort by your File As field. Is your File As field configured to show the company name? -- Russ Valentine [MVP-Outlook] "Pall" <> wrote in message news:1e64f01c4555f$9a5a4dc0$a101280a@phx.gbl... > U...

SHBrowseForFolder Subclassing.
I would like to change the name of the "cancel" button. Is that possible with Subclassing, Superclassing, etc.? ....Bruce Maybe this article can help you: -- Mav Rossi "Bruce Arnold" <b_a_r_n_o_l_d@b_l_a_s_t.n_e_t> ha scritto nel messaggio > I would like to change the name of the "cancel" button. Is that > possible with Subclassing, Superclassing, etc.? > ...Bruce > > And this too:

SHBrowseForFolder question
Ok, I managed to get SHBrowseForFolder to work and it pops up its dialog box, but I would like to be able to use the info in a drop down combobox integrated into my dialog form. Is there a way to do this. What I have is a combobox that I want to show and select the path in, then a list box to display the files, and another combobox to select which drive. I have a specific reason to do it this way and I was wondering if I can use some of the info from the SHBrowseForFolder to do this. It seems like I should be able to, but I have not been able to find any helpful information on just how...

Repost: Set default stationery with VBScript
Hi all, Is it possible to set the default stationery for a user with VBScript? In Outlook 2003 this option is located under Tools, Options, Mail Format, Use this stationery by default. The message format is left at it's default: HTML. When setting up a new user we already copy the company Word templates to the user profile with a VBScript script file and it would help if we could include this Outlook 2003 setting in the script. Thanks in advance, HJ I found it. Since we are using Word when composing e-mails, the font type and size is set in Word itself under Tools, Options, Genera...

setting time in oal
Hi all, How to set system time with RTC? 1. In the oal layer i am reading the RTC values and I want to update this value with the system time, some API like setsystime cannot be compiled. Please suggest how to update the system time from oal. 2. Which oal function will be called if the user sets time in system tray? Thanks in advance. OEMSetRealTime() and OEMGetRealTime() Applications that need the time will call GetSystemTime() or GetLocalTime() which will call OEMGetRealTime() SetSystemTime() will call OEMSetRealTime() -- Bruce Eitman (eMVP) Senior Engineer Bruce....

Exchange 2003 Deletion Settings
I'm running Exchange 2003 SP1 and my private store is right at 16GB and I've instructed the users over the last few days to remove or delete any items that they do not need. I did run an offline defrag last night, but I noticed that my database did not drop any in size. I have just modified the "Keep Deleted Items" setting on the Limits tab of System Manager to 0 days from the 30 that was previously there. How can I force this to take place or will the nightly maintenace interval handle this matter tonight at 1 am? Mailbox management is not enabled, but I really do...

how do I set up or adjust my column chart?
I am creating a shipping schedule template and have 9 weeks that I ship products. I would like to show each customer how many units they receive per week. My template is set up for 9 ship weeks. Here is an example for 3 shipments. 0 means no product is being shipped. Row 1: Oct 6, Oct 13, Oct 20, 0,0,0,0,0,0 (total 9 weeks) Row 2: 233, 545, 102, 0,0,0,0,0,0 (number of units shipped that week) Now most of my customers only receive 2 or 3 shipments and only a few take as many a 8 or 9 shipments. How can I set up a column chart so that I only see 3 columns when I ship 3 weeks and not all 9 wee...