source: trunk/Include/api_commdlg.sbp@ 497

Last change on this file since 497 was 497, checked in by イグトランス (egtra), 17 years ago

インクルードガードとその他不要な前処理定義などの削除

File size: 16.5 KB
Line 
1' api_commdlg.sbp
2
3#ifdef UNICODE
4Const _FuncName_ChooseColor = "ChooseColorW"
5Const _FuncName_ChooseFont = "ChooseFontW"
6Const _FuncName_FindText = "FindTextW"
7Const _FuncName_GetOpenFileName = "GetOpenFileNameW"
8Const _FuncName_GetSaveFileName = "GetSaveFileNameW"
9Const _FuncName_GetFileTitle = "GetFileTitleW"
10Const _FuncName_PageSetupDlg = "PageSetupDlgW"
11Const _FuncName_PrintDlg = "PrintDlgW"
12#else
13Const _FuncName_ChooseColor = "ChooseColorA"
14Const _FuncName_ChooseFont = "ChooseFontA"
15Const _FuncName_FindText = "FindTextA"
16Const _FuncName_GetOpenFileName = "GetOpenFileNameA"
17Const _FuncName_GetSaveFileName = "GetSaveFileNameA"
18Const _FuncName_GetFileTitle = "GetFileTitleA"
19Const _FuncName_PageSetupDlg = "PageSetupDlgA"
20Const _FuncName_PrintDlg = "PrintDlgA"
21#endif
22
23TypeDef LPCOMMDLGHOOKPROC = *Function(hdlg As HWND, uiMsg As DWord, wp As WPARAM, lp As LPARAM) As ULONG_PTR
24
25' Common dialog error
26Const CDERR_DIALOGFAILURE = &HFFFF
27
28Const CDERR_GENERALCODES = &H0000
29Const CDERR_STRUCTSIZE = &H0001
30Const CDERR_INITIALIZATION = &H0002
31Const CDERR_NOTEMPLATE = &H0003
32Const CDERR_NOHINSTANCE = &H0004
33Const CDERR_LOADSTRFAILURE = &H0005
34Const CDERR_FINDRESFAILURE = &H0006
35Const CDERR_LOADRESFAILURE = &H0007
36Const CDERR_LOCKRESFAILURE = &H0008
37Const CDERR_MEMALLOCFAILURE = &H0009
38Const CDERR_MEMLOCKFAILURE = &H000A
39Const CDERR_NOHOOK = &H000B
40Const CDERR_REGISTERMSGFAIL = &H000C
41
42Const PDERR_PRINTERCODES = &H1000
43Const PDERR_SETUPFAILURE = &H1001
44Const PDERR_PARSEFAILURE = &H1002
45Const PDERR_RETDEFFAILURE = &H1003
46Const PDERR_LOADDRVFAILURE = &H1004
47Const PDERR_GETDEVMODEFAIL = &H1005
48Const PDERR_INITFAILURE = &H1006
49Const PDERR_NODEVICES = &H1007
50Const PDERR_NODEFAULTPRN = &H1008
51Const PDERR_DNDMMISMATCH = &H1009
52Const PDERR_CREATEICFAILURE = &H100A
53Const PDERR_PRINTERNOTFOUND = &H100B
54Const PDERR_DEFAULTDIFFERENT = &H100C
55
56Const CFERR_CHOOSEFONTCODES = &H2000
57Const CFERR_NOFONTS = &H2001
58Const CFERR_MAXLESSTHANMIN = &H2002
59
60Const FNERR_FILENAMECODES = &H3000
61Const FNERR_SUBCLASSFAILURE = &H3001
62Const FNERR_INVALIDFILENAME = &H3002
63Const FNERR_BUFFERTOOSMALL = &H3003
64
65Const FRERR_FINDREPLACECODES = &H4000
66Const FRERR_BUFFERLENGTHZERO = &H4001
67
68Const CCERR_CHOOSECOLORCODES = &H5000
69Declare Function CommDlgExtendedError Lib "comdlg32" () As DWord
70
71
72'-------------
73' ChooseColor
74'-------------
75Const CC_RGBINIT = &H00000001
76Const CC_FULLOPEN = &H00000002
77Const CC_PREVENTFULLOPEN = &H00000004
78Const CC_SHOWHELP = &H00000008
79Const CC_ENABLEHOOK = &H00000010
80Const CC_ENABLETEMPLATE = &H00000020
81Const CC_ENABLETEMPLATEHANDLE = &H00000040
82Const CC_SOLIDCOLOR = &H00000080
83Const CC_ANYCOLOR = &H00000100
84TypeDef LPCCHOOKPROC = LPCOMMDLGHOOKPROC
85Type CHOOSECOLORW
86 lStructSize As DWord
87 hwndOwner As HWND
88 hInstance As HINSTANCE
89 rgbResult As DWord
90 lpCustColors As *DWord
91 Flags As DWord
92 lCustData As DWord
93 lpfnHook As LPCCHOOKPROC
94 lpTemplateName As LPCWSTR
95End Type
96Type CHOOSECOLORA
97 lStructSize As DWord
98 hwndOwner As HWND
99 hInstance As HINSTANCE
100 rgbResult As DWord
101 lpCustColors As *DWord
102 Flags As DWord
103 lCustData As DWord
104 lpfnHook As LPCCHOOKPROC
105 lpTemplateName As LPCSTR
106End Type
107#ifdef UNICODE
108TypeDef CHOOSECOLOR = CHOOSECOLORW
109#else
110TypeDef CHOOSECOLOR = CHOOSECOLORA
111#endif
112Declare Function ChooseColor Lib "comdlg32" Alias _FuncName_ChooseColor (ByRef cc As CHOOSECOLOR) As BOOL
113
114
115'------------
116' ChooseFont
117'------------
118Const CF_SCREENFONTS = &H00000001
119Const CF_PRINTERFONTS = &H00000002
120Const CF_BOTH = CF_SCREENFONTS or CF_PRINTERFONTS
121Const CF_SHOWHELP = &H00000004
122Const CF_ENABLEHOOK = &H00000008
123Const CF_ENABLETEMPLATE = &H00000010
124Const CF_ENABLETEMPLATEHANDLE = &H00000020
125Const CF_INITTOLOGFONTSTRUCT = &H00000040
126Const CF_USESTYLE = &H00000080
127Const CF_EFFECTS = &H00000100
128Const CF_APPLY = &H00000200
129Const CF_ANSIONLY = &H00000400
130Const CF_SCRIPTSONLY = CF_ANSIONLY
131Const CF_NOVECTORFONTS = &H00000800
132Const CF_NOOEMFONTS = CF_NOVECTORFONTS
133Const CF_NOSIMULATIONS = &H00001000
134Const CF_LIMITSIZE = &H00002000
135Const CF_FIXEDPITCHONLY = &H00004000
136Const CF_WYSIWYG = &H00008000
137Const CF_FORCEFONTEXIST = &H00010000
138Const CF_SCALABLEONLY = &H00020000
139Const CF_TTONLY = &H00040000
140Const CF_NOFACESEL = &H00080000
141Const CF_NOSTYLESEL = &H00100000
142Const CF_NOSIZESEL = &H00200000
143Const CF_SELECTSCRIPT = &H00400000
144Const CF_NOSCRIPTSEL = &H00800000
145Const CF_NOVERTFONTS = &H01000000
146Const SIMULATED_FONTTYPE = &H8000
147Const PRINTER_FONTTYPE = &H4000
148Const SCREEN_FONTTYPE = &H2000
149Const BOLD_FONTTYPE = &H0100
150Const ITALIC_FONTTYPE = &H0200
151Const REGULAR_FONTTYPE = &H0400
152TypeDef LPCFHOOKPROC = LPCOMMDLGHOOKPROC
153Type CHOOSEFONTW
154 lStructSize As DWord
155 hwndOwner As HWND
156 hDC As HDC
157 lpLogFont As *LOGFONTW
158 iPointSize As Long
159 Flags As DWord
160 rgbColors As DWord
161 lCustData As LPARAM
162 lpfnHook As LPCFHOOKPROC
163 lpTemplateName As LPCWSTR
164 hInstance As HINSTANCE
165 lpszStyle As LPWSTR
166 nFontType As Word
167 ___MISSING_ALIGNMENT__ As Word
168 nSizeMin As Long
169 nSizeMax As Long
170End Type
171Type CHOOSEFONTA
172 lStructSize As DWord
173 hwndOwner As HWND
174 hDC As HDC
175 lpLogFont As *LOGFONTA
176 iPointSize As Long
177 Flags As DWord
178 rgbColors As DWord
179 lCustData As LPARAM
180 lpfnHook As LPCFHOOKPROC
181 lpTemplateName As LPCSTR
182 hInstance As HINSTANCE
183 lpszStyle As LPSTR
184 nFontType As Word
185 ___MISSING_ALIGNMENT__ As Word
186 nSizeMin As Long
187 nSizeMax As Long
188End Type
189#ifdef UNICODE
190TypeDef CHOOSEFONT = CHOOSEFONTW
191#else
192TypeDef CHOOSEFONT = CHOOSEFONTA
193#endif
194Declare Function ChooseFont Lib "comdlg32" Alias _FuncName_ChooseFont (ByRef cf As CHOOSEFONT) As BOOL
195
196
197'----------
198' FindText
199'----------
200Const FR_DOWN = &H00000001
201Const FR_WHOLEWORD = &H00000002
202Const FR_MATCHCASE = &H00000004
203Const FR_FINDNEXT = &H00000008
204Const FR_REPLACE = &H00000010
205Const FR_REPLACEALL = &H00000020
206Const FR_DIALOGTERM = &H00000040
207Const FR_SHOWHELP = &H00000080
208Const FR_ENABLEHOOK = &H00000100
209Const FR_ENABLETEMPLATE = &H00000200
210Const FR_NOUPDOWN = &H00000400
211Const FR_NOMATCHCASE = &H00000800
212Const FR_NOWHOLEWORD = &H00001000
213Const FR_ENABLETEMPLATEHANDLE = &H00002000
214Const FR_HIDEUPDOWN = &H00004000
215Const FR_HIDEMATCHCASE = &H00008000
216Const FR_HIDEWHOLEWORD = &H00010000
217TypeDef LPFRHOOKPROC = LPCOMMDLGHOOKPROC
218Type FINDREPLACEW
219 lStructSize As DWord
220 hwndOwner As HWND
221 hInstance As HINSTANCE
222 Flags As DWord
223 lpstrFindWhat As LPWSTR
224 lpstrReplaceWith As LPWSTR
225 wFindWhatLen As Word
226 wReplaceWithLen As Word
227 lCustData As LPARAM
228 lpfnHook As LPFRHOOKPROC
229 lpTemplateName As LPCWSTR
230End Type
231Type FINDREPLACEA
232 lStructSize As DWord
233 hwndOwner As HWND
234 hInstance As HINSTANCE
235 Flags As DWord
236 lpstrFindWhat As LPSTR
237 lpstrReplaceWith As LPSTR
238 wFindWhatLen As Word
239 wReplaceWithLen As Word
240 lCustData As LPARAM
241 lpfnHook As LPFRHOOKPROC
242 lpTemplateName As LPCSTR
243End Type
244#ifdef UNICODE
245TypeDef FINDREPLACE = FINDREPLACEW
246#else
247TypeDef FINDREPLACE = FINDREPLACEA
248#endif
249Declare Function FindText Lib "comdlg32" Alias _FuncName_FindText (ByRef fr As FINDREPLACE) As BOOL
250
251
252'------------------------
253' Get Open/Save FileName
254'------------------------
255Const OFN_READONLY = &H00000001
256Const OFN_OVERWRITEPROMPT = &H00000002
257Const OFN_HIDEREADONLY = &H00000004
258Const OFN_NOCHANGEDIR = &H00000008
259Const OFN_SHOWHELP = &H00000010
260Const OFN_ENABLEHOOK = &H00000020
261Const OFN_ENABLETEMPLATE = &H00000040
262Const OFN_ENABLETEMPLATEHANDLE = &H00000080
263Const OFN_NOVALIDATE = &H00000100
264Const OFN_ALLOWMULTISELECT = &H00000200
265Const OFN_EXTENSIONDIFFERENT = &H00000400
266Const OFN_PATHMUSTEXIST = &H00000800
267Const OFN_FILEMUSTEXIST = &H00001000
268Const OFN_CREATEPROMPT = &H00002000
269Const OFN_SHAREAWARE = &H00004000
270Const OFN_NOREADONLYRETURN = &H00008000
271Const OFN_NOTESTFILECREATE = &H00010000
272Const OFN_NONETWORKBUTTON = &H00020000
273Const OFN_NOLONGNAMES = &H00040000
274Const OFN_EXPLORER = &H00080000
275Const OFN_NODEREFERENCELINKS = &H00100000
276Const OFN_LONGNAMES = &H00200000
277Const OFN_ENABLEINCLUDENOTIFY = &H00400000
278Const OFN_ENABLESIZING = &H00800000
279TypeDef LPOFNHOOKPROC = LPCOMMDLGHOOKPROC
280Type OPENFILENAMEW
281 lStructSize As DWord
282 hwndOwner As HWND
283 hInstance As HINSTANCE
284 lpstrFilter As LPCWSTR
285 lpstrCustomFilter As LPWSTR
286 nMaxCustFilter As DWord
287 nFilterIndex As DWord
288 lpstrFile As LPWSTR
289 nMaxFile As DWord
290 lpstrFileTitle As LPWSTR
291 nMaxFileTitle As DWord
292 lpstrInitialDir As LPCWSTR
293 lpstrTitle As LPCWSTR
294 Flags As DWord
295 nFileOffset As Word
296 nFileExtension As Word
297 lpstrDefExt As LPCWSTR
298 lCustData As LPARAM
299 lpfnHook As LPOFNHOOKPROC
300 lpTemplateName As LPCWSTR
301End Type
302Type OPENFILENAMEA
303 lStructSize As DWord
304 hwndOwner As HWND
305 hInstance As HINSTANCE
306 lpstrFilter As LPCSTR
307 lpstrCustomFilter As LPSTR
308 nMaxCustFilter As DWord
309 nFilterIndex As DWord
310 lpstrFile As LPSTR
311 nMaxFile As DWord
312 lpstrFileTitle As LPSTR
313 nMaxFileTitle As DWord
314 lpstrInitialDir As LPCSTR
315 lpstrTitle As LPCSTR
316 Flags As DWord
317 nFileOffset As Word
318 nFileExtension As Word
319 lpstrDefExt As LPCSTR
320 lCustData As LPARAM
321 lpfnHook As LPOFNHOOKPROC
322 lpTemplateName As LPCSTR
323End Type
324#ifdef UNICODE
325TypeDef OPENFILENAME = OPENFILENAMEW
326#else
327TypeDef OPENFILENAME = OPENFILENAMEA
328#endif
329Declare Function GetOpenFileName Lib "comdlg32" Alias _FuncName_GetOpenFileName (ByRef ofn As OPENFILENAME) As BOOL
330Declare Function GetSaveFileName Lib "comdlg32" Alias _FuncName_GetSaveFileName (ByRef ofn As OPENFILENAME) As BOOL
331Declare Function GetFileTitle Lib "comdlg32" Alias _FuncName_GetFileTitle (lpszFile As LPCTSTR, lpszTitle As LPTSTR, cbBuf As Word) As Integer
332
333
334'--------------
335' PageSetupDlg
336'--------------
337Const PSD_DEFAULTMINMARGINS = &H00000000
338Const PSD_INWININIINTLMEASURE = &H00000000
339Const PSD_MINMARGINS = &H00000001
340Const PSD_MARGINS = &H00000002
341Const PSD_INTHOUSANDTHSOFINCHES = &H00000004
342Const PSD_INHUNDREDTHSOFMILLIMETERS = &H00000008
343Const PSD_DISABLEMARGINS = &H00000010
344Const PSD_DISABLEPRINTER = &H00000020
345Const PSD_NOWARNING = &H00000080
346Const PSD_DISABLEORIENTATION = &H00000100
347Const PSD_RETURNDEFAULT = &H00000400
348Const PSD_DISABLEPAPER = &H00000200
349Const PSD_SHOWHELP = &H00000800
350Const PSD_ENABLEPAGESETUPHOOK = &H00002000
351Const PSD_ENABLEPAGESETUPTEMPLATE = &H00008000
352Const PSD_ENABLEPAGESETUPTEMPLATEHANDLE = &H00020000
353Const PSD_ENABLEPAGEPAINTHOOK = &H00040000
354Const PSD_DISABLEPAGEPAINTING = &H00080000
355Const PSD_NONETWORKBUTTON = &H00200000
356TypeDef LPPAGESETUPHOOK = LPCOMMDLGHOOKPROC
357TypeDef LPPAGEPAINTHOOK = LPCOMMDLGHOOKPROC
358Type PAGESETUPDLGW
359 lStructSize As DWord
360 hwndOwner As HWND
361 hDevMode As HGLOBAL
362 hDevNames As HGLOBAL
363 Flags As DWord
364 ptPaperSize As POINTAPI
365 rtMinMargin As RECT
366 rtMargin As RECT
367 hInstance As HINSTANCE
368 lCustData As LPARAM
369 lpfnPageSetupHook As LPPAGESETUPHOOK
370 lpfnPagePaintHook As LPPAGEPAINTHOOK
371 lpPageSetupTemplateName As LPCWSTR
372 hPageSetupTemplate As HGLOBAL
373End Type
374Type PAGESETUPDLGA
375 lStructSize As DWord
376 hwndOwner As HWND
377 hDevMode As HGLOBAL
378 hDevNames As HGLOBAL
379 Flags As DWord
380 ptPaperSize As POINTAPI
381 rtMinMargin As RECT
382 rtMargin As RECT
383 hInstance As HINSTANCE
384 lCustData As LPARAM
385 lpfnPageSetupHook As LPPAGESETUPHOOK
386 lpfnPagePaintHook As LPPAGEPAINTHOOK
387 lpPageSetupTemplateName As LPCSTR
388 hPageSetupTemplate As HGLOBAL
389End Type
390#ifdef UNICODE
391TypeDef PAGESETUPDLG = PAGESETUPDLGW
392#else
393TypeDef PAGESETUPDLG = PAGESETUPDLGA
394#endif
395
396Declare Function PageSetupDlg Lib "comdlg32" Alias _FuncName_PageSetupDlg (ByRef psd As PAGESETUPDLG) As BOOL
397
398
399'----------
400' PrintDlg
401'----------
402Const PD_ALLPAGES = &H00000000
403Const PD_SELECTION = &H00000001
404Const PD_PAGENUMS = &H00000002
405Const PD_NOSELECTION = &H00000004
406Const PD_NOPAGENUMS = &H00000008
407Const PD_COLLATE = &H00000010
408Const PD_PRINTTOFILE = &H00000020
409Const PD_PRINTSETUP = &H00000040
410Const PD_NOWARNING = &H00000080
411Const PD_RETURNDC = &H00000100
412Const PD_RETURNIC = &H00000200
413Const PD_RETURNDEFAULT = &H00000400
414Const PD_SHOWHELP = &H00000800
415Const PD_ENABLEPRINTHOOK = &H00001000
416Const PD_ENABLESETUPHOOK = &H00002000
417Const PD_ENABLEPRINTTEMPLATE = &H00004000
418Const PD_ENABLESETUPTEMPLATE = &H00008000
419Const PD_ENABLEPRINTTEMPLATEHANDLE = &H00010000
420Const PD_ENABLESETUPTEMPLATEHANDLE = &H00020000
421Const PD_USEDEVMODECOPIES = &H00040000
422Const PD_USEDEVMODECOPIESANDCOLLATE = &H00040000
423Const PD_DISABLEPRINTTOFILE = &H00080000
424Const PD_HIDEPRINTTOFILE = &H00100000
425Const PD_NONETWORKBUTTON = &H00200000
426TypeDef LPPAGEPAINTHOOK = LPCOMMDLGHOOKPROC
427TypeDef LPSETUPHOOKPROC = LPCOMMDLGHOOKPROC
428#ifdef _WIN64
429Type PRINTDLGW
430#else
431Type Align(1) PRINTDLGW
432#endif
433 lStructSize As DWord
434 hwndOwner As HWND
435 hDevMode As HGLOBAL
436 hDevNames As HGLOBAL
437 hDC As HDC
438 Flags As DWord
439 nFromPage As Word
440 nToPage As Word
441 nMinPage As Word
442 nMaxPage As Word
443 nCopies As Word
444 hInstance As HINSTANCE
445 lCustData As LPARAM
446 lpfnPrintHook As LPPAGEPAINTHOOK
447 lpfnSetupHook As LPSETUPHOOKPROC
448 lpPrintTemplateName As LPCWSTR
449 lpSetupTemplateName As LPCWSTR
450 hPrintTemplate As HGLOBAL
451 hSetupTemplate As HGLOBAL
452End Type
453#ifdef _WIN64
454Type PRINTDLGA
455#else
456Type Align(1) PRINTDLGA
457#endif
458 lStructSize As DWord
459 hwndOwner As HWND
460 hDevMode As HGLOBAL
461 hDevNames As HGLOBAL
462 hDC As HDC
463 Flags As DWord
464 nFromPage As Word
465 nToPage As Word
466 nMinPage As Word
467 nMaxPage As Word
468 nCopies As Word
469 hInstance As HINSTANCE
470 lCustData As LPARAM
471 lpfnPrintHook As LPPAGEPAINTHOOK
472 lpfnSetupHook As LPSETUPHOOKPROC
473 lpPrintTemplateName As LPCSTR
474 lpSetupTemplateName As LPCSTR
475 hPrintTemplate As HGLOBAL
476 hSetupTemplate As HGLOBAL
477End Type
478#ifdef UNICODE
479TypeDef PRINTDLG = PRINTDLGW
480#else
481TypeDef PRINTDLG = PRINTDLGA
482#endif
483Declare Function PrintDlg Lib "comdlg32" Alias _FuncName_PrintDlg (ByRef pd As PRINTDLG) As BOOL
Note: See TracBrowser for help on using the repository browser.