source: branch/egtra-gdiplus/api_commdlg.sbp@ 552

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

#50 API宣言の変更完了

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