Using Win32 functions in Visual FoxPro Image Gallery
Shell Functions
..msdn
AssocQueryString
DllGetVersion
DragAcceptFiles
DragFinish
DragQueryFile
DragQueryPoint
FileIconInit
FindExecutable
GetFileNameFromBrowse
GetMenuContextHelpId
GetWindowContextHelpId
InetIsOffline
IsUserAnAdmin
LoadUserProfile
PathMakeUniqueName
PathYetAnotherMakeUniqueName
RealDriveType
RestartDialog
SHAddToRecentDocs
SHBrowseForFolder
SHCreateDirectory
ShellAbout
ShellExecute
ShellExecuteEx
Shell_GetImageLists
Shell_NotifyIcon
SHEmptyRecycleBin
SHFileOperation
SHFormatDrive
SHGetFileInfo
SHGetFolderPath
SHGetPathFromIDList
SHGetSpecialFolderLocation
SHGetStockIconInfo
SHParseDisplayName
SHQueryRecycleBin
SHSimpleIDListFromPath
UnloadUserProfile
WinHelp
Code examples:
Browsing Windows Known Folders (Special Folders)
Displaying system dialog that selects a folder
SHBrowseForFolder
..msdn    Add comment     W32 Constants      Translate this page
Displays a dialog box that enables the user to select a Shell folder.
Code examples:
Browsing Windows Known Folders (Special Folders)
Displaying system dialog that selects a folder
Declaration:
LPITEMIDLIST SHBrowseForFolder(
    LPBROWSEINFO lpbi
);
FoxPro declaration:
DECLARE INTEGER SHBrowseForFolder IN shell32;
    STRING @ lpbi
Parameters:
lpbi
[in, out] Pointer to a BROWSEINFO structure that contains information used to display the dialog box.
Return value:
Returns a pointer to an item identifier list (PIDL) that specifies the location of the selected folder relative to the root of the namespace. If the user chooses the Cancel button in the dialog box, the return value is NULL.
My comment:
Starting with VFP version 7 the original GETDIR function is changed to be a wrapper around the SHBrowseForFolder function.

The SHGetPathFromIDList will return the path of the selected folder.

* * *
Windows Shell script:
oShell = CREATEOBJECT("Shell.Application")

oFolder = oShell.Application.BrowseForFolder(_screen.HWnd,;
        "Select Folder", 1, "c:\Program Files")

IF NOT ISNULL(oFolder)
        ? oFolder.self.Path
ENDIF
Word Index links for the SHBrowseForFolder :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2003-01-02 15:50:04
Modified: 2011-01-20 10:16:30
Visited in last 7 days: 29
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.35), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (184.73.33.127)
37 sec.Function: 'SetBkMode'
1.92 min.Function: 'WNetEnumResource'
3.52 min.Function: 'SQLBindCol'
Google
Advertise here!