Solved

LotusScript calling API SHBrowseForFolder

Posted on 2000-03-03
7
747 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

815 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