Solved

LotusScript calling API SHBrowseForFolder

Posted on 2000-03-03
7
731 Views
Last Modified: 2013-12-18
In Notes 4.52, I tried using SHBrowseForFolder to select a folder/directory in my harddrive.

It works for returning the target directory.  However, I don't know how to pass the Initial directory, say c:\My Documents, to the SHBrowseForFolder window.

For anyone who can use LotusScript to perform the call back routine to pass a pre-defined directory into the SHBrowseForFolder, please help me to solve it?
0
Comment
Question by:keithchiu
  • 4
  • 3
7 Comments
 
LVL 6

Expert Comment

by:ghassan99
ID: 2579505
Check this site for more info:
http://www.mvps.org/vbnet/code/shell/browsefolders.htm

What you want to do is set the starting directory that the user see at first...I dont think you need callback for that.  The pointer "browseinfo.pidlRoot" contains the starting directory, if its 0 or Null it will start at the desktop.

-Gus
0
 

Author Comment

by:keithchiu
ID: 2579541
For browseinfo.pidlRoot, any function call so that I can pass a string "C:\My Documents" or other path string and get the folder id (long)?

0
 
LVL 6

Expert Comment

by:ghassan99
ID: 2581901
You can use:
SHGetFolderLocation or SHGetSpecialFolderLocation

An excellent example can be found here:
http://www.mvps.org/btmtz/browsdlg/

more detailed info can be found here:
http://www.vbapi.com/ref/s/shgetfolderlocation.html

This function will fill in the value in a special structure called ITEMIDLIST, then use it like the example - BI.pidlRoot = IDL.mkid.cb
You tell the function of the special folder through predefined CSIDL's, like "C:\My Documents" is 'CSIDL_PERSONAL', which u pass to the SHGetFOlderLocation.

-Gus
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:keithchiu
ID: 2586151
Your answer is encouraging.  However, it seems that SHGetFolderLocation or SHGetSpecialFolderLocation can only get special folders and not for folders created manually. (e.g, c:\A\B\C\)

Using pidlroot will only show the specific folder and its subfolders that User cannot click to uppper folder.  In Notes, is there any method for the SHBrowseForFolder to show the root as Desktop and a default highlighted directory is somewhere else (c:\A\B\C\)?
0
 
LVL 6

Accepted Solution

by:
ghassan99 earned 200 total points
ID: 2586732
Did you check the ulFlag of the BrowserInfo Structure?  Those r cool stuff you can do to the dialog box.  Also in Win2000 the dialog box willl have a new look as I read.
I think to set any directory you have to use the lpfn from the same structure, but it has to use a callback function and they are not supported in Notes.
There is no function from Notes that you can use to do this.
Anyway I found an example in MS website about using the callback routine in C
http://support.microsoft.com/support/kb/articles/Q179/3/78.ASP

-Gus
0
 
LVL 6

Expert Comment

by:ghassan99
ID: 2656371
Any news?

-Gus
0
 

Author Comment

by:keithchiu
ID: 2659280
When I knew that it does not support the callback function, I gave up and the application simply has no default folder.  Anyway, thank you very much.  Your answer saved me a lot of time.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now