?
Solved

LotusScript calling API SHBrowseForFolder

Posted on 2000-03-03
7
Medium Priority
?
783 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 600 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

764 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