open file dialog - late binding
- From: "ARC" <andy@xxxxxxxxx>
- Date: Fri, 31 Aug 2007 08:54:28 -0500
Hello all,
I have the following code in my app, which opens the older windows open-file
dialog. Anyone know what code to use to the the more modern open file
dialog? If is just a matter of chaning the "comdlg32.dll" bit, and the rest
of the code will work as is? What is the new .dll?
Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _
"GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Boolean
Declare Function GetSaveFileName Lib "comdlg32.dll" Alias _
"GetSaveFileNameA" (pOpenfilename As OPENFILENAME) As Boolean
Dim lngStartTime As Long
Public Const Lite_Ver = 0
Type MSA_OPENFILENAME
' Filter string used for the Open dialog filters.
' Use MSA_CreateFilterString() to create this.
' Default = All Files, *.*
strFilter As String
' Initial Filter to display.
' Default = 1.
lngFilterIndex As Long
' Initial directory for the dialog to open in.
' Default = Current working directory.
strInitialDir As String
' Initial file name to populate the dialog with.
' Default = "".
strInitialFile As String
strDialogTitle As String
' Default extension to append to file if user didn't specify one.
' Default = System Values (Open File, Save File).
strDefaultExtension As String
' Flags (see constant list) to be used.
' Default = no flags.
lngFlags As Long
' Full path of file picked. When the File Open dialog box is
' presented, if the user picks a nonexistent file,
' only the text in the "File Name" box is returned.
strFullPathReturned As String
' File name of file picked.
strFileNameReturned As String
' Offset in full path (strFullPathReturned) where the file name
' (strFileNameReturned) begins.
intFileOffset As Integer
' Offset in full path (strFullPathReturned) where the file extension
begins.
intFileExtension As Integer
End Type
Const ALLFILES = "All Files"
Global Const ProgMode = 0 'ProgMode of -1 indicates this program can only
be ran as a demo and cannot be registered
Type OPENFILENAME
lStructSize As Long
hwndOwner As Long
hInstance As Long
lpstrFilter As String
lpstrCustomFilter As Long
nMaxCustrFilter As Long
nFilterIndex As Long
lpstrFile As String
nMaxFile As Long
lpstrFileTitle As String
nMaxFileTitle As Long
lpstrInitialDir As String
lpstrTitle As String
Flags As Long
nFileOffset As Integer
nFileExtension As Integer
lpstrDefExt As String
lCustrData As Long
lpfnHook As Long
lpTemplateName As Long
End Type
Thanks!
.
- Follow-Ups:
- Re: open file dialog - late binding
- From: Allen Browne
- Re: open file dialog - late binding
- Prev by Date: Limit to list Property
- Next by Date: Re: Timestamps
- Previous by thread: Limit to list Property
- Next by thread: Re: open file dialog - late binding
- Index(es):
Relevant Pages
|