source: Include/api_commdlg.sbp@ 36

Last change on this file since 36 was 1, checked in by (none), 18 years ago
File size: 12.2 KB
RevLine 
[1]1' api_commdlg.sbp
2
3#ifndef _INC_COMMDLG
4#define _INC_COMMDLG
5
6TypeDef LPCOMMDLGHOOKPROC = *Function(hdlg As HWND, uiMsg As DWord, wp As WPARAM, lp As LPARAM) As ULONG_PTR
7
8' Common dialog error
9Const CDERR_DIALOGFAILURE = &HFFFF
10
11Const CDERR_GENERALCODES = &H0000
12Const CDERR_STRUCTSIZE = &H0001
13Const CDERR_INITIALIZATION = &H0002
14Const CDERR_NOTEMPLATE = &H0003
15Const CDERR_NOHINSTANCE = &H0004
16Const CDERR_LOADSTRFAILURE = &H0005
17Const CDERR_FINDRESFAILURE = &H0006
18Const CDERR_LOADRESFAILURE = &H0007
19Const CDERR_LOCKRESFAILURE = &H0008
20Const CDERR_MEMALLOCFAILURE = &H0009
21Const CDERR_MEMLOCKFAILURE = &H000A
22Const CDERR_NOHOOK = &H000B
23Const CDERR_REGISTERMSGFAIL = &H000C
24
25Const PDERR_PRINTERCODES = &H1000
26Const PDERR_SETUPFAILURE = &H1001
27Const PDERR_PARSEFAILURE = &H1002
28Const PDERR_RETDEFFAILURE = &H1003
29Const PDERR_LOADDRVFAILURE = &H1004
30Const PDERR_GETDEVMODEFAIL = &H1005
31Const PDERR_INITFAILURE = &H1006
32Const PDERR_NODEVICES = &H1007
33Const PDERR_NODEFAULTPRN = &H1008
34Const PDERR_DNDMMISMATCH = &H1009
35Const PDERR_CREATEICFAILURE = &H100A
36Const PDERR_PRINTERNOTFOUND = &H100B
37Const PDERR_DEFAULTDIFFERENT = &H100C
38
39Const CFERR_CHOOSEFONTCODES = &H2000
40Const CFERR_NOFONTS = &H2001
41Const CFERR_MAXLESSTHANMIN = &H2002
42
43Const FNERR_FILENAMECODES = &H3000
44Const FNERR_SUBCLASSFAILURE = &H3001
45Const FNERR_INVALIDFILENAME = &H3002
46Const FNERR_BUFFERTOOSMALL = &H3003
47
48Const FRERR_FINDREPLACECODES = &H4000
49Const FRERR_BUFFERLENGTHZERO = &H4001
50
51Const CCERR_CHOOSECOLORCODES = &H5000
52Declare Function CommDlgExtendedError Lib "comdlg32" () As DWord
53
54
55'-------------
56' ChooseColor
57'-------------
58Const CC_RGBINIT = &H00000001
59Const CC_FULLOPEN = &H00000002
60Const CC_PREVENTFULLOPEN = &H00000004
61Const CC_SHOWHELP = &H00000008
62Const CC_ENABLEHOOK = &H00000010
63Const CC_ENABLETEMPLATE = &H00000020
64Const CC_ENABLETEMPLATEHANDLE = &H00000040
65Const CC_SOLIDCOLOR = &H00000080
66Const CC_ANYCOLOR = &H00000100
67TypeDef LPCCHOOKPROC = LPCOMMDLGHOOKPROC
68Type 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
78End Type
79Declare Function ChooseColor Lib "comdlg32" Alias "ChooseColorA" (ByRef lpcc As CHOOSECOLOR) As BOOL
80
81
82'------------
83' ChooseFont
84'------------
85Const CF_SCREENFONTS = &H00000001
86Const CF_PRINTERFONTS = &H00000002
87Const CF_BOTH = CF_SCREENFONTS or CF_PRINTERFONTS
88Const CF_SHOWHELP = &H00000004
89Const CF_ENABLEHOOK = &H00000008
90Const CF_ENABLETEMPLATE = &H00000010
91Const CF_ENABLETEMPLATEHANDLE = &H00000020
92Const CF_INITTOLOGFONTSTRUCT = &H00000040
93Const CF_USESTYLE = &H00000080
94Const CF_EFFECTS = &H00000100
95Const CF_APPLY = &H00000200
96Const CF_ANSIONLY = &H00000400
97Const CF_SCRIPTSONLY = CF_ANSIONLY
98Const CF_NOVECTORFONTS = &H00000800
99Const CF_NOOEMFONTS = CF_NOVECTORFONTS
100Const CF_NOSIMULATIONS = &H00001000
101Const CF_LIMITSIZE = &H00002000
102Const CF_FIXEDPITCHONLY = &H00004000
103Const CF_WYSIWYG = &H00008000
104Const CF_FORCEFONTEXIST = &H00010000
105Const CF_SCALABLEONLY = &H00020000
106Const CF_TTONLY = &H00040000
107Const CF_NOFACESEL = &H00080000
108Const CF_NOSTYLESEL = &H00100000
109Const CF_NOSIZESEL = &H00200000
110Const CF_SELECTSCRIPT = &H00400000
111Const CF_NOSCRIPTSEL = &H00800000
112Const CF_NOVERTFONTS = &H01000000
113Const SIMULATED_FONTTYPE = &H8000
114Const PRINTER_FONTTYPE = &H4000
115Const SCREEN_FONTTYPE = &H2000
116Const BOLD_FONTTYPE = &H0100
117Const ITALIC_FONTTYPE = &H0200
118Const REGULAR_FONTTYPE = &H0400
119TypeDef LPCFHOOKPROC = LPCOMMDLGHOOKPROC
120Type 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
137End Type
138Declare Function ChooseFont Lib "comdlg32" Alias "ChooseFontA" (ByRef lpcf As CHOOSEFONT) As BOOL
139
140
141'----------
142' FindText
143'----------
144Const FR_DOWN = &H00000001
145Const FR_WHOLEWORD = &H00000002
146Const FR_MATCHCASE = &H00000004
147Const FR_FINDNEXT = &H00000008
148Const FR_REPLACE = &H00000010
149Const FR_REPLACEALL = &H00000020
150Const FR_DIALOGTERM = &H00000040
151Const FR_SHOWHELP = &H00000080
152Const FR_ENABLEHOOK = &H00000100
153Const FR_ENABLETEMPLATE = &H00000200
154Const FR_NOUPDOWN = &H00000400
155Const FR_NOMATCHCASE = &H00000800
156Const FR_NOWHOLEWORD = &H00001000
157Const FR_ENABLETEMPLATEHANDLE = &H00002000
158Const FR_HIDEUPDOWN = &H00004000
159Const FR_HIDEMATCHCASE = &H00008000
160Const FR_HIDEWHOLEWORD = &H00010000
161TypeDef LPFRHOOKPROC = LPCOMMDLGHOOKPROC
162Type 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
174End Type
175Declare Function FindText Lib "comdlg32" Alias "FindTextA" (ByRef lpfr As FINDREPLACE) As BOOL
176
177
178'------------------------
179' Get Open/Save FileName
180'------------------------
181Const OFN_READONLY = &H00000001
182Const OFN_OVERWRITEPROMPT = &H00000002
183Const OFN_HIDEREADONLY = &H00000004
184Const OFN_NOCHANGEDIR = &H00000008
185Const OFN_SHOWHELP = &H00000010
186Const OFN_ENABLEHOOK = &H00000020
187Const OFN_ENABLETEMPLATE = &H00000040
188Const OFN_ENABLETEMPLATEHANDLE = &H00000080
189Const OFN_NOVALIDATE = &H00000100
190Const OFN_ALLOWMULTISELECT = &H00000200
191Const OFN_EXTENSIONDIFFERENT = &H00000400
192Const OFN_PATHMUSTEXIST = &H00000800
193Const OFN_FILEMUSTEXIST = &H00001000
194Const OFN_CREATEPROMPT = &H00002000
195Const OFN_SHAREAWARE = &H00004000
196Const OFN_NOREADONLYRETURN = &H00008000
197Const OFN_NOTESTFILECREATE = &H00010000
198Const OFN_NONETWORKBUTTON = &H00020000
199Const OFN_NOLONGNAMES = &H00040000
200Const OFN_EXPLORER = &H00080000
201Const OFN_NODEREFERENCELINKS = &H00100000
202Const OFN_LONGNAMES = &H00200000
203Const OFN_ENABLEINCLUDENOTIFY = &H00400000
204Const OFN_ENABLESIZING = &H00800000
205TypeDef LPOFNHOOKPROC = LPCOMMDLGHOOKPROC
206Type 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
227End Type
228Declare Function GetOpenFileName Lib "comdlg32" Alias "GetOpenFileNameA" (ByRef lpofn As OPENFILENAME) As BOOL
229Declare Function GetSaveFileName Lib "comdlg32" Alias "GetSaveFileNameA" (ByRef lpofn As OPENFILENAME) As BOOL
230Declare Function GetFileTitle Lib "comdlg32" Alias "GetFileTitleA" (lpszFile As LPCSTR, lpszTitle As LPSTR, cbBuf As Word) As Integer
231
232
233'--------------
234' PageSetupDlg
235'--------------
236Const PSD_DEFAULTMINMARGINS = &H00000000
237Const PSD_INWININIINTLMEASURE = &H00000000
238Const PSD_MINMARGINS = &H00000001
239Const PSD_MARGINS = &H00000002
240Const PSD_INTHOUSANDTHSOFINCHES = &H00000004
241Const PSD_INHUNDREDTHSOFMILLIMETERS = &H00000008
242Const PSD_DISABLEMARGINS = &H00000010
243Const PSD_DISABLEPRINTER = &H00000020
244Const PSD_NOWARNING = &H00000080
245Const PSD_DISABLEORIENTATION = &H00000100
246Const PSD_RETURNDEFAULT = &H00000400
247Const PSD_DISABLEPAPER = &H00000200
248Const PSD_SHOWHELP = &H00000800
249Const PSD_ENABLEPAGESETUPHOOK = &H00002000
250Const PSD_ENABLEPAGESETUPTEMPLATE = &H00008000
251Const PSD_ENABLEPAGESETUPTEMPLATEHANDLE = &H00020000
252Const PSD_ENABLEPAGEPAINTHOOK = &H00040000
253Const PSD_DISABLEPAGEPAINTING = &H00080000
254Const PSD_NONETWORKBUTTON = &H00200000
255TypeDef LPPAGESETUPHOOK = LPCOMMDLGHOOKPROC
256TypeDef LPPAGEPAINTHOOK = LPCOMMDLGHOOKPROC
257Type 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
272End Type
273Declare Function PageSetupDlg Lib "comdlg32" Alias "PageSetupDlgA" (ByRef lppsd As PAGESETUPDLG) As BOOL
274
275
276'----------
277' PrintDlg
278'----------
279Const PD_ALLPAGES = &H00000000
280Const PD_SELECTION = &H00000001
281Const PD_PAGENUMS = &H00000002
282Const PD_NOSELECTION = &H00000004
283Const PD_NOPAGENUMS = &H00000008
284Const PD_COLLATE = &H00000010
285Const PD_PRINTTOFILE = &H00000020
286Const PD_PRINTSETUP = &H00000040
287Const PD_NOWARNING = &H00000080
288Const PD_RETURNDC = &H00000100
289Const PD_RETURNIC = &H00000200
290Const PD_RETURNDEFAULT = &H00000400
291Const PD_SHOWHELP = &H00000800
292Const PD_ENABLEPRINTHOOK = &H00001000
293Const PD_ENABLESETUPHOOK = &H00002000
294Const PD_ENABLEPRINTTEMPLATE = &H00004000
295Const PD_ENABLESETUPTEMPLATE = &H00008000
296Const PD_ENABLEPRINTTEMPLATEHANDLE = &H00010000
297Const PD_ENABLESETUPTEMPLATEHANDLE = &H00020000
298Const PD_USEDEVMODECOPIES = &H00040000
299Const PD_USEDEVMODECOPIESANDCOLLATE = &H00040000
300Const PD_DISABLEPRINTTOFILE = &H00080000
301Const PD_HIDEPRINTTOFILE = &H00100000
302Const PD_NONETWORKBUTTON = &H00200000
303TypeDef LPPAGEPAINTHOOK = LPCOMMDLGHOOKPROC
304TypeDef LPSETUPHOOKPROC = LPCOMMDLGHOOKPROC
305#ifdef _WIN64
306Type PRINTDLG
307#else
308Type 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
329End Type
330Declare Function PrintDlg Lib "comdlg32" Alias "PrintDlgA" (ByRef lppd As PRINTDLG) As BOOL
331
332
333#endif '_INC_COMMDLG
Note: See TracBrowser for help on using the repository browser.