• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 15. USING API CALLS TO EXTEND TH... > USING THE OPEN FILE DIALOG API CALL

USING THE OPEN FILE DIALOG API CALL

The Office Developer Edition Tools include an ActiveX control called Common Dialogs. But if you're like me, you would rather not use ActiveX controls in your application and pull in the overhead. All the dialogs available in the ActiveX Common Dialog methods have a comparable API call. The API call covered here is the Open File dialog. Some of the other API calls are in Listing 15.13.

Listing 15.13. Win32API.txt: API Declarations for Equivalent Common Dialog ActiveX Methods

Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _
                "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
Declare Function GetSaveFileName Lib "comdlg32.dll" Alias _
                "GetSaveFileNameA" (pOpenfilename As OPENFILENAME) As Long
Declare Function ChooseColor Lib "comdlg32.dll" Alias _
                "ChooseColorA" (pChoosecolor As CHOOSECOLOR) As Long
Declare Function ChooseFont Lib "comdlg32.dll" Alias _
                "ChooseFontA" (pChoosefont As CHOOSEFONT) As Long
Declare Function PrintDlg Lib "comdlg32.dll" Alias _
                "PrintDlgA" (pPrintdlg As PRINTDLG) As Long
Declare Function PageSetupDlg Lib "comdlg32.dll" Alias _
                "PageSetupDlgA" (pPagesetupdlg As PAGESETUPDLG) As Long


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint