[1] | 1 | ' api_commdlg.sbp
|
---|
| 2 |
|
---|
| 3 | #ifndef _INC_COMMDLG
|
---|
| 4 | #define _INC_COMMDLG
|
---|
| 5 |
|
---|
| 6 | TypeDef LPCOMMDLGHOOKPROC = *Function(hdlg As HWND, uiMsg As DWord, wp As WPARAM, lp As LPARAM) As ULONG_PTR
|
---|
| 7 |
|
---|
| 8 | ' Common dialog error
|
---|
| 9 | Const CDERR_DIALOGFAILURE = &HFFFF
|
---|
| 10 |
|
---|
| 11 | Const CDERR_GENERALCODES = &H0000
|
---|
| 12 | Const CDERR_STRUCTSIZE = &H0001
|
---|
| 13 | Const CDERR_INITIALIZATION = &H0002
|
---|
| 14 | Const CDERR_NOTEMPLATE = &H0003
|
---|
| 15 | Const CDERR_NOHINSTANCE = &H0004
|
---|
| 16 | Const CDERR_LOADSTRFAILURE = &H0005
|
---|
| 17 | Const CDERR_FINDRESFAILURE = &H0006
|
---|
| 18 | Const CDERR_LOADRESFAILURE = &H0007
|
---|
| 19 | Const CDERR_LOCKRESFAILURE = &H0008
|
---|
| 20 | Const CDERR_MEMALLOCFAILURE = &H0009
|
---|
| 21 | Const CDERR_MEMLOCKFAILURE = &H000A
|
---|
| 22 | Const CDERR_NOHOOK = &H000B
|
---|
| 23 | Const CDERR_REGISTERMSGFAIL = &H000C
|
---|
| 24 |
|
---|
| 25 | Const PDERR_PRINTERCODES = &H1000
|
---|
| 26 | Const PDERR_SETUPFAILURE = &H1001
|
---|
| 27 | Const PDERR_PARSEFAILURE = &H1002
|
---|
| 28 | Const PDERR_RETDEFFAILURE = &H1003
|
---|
| 29 | Const PDERR_LOADDRVFAILURE = &H1004
|
---|
| 30 | Const PDERR_GETDEVMODEFAIL = &H1005
|
---|
| 31 | Const PDERR_INITFAILURE = &H1006
|
---|
| 32 | Const PDERR_NODEVICES = &H1007
|
---|
| 33 | Const PDERR_NODEFAULTPRN = &H1008
|
---|
| 34 | Const PDERR_DNDMMISMATCH = &H1009
|
---|
| 35 | Const PDERR_CREATEICFAILURE = &H100A
|
---|
| 36 | Const PDERR_PRINTERNOTFOUND = &H100B
|
---|
| 37 | Const PDERR_DEFAULTDIFFERENT = &H100C
|
---|
| 38 |
|
---|
| 39 | Const CFERR_CHOOSEFONTCODES = &H2000
|
---|
| 40 | Const CFERR_NOFONTS = &H2001
|
---|
| 41 | Const CFERR_MAXLESSTHANMIN = &H2002
|
---|
| 42 |
|
---|
| 43 | Const FNERR_FILENAMECODES = &H3000
|
---|
| 44 | Const FNERR_SUBCLASSFAILURE = &H3001
|
---|
| 45 | Const FNERR_INVALIDFILENAME = &H3002
|
---|
| 46 | Const FNERR_BUFFERTOOSMALL = &H3003
|
---|
| 47 |
|
---|
| 48 | Const FRERR_FINDREPLACECODES = &H4000
|
---|
| 49 | Const FRERR_BUFFERLENGTHZERO = &H4001
|
---|
| 50 |
|
---|
| 51 | Const CCERR_CHOOSECOLORCODES = &H5000
|
---|
| 52 | Declare Function CommDlgExtendedError Lib "comdlg32" () As DWord
|
---|
| 53 |
|
---|
| 54 |
|
---|
| 55 | '-------------
|
---|
| 56 | ' ChooseColor
|
---|
| 57 | '-------------
|
---|
| 58 | Const CC_RGBINIT = &H00000001
|
---|
| 59 | Const CC_FULLOPEN = &H00000002
|
---|
| 60 | Const CC_PREVENTFULLOPEN = &H00000004
|
---|
| 61 | Const CC_SHOWHELP = &H00000008
|
---|
| 62 | Const CC_ENABLEHOOK = &H00000010
|
---|
| 63 | Const CC_ENABLETEMPLATE = &H00000020
|
---|
| 64 | Const CC_ENABLETEMPLATEHANDLE = &H00000040
|
---|
| 65 | Const CC_SOLIDCOLOR = &H00000080
|
---|
| 66 | Const CC_ANYCOLOR = &H00000100
|
---|
| 67 | TypeDef LPCCHOOKPROC = LPCOMMDLGHOOKPROC
|
---|
| 68 | Type CHOOSECOLOR
|
---|
| 69 | lStructSize As DWord
|
---|
| 70 | hwndOwner As HWND
|
---|
| 71 | hInstance As HINSTANCE
|
---|
| 72 | rgbResult As DWord
|
---|
| 73 | lpCustColors As *DWord
|
---|
| 74 | Flags As DWord
|
---|
| 75 | lCustData As DWord
|
---|
| 76 | lpfnHook As LPCCHOOKPROC
|
---|
| 77 | lpTemplateName As LPCSTR
|
---|
| 78 | End Type
|
---|
| 79 | Declare Function ChooseColor Lib "comdlg32" Alias "ChooseColorA" (ByRef lpcc As CHOOSECOLOR) As BOOL
|
---|
| 80 |
|
---|
| 81 |
|
---|
| 82 | '------------
|
---|
| 83 | ' ChooseFont
|
---|
| 84 | '------------
|
---|
| 85 | Const CF_SCREENFONTS = &H00000001
|
---|
| 86 | Const CF_PRINTERFONTS = &H00000002
|
---|
| 87 | Const CF_BOTH = CF_SCREENFONTS or CF_PRINTERFONTS
|
---|
| 88 | Const CF_SHOWHELP = &H00000004
|
---|
| 89 | Const CF_ENABLEHOOK = &H00000008
|
---|
| 90 | Const CF_ENABLETEMPLATE = &H00000010
|
---|
| 91 | Const CF_ENABLETEMPLATEHANDLE = &H00000020
|
---|
| 92 | Const CF_INITTOLOGFONTSTRUCT = &H00000040
|
---|
| 93 | Const CF_USESTYLE = &H00000080
|
---|
| 94 | Const CF_EFFECTS = &H00000100
|
---|
| 95 | Const CF_APPLY = &H00000200
|
---|
| 96 | Const CF_ANSIONLY = &H00000400
|
---|
| 97 | Const CF_SCRIPTSONLY = CF_ANSIONLY
|
---|
| 98 | Const CF_NOVECTORFONTS = &H00000800
|
---|
| 99 | Const CF_NOOEMFONTS = CF_NOVECTORFONTS
|
---|
| 100 | Const CF_NOSIMULATIONS = &H00001000
|
---|
| 101 | Const CF_LIMITSIZE = &H00002000
|
---|
| 102 | Const CF_FIXEDPITCHONLY = &H00004000
|
---|
| 103 | Const CF_WYSIWYG = &H00008000
|
---|
| 104 | Const CF_FORCEFONTEXIST = &H00010000
|
---|
| 105 | Const CF_SCALABLEONLY = &H00020000
|
---|
| 106 | Const CF_TTONLY = &H00040000
|
---|
| 107 | Const CF_NOFACESEL = &H00080000
|
---|
| 108 | Const CF_NOSTYLESEL = &H00100000
|
---|
| 109 | Const CF_NOSIZESEL = &H00200000
|
---|
| 110 | Const CF_SELECTSCRIPT = &H00400000
|
---|
| 111 | Const CF_NOSCRIPTSEL = &H00800000
|
---|
| 112 | Const CF_NOVERTFONTS = &H01000000
|
---|
| 113 | Const SIMULATED_FONTTYPE = &H8000
|
---|
| 114 | Const PRINTER_FONTTYPE = &H4000
|
---|
| 115 | Const SCREEN_FONTTYPE = &H2000
|
---|
| 116 | Const BOLD_FONTTYPE = &H0100
|
---|
| 117 | Const ITALIC_FONTTYPE = &H0200
|
---|
| 118 | Const REGULAR_FONTTYPE = &H0400
|
---|
| 119 | TypeDef LPCFHOOKPROC = LPCOMMDLGHOOKPROC
|
---|
| 120 | Type CHOOSEFONT
|
---|
| 121 | lStructSize As DWord
|
---|
| 122 | hwndOwner As HWND
|
---|
| 123 | hDC As HDC
|
---|
| 124 | lpLogFont As *LOGFONT
|
---|
| 125 | iPointSize As Long
|
---|
| 126 | Flags As DWord
|
---|
| 127 | rgbColors As DWord
|
---|
| 128 | lCustData As LPARAM
|
---|
| 129 | lpfnHook As LPCFHOOKPROC
|
---|
| 130 | lpTemplateName As LPCSTR
|
---|
| 131 | hInstance As HINSTANCE
|
---|
| 132 | lpszStyle As LPSTR
|
---|
| 133 | nFontType As Word
|
---|
| 134 | ___MISSING_ALIGNMENT__ As Word
|
---|
| 135 | nSizeMin As Long
|
---|
| 136 | nSizeMax As Long
|
---|
| 137 | End Type
|
---|
| 138 | Declare Function ChooseFont Lib "comdlg32" Alias "ChooseFontA" (ByRef lpcf As CHOOSEFONT) As BOOL
|
---|
| 139 |
|
---|
| 140 |
|
---|
| 141 | '----------
|
---|
| 142 | ' FindText
|
---|
| 143 | '----------
|
---|
| 144 | Const FR_DOWN = &H00000001
|
---|
| 145 | Const FR_WHOLEWORD = &H00000002
|
---|
| 146 | Const FR_MATCHCASE = &H00000004
|
---|
| 147 | Const FR_FINDNEXT = &H00000008
|
---|
| 148 | Const FR_REPLACE = &H00000010
|
---|
| 149 | Const FR_REPLACEALL = &H00000020
|
---|
| 150 | Const FR_DIALOGTERM = &H00000040
|
---|
| 151 | Const FR_SHOWHELP = &H00000080
|
---|
| 152 | Const FR_ENABLEHOOK = &H00000100
|
---|
| 153 | Const FR_ENABLETEMPLATE = &H00000200
|
---|
| 154 | Const FR_NOUPDOWN = &H00000400
|
---|
| 155 | Const FR_NOMATCHCASE = &H00000800
|
---|
| 156 | Const FR_NOWHOLEWORD = &H00001000
|
---|
| 157 | Const FR_ENABLETEMPLATEHANDLE = &H00002000
|
---|
| 158 | Const FR_HIDEUPDOWN = &H00004000
|
---|
| 159 | Const FR_HIDEMATCHCASE = &H00008000
|
---|
| 160 | Const FR_HIDEWHOLEWORD = &H00010000
|
---|
| 161 | TypeDef LPFRHOOKPROC = LPCOMMDLGHOOKPROC
|
---|
| 162 | Type FINDREPLACE
|
---|
| 163 | lStructSize As DWord
|
---|
| 164 | hwndOwner As HWND
|
---|
| 165 | hInstance As HINSTANCE
|
---|
| 166 | Flags As DWord
|
---|
| 167 | lpstrFindWhat As LPSTR
|
---|
| 168 | lpstrReplaceWith As LPSTR
|
---|
| 169 | wFindWhatLen As Word
|
---|
| 170 | wReplaceWithLen As Word
|
---|
| 171 | lCustData As LPARAM
|
---|
| 172 | lpfnHook As LPFRHOOKPROC
|
---|
| 173 | lpTemplateName As LPCSTR
|
---|
| 174 | End Type
|
---|
| 175 | Declare Function FindText Lib "comdlg32" Alias "FindTextA" (ByRef lpfr As FINDREPLACE) As BOOL
|
---|
| 176 |
|
---|
| 177 |
|
---|
| 178 | '------------------------
|
---|
| 179 | ' Get Open/Save FileName
|
---|
| 180 | '------------------------
|
---|
| 181 | Const OFN_READONLY = &H00000001
|
---|
| 182 | Const OFN_OVERWRITEPROMPT = &H00000002
|
---|
| 183 | Const OFN_HIDEREADONLY = &H00000004
|
---|
| 184 | Const OFN_NOCHANGEDIR = &H00000008
|
---|
| 185 | Const OFN_SHOWHELP = &H00000010
|
---|
| 186 | Const OFN_ENABLEHOOK = &H00000020
|
---|
| 187 | Const OFN_ENABLETEMPLATE = &H00000040
|
---|
| 188 | Const OFN_ENABLETEMPLATEHANDLE = &H00000080
|
---|
| 189 | Const OFN_NOVALIDATE = &H00000100
|
---|
| 190 | Const OFN_ALLOWMULTISELECT = &H00000200
|
---|
| 191 | Const OFN_EXTENSIONDIFFERENT = &H00000400
|
---|
| 192 | Const OFN_PATHMUSTEXIST = &H00000800
|
---|
| 193 | Const OFN_FILEMUSTEXIST = &H00001000
|
---|
| 194 | Const OFN_CREATEPROMPT = &H00002000
|
---|
| 195 | Const OFN_SHAREAWARE = &H00004000
|
---|
| 196 | Const OFN_NOREADONLYRETURN = &H00008000
|
---|
| 197 | Const OFN_NOTESTFILECREATE = &H00010000
|
---|
| 198 | Const OFN_NONETWORKBUTTON = &H00020000
|
---|
| 199 | Const OFN_NOLONGNAMES = &H00040000
|
---|
| 200 | Const OFN_EXPLORER = &H00080000
|
---|
| 201 | Const OFN_NODEREFERENCELINKS = &H00100000
|
---|
| 202 | Const OFN_LONGNAMES = &H00200000
|
---|
| 203 | Const OFN_ENABLEINCLUDENOTIFY = &H00400000
|
---|
| 204 | Const OFN_ENABLESIZING = &H00800000
|
---|
| 205 | TypeDef LPOFNHOOKPROC = LPCOMMDLGHOOKPROC
|
---|
| 206 | Type OPENFILENAME
|
---|
| 207 | lStructSize As DWord
|
---|
| 208 | hwndOwner As HWND
|
---|
| 209 | hInstance As HINSTANCE
|
---|
| 210 | lpstrFilter As LPCSTR
|
---|
| 211 | lpstrCustomFilter As LPSTR
|
---|
| 212 | nMaxCustFilter As DWord
|
---|
| 213 | nFilterIndex As DWord
|
---|
| 214 | lpstrFile As LPSTR
|
---|
| 215 | nMaxFile As DWord
|
---|
| 216 | lpstrFileTitle As LPSTR
|
---|
| 217 | nMaxFileTitle As DWord
|
---|
| 218 | lpstrInitialDir As LPCSTR
|
---|
| 219 | lpstrTitle As LPCSTR
|
---|
| 220 | Flags As DWord
|
---|
| 221 | nFileOffset As Word
|
---|
| 222 | nFileExtension As Word
|
---|
| 223 | lpstrDefExt As LPCSTR
|
---|
| 224 | lCustData As LPARAM
|
---|
| 225 | lpfnHook As LPOFNHOOKPROC
|
---|
| 226 | lpTemplateName As LPCSTR
|
---|
| 227 | End Type
|
---|
| 228 | Declare Function GetOpenFileName Lib "comdlg32" Alias "GetOpenFileNameA" (ByRef lpofn As OPENFILENAME) As BOOL
|
---|
| 229 | Declare Function GetSaveFileName Lib "comdlg32" Alias "GetSaveFileNameA" (ByRef lpofn As OPENFILENAME) As BOOL
|
---|
| 230 | Declare Function GetFileTitle Lib "comdlg32" Alias "GetFileTitleA" (lpszFile As LPCSTR, lpszTitle As LPSTR, cbBuf As Word) As Integer
|
---|
| 231 |
|
---|
| 232 |
|
---|
| 233 | '--------------
|
---|
| 234 | ' PageSetupDlg
|
---|
| 235 | '--------------
|
---|
| 236 | Const PSD_DEFAULTMINMARGINS = &H00000000
|
---|
| 237 | Const PSD_INWININIINTLMEASURE = &H00000000
|
---|
| 238 | Const PSD_MINMARGINS = &H00000001
|
---|
| 239 | Const PSD_MARGINS = &H00000002
|
---|
| 240 | Const PSD_INTHOUSANDTHSOFINCHES = &H00000004
|
---|
| 241 | Const PSD_INHUNDREDTHSOFMILLIMETERS = &H00000008
|
---|
| 242 | Const PSD_DISABLEMARGINS = &H00000010
|
---|
| 243 | Const PSD_DISABLEPRINTER = &H00000020
|
---|
| 244 | Const PSD_NOWARNING = &H00000080
|
---|
| 245 | Const PSD_DISABLEORIENTATION = &H00000100
|
---|
| 246 | Const PSD_RETURNDEFAULT = &H00000400
|
---|
| 247 | Const PSD_DISABLEPAPER = &H00000200
|
---|
| 248 | Const PSD_SHOWHELP = &H00000800
|
---|
| 249 | Const PSD_ENABLEPAGESETUPHOOK = &H00002000
|
---|
| 250 | Const PSD_ENABLEPAGESETUPTEMPLATE = &H00008000
|
---|
| 251 | Const PSD_ENABLEPAGESETUPTEMPLATEHANDLE = &H00020000
|
---|
| 252 | Const PSD_ENABLEPAGEPAINTHOOK = &H00040000
|
---|
| 253 | Const PSD_DISABLEPAGEPAINTING = &H00080000
|
---|
| 254 | Const PSD_NONETWORKBUTTON = &H00200000
|
---|
| 255 | TypeDef LPPAGESETUPHOOK = LPCOMMDLGHOOKPROC
|
---|
| 256 | TypeDef LPPAGEPAINTHOOK = LPCOMMDLGHOOKPROC
|
---|
| 257 | Type PAGESETUPDLG
|
---|
| 258 | lStructSize As DWord
|
---|
| 259 | hwndOwner As HWND
|
---|
| 260 | hDevMode As HGLOBAL
|
---|
| 261 | hDevNames As HGLOBAL
|
---|
| 262 | Flags As DWord
|
---|
| 263 | ptPaperSize As POINTAPI
|
---|
| 264 | rtMinMargin As RECT
|
---|
| 265 | rtMargin As RECT
|
---|
| 266 | hInstance As HINSTANCE
|
---|
| 267 | lCustData As LPARAM
|
---|
| 268 | lpfnPageSetupHook As LPPAGESETUPHOOK
|
---|
| 269 | lpfnPagePaintHook As LPPAGEPAINTHOOK
|
---|
| 270 | lpPageSetupTemplateName As LPCSTR
|
---|
| 271 | hPageSetupTemplate As HGLOBAL
|
---|
| 272 | End Type
|
---|
| 273 | Declare Function PageSetupDlg Lib "comdlg32" Alias "PageSetupDlgA" (ByRef lppsd As PAGESETUPDLG) As BOOL
|
---|
| 274 |
|
---|
| 275 |
|
---|
| 276 | '----------
|
---|
| 277 | ' PrintDlg
|
---|
| 278 | '----------
|
---|
| 279 | Const PD_ALLPAGES = &H00000000
|
---|
| 280 | Const PD_SELECTION = &H00000001
|
---|
| 281 | Const PD_PAGENUMS = &H00000002
|
---|
| 282 | Const PD_NOSELECTION = &H00000004
|
---|
| 283 | Const PD_NOPAGENUMS = &H00000008
|
---|
| 284 | Const PD_COLLATE = &H00000010
|
---|
| 285 | Const PD_PRINTTOFILE = &H00000020
|
---|
| 286 | Const PD_PRINTSETUP = &H00000040
|
---|
| 287 | Const PD_NOWARNING = &H00000080
|
---|
| 288 | Const PD_RETURNDC = &H00000100
|
---|
| 289 | Const PD_RETURNIC = &H00000200
|
---|
| 290 | Const PD_RETURNDEFAULT = &H00000400
|
---|
| 291 | Const PD_SHOWHELP = &H00000800
|
---|
| 292 | Const PD_ENABLEPRINTHOOK = &H00001000
|
---|
| 293 | Const PD_ENABLESETUPHOOK = &H00002000
|
---|
| 294 | Const PD_ENABLEPRINTTEMPLATE = &H00004000
|
---|
| 295 | Const PD_ENABLESETUPTEMPLATE = &H00008000
|
---|
| 296 | Const PD_ENABLEPRINTTEMPLATEHANDLE = &H00010000
|
---|
| 297 | Const PD_ENABLESETUPTEMPLATEHANDLE = &H00020000
|
---|
| 298 | Const PD_USEDEVMODECOPIES = &H00040000
|
---|
| 299 | Const PD_USEDEVMODECOPIESANDCOLLATE = &H00040000
|
---|
| 300 | Const PD_DISABLEPRINTTOFILE = &H00080000
|
---|
| 301 | Const PD_HIDEPRINTTOFILE = &H00100000
|
---|
| 302 | Const PD_NONETWORKBUTTON = &H00200000
|
---|
| 303 | TypeDef LPPAGEPAINTHOOK = LPCOMMDLGHOOKPROC
|
---|
| 304 | TypeDef LPSETUPHOOKPROC = LPCOMMDLGHOOKPROC
|
---|
| 305 | #ifdef _WIN64
|
---|
| 306 | Type PRINTDLG
|
---|
| 307 | #else
|
---|
| 308 | Type Align(1) PRINTDLG
|
---|
| 309 | #endif
|
---|
| 310 | lStructSize As DWord
|
---|
| 311 | hwndOwner As HWND
|
---|
| 312 | hDevMode As HGLOBAL
|
---|
| 313 | hDevNames As HGLOBAL
|
---|
| 314 | hDC As HDC
|
---|
| 315 | Flags As DWord
|
---|
| 316 | nFromPage As Word
|
---|
| 317 | nToPage As Word
|
---|
| 318 | nMinPage As Word
|
---|
| 319 | nMaxPage As Word
|
---|
| 320 | nCopies As Word
|
---|
| 321 | hInstance As HINSTANCE
|
---|
| 322 | lCustData As LPARAM
|
---|
| 323 | lpfnPrintHook As LPPAGEPAINTHOOK
|
---|
| 324 | lpfnSetupHook As LPSETUPHOOKPROC
|
---|
| 325 | lpPrintTemplateName As LPCSTR
|
---|
| 326 | lpSetupTemplateName As LPCSTR
|
---|
| 327 | hPrintTemplate As HGLOBAL
|
---|
| 328 | hSetupTemplate As HGLOBAL
|
---|
| 329 | End Type
|
---|
| 330 | Declare Function PrintDlg Lib "comdlg32" Alias "PrintDlgA" (ByRef lppd As PRINTDLG) As BOOL
|
---|
| 331 |
|
---|
| 332 |
|
---|
| 333 | #endif '_INC_COMMDLG
|
---|