Passing structures` flags to WinAPI32 functions from VB(VBA)
From: Serg (Serg_at_discussions.microsoft.com)
Date: 08/25/04
- Next message: alpine: "Re: Trying to rotate a bitmap"
- Previous message: kurotsuke: "Re: Cannot use API CreateFileMapping with Windows 98, please help"
- Next in thread: Tom Esh: "Re: Passing structures` flags to WinAPI32 functions from VB(VBA)"
- Reply: Tom Esh: "Re: Passing structures` flags to WinAPI32 functions from VB(VBA)"
- Reply: MikeD: "Re: Passing structures` flags to WinAPI32 functions from VB(VBA)"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 25 Aug 2004 13:05:03 -0700
Dear Sirs,
I`m trying to pass flags of BROWSEINFO structure from VBA code on
MsAccess2000.
In it I should declare each flag as numeric constant with hexanumeric value
like this:
Option Compare Database
Option Explicit
Private Type BrowseInfo
hOwner As Long
pIDLRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type
Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias _
"SHGetPathFromIDListA" (ByVal pidl As Long, _
ByVal pszPath As String) As Long
Private Declare Function SHBrowseForFolder Lib "shell32.dll" Alias _
"SHBrowseForFolderA" (lpBrowseInfo As BrowseInfo) _
As Long
Private Const BIF_RETURNONLYFSDIRS = &H1
Private Const BIF_EDITBOX = &.....????
Sub Browse()
Call BrowseFolder("Please, select a folder...")
End Sub
Public Function BrowseFolder(szDialogTitle As String) As String
Dim x As Long, bi As BrowseInfo, dwIList As Long
Dim szPath As String, wPos As Integer
With bi
.hOwner = hWndAccessApp
.lpszTitle = szDialogTitle
.ulFlags = BIF_RETURNONLYFSDIRS
End With
dwIList = SHBrowseForFolder(bi)
szPath = Space$(512)
x = SHGetPathFromIDList(ByVal dwIList, ByVal szPath)
If x Then
wPos = InStr(szPath, Chr(0))
BrowseFolder = Left$(szPath, wPos - 1)
Else
BrowseFolder = ""
End If
End Function
How can I get numeric value to flag BIF_EDITBOX or other flags? In
documentation of this structure it is not described.
Thank you for parcipitation
- Next message: alpine: "Re: Trying to rotate a bitmap"
- Previous message: kurotsuke: "Re: Cannot use API CreateFileMapping with Windows 98, please help"
- Next in thread: Tom Esh: "Re: Passing structures` flags to WinAPI32 functions from VB(VBA)"
- Reply: Tom Esh: "Re: Passing structures` flags to WinAPI32 functions from VB(VBA)"
- Reply: MikeD: "Re: Passing structures` flags to WinAPI32 functions from VB(VBA)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|