4 #pragma GCC system_header
12 #define LBSELCHSTRINGA "commdlg_LBSelChangedNotify"
13 #define SHAREVISTRINGA "commdlg_ShareViolation"
14 #define FILEOKSTRINGA "commdlg_FileNameOK"
15 #define COLOROKSTRINGA "commdlg_ColorOK"
16 #define SETRGBSTRINGA "commdlg_SetRGBColor"
17 #define HELPMSGSTRINGA "commdlg_help"
18 #define FINDMSGSTRINGA "commdlg_FindReplace"
19 #define LBSELCHSTRINGW L"commdlg_LBSelChangedNotify"
20 #define SHAREVISTRINGW L"commdlg_ShareViolation"
21 #define FILEOKSTRINGW L"commdlg_FileNameOK"
22 #define COLOROKSTRINGW L"commdlg_ColorOK"
23 #define SETRGBSTRINGW L"commdlg_SetRGBColor"
24 #define HELPMSGSTRINGW L"commdlg_help"
25 #define FINDMSGSTRINGW L"commdlg_FindReplace"
27 #define CDN_FIRST ((UINT)-601) /* also in commctrl.h */
28 #define CDN_LAST ((UINT)-699)
30 #define CDN_INITDONE CDN_FIRST
31 #define CDN_SELCHANGE (CDN_FIRST-1U)
32 #define CDN_FOLDERCHANGE (CDN_FIRST-2U)
33 #define CDN_SHAREVIOLATION (CDN_FIRST-3U)
34 #define CDN_HELP (CDN_FIRST-4U)
35 #define CDN_FILEOK (CDN_FIRST-5U)
36 #define CDN_TYPECHANGE (CDN_FIRST-6U)
37 #define CDM_FIRST (WM_USER+100)
38 #define CDM_LAST (WM_USER+200)
39 #define CDM_GETSPEC CDM_FIRST
40 #define CDM_GETFILEPATH (CDM_FIRST+1)
41 #define CDM_GETFOLDERPATH (CDM_FIRST+2)
42 #define CDM_GETFOLDERIDLIST (CDM_FIRST+3)
43 #define CDM_SETCONTROLTEXT (CDM_FIRST+4)
44 #define CDM_HIDECONTROL (CDM_FIRST+5)
45 #define CDM_SETDEFEXT (CDM_FIRST+6)
48 #define CC_PREVENTFULLOPEN 4
50 #define CC_ENABLEHOOK 16
51 #define CC_ENABLETEMPLATE 32
52 #define CC_ENABLETEMPLATEHANDLE 64
53 #define CC_SOLIDCOLOR 128
54 #define CC_ANYCOLOR 256
55 #define CF_SCREENFONTS 1
56 #define CF_PRINTERFONTS 2
59 #define CF_ENABLEHOOK 8
60 #define CF_ENABLETEMPLATE 16
61 #define CF_ENABLETEMPLATEHANDLE 32
62 #define CF_INITTOLOGFONTSTRUCT 64
63 #define CF_USESTYLE 128
64 #define CF_EFFECTS 256
66 #define CF_ANSIONLY 1024
67 #define CF_SCRIPTSONLY CF_ANSIONLY
68 #define CF_NOVECTORFONTS 2048
69 #define CF_NOOEMFONTS 2048
70 #define CF_NOSIMULATIONS 4096
71 #define CF_LIMITSIZE 8192
72 #define CF_FIXEDPITCHONLY 16384
73 #define CF_WYSIWYG 32768
74 #define CF_FORCEFONTEXIST 65536
75 #define CF_SCALABLEONLY 131072
76 #define CF_TTONLY 262144
77 #define CF_NOFACESEL 524288
78 #define CF_NOSTYLESEL 1048576
79 #define CF_NOSIZESEL 2097152
80 #define CF_SELECTSCRIPT 4194304
81 #define CF_NOSCRIPTSEL 8388608
82 #define CF_NOVERTFONTS 0x1000000
83 #define SIMULATED_FONTTYPE 0x8000
84 #define PRINTER_FONTTYPE 0x4000
85 #define SCREEN_FONTTYPE 0x2000
86 #define BOLD_FONTTYPE 0x100
87 #define ITALIC_FONTTYPE 0x0200
88 #define REGULAR_FONTTYPE 0x0400
89 #define WM_CHOOSEFONT_GETLOGFONT (WM_USER+1)
90 #define WM_CHOOSEFONT_SETLOGFONT (WM_USER+101)
91 #define WM_CHOOSEFONT_SETFLAGS (WM_USER+102)
92 #define OFN_ALLOWMULTISELECT 512
93 #define OFN_CREATEPROMPT 0x2000
94 #define OFN_ENABLEHOOK 32
95 #define OFN_ENABLESIZING 0x800000
96 #define OFN_ENABLETEMPLATE 64
97 #define OFN_ENABLETEMPLATEHANDLE 128
98 #define OFN_EXPLORER 0x80000
99 #define OFN_EXTENSIONDIFFERENT 0x400
100 #define OFN_FILEMUSTEXIST 0x1000
101 #define OFN_HIDEREADONLY 4
102 #define OFN_LONGNAMES 0x200000
103 #define OFN_NOCHANGEDIR 8
104 #define OFN_NODEREFERENCELINKS 0x100000
105 #define OFN_NOLONGNAMES 0x40000
106 #define OFN_NONETWORKBUTTON 0x20000
107 #define OFN_NOREADONLYRETURN 0x8000
108 #define OFN_NOTESTFILECREATE 0x10000
109 #define OFN_NOVALIDATE 256
110 #define OFN_OVERWRITEPROMPT 2
111 #define OFN_PATHMUSTEXIST 0x800
112 #define OFN_READONLY 1
113 #define OFN_SHAREAWARE 0x4000
114 #define OFN_SHOWHELP 16
115 #define OFN_SHAREFALLTHROUGH 2
116 #define OFN_SHARENOWARN 1
117 #define OFN_SHAREWARN 0
118 #define OFN_NODEREFERENCELINKS 0x100000
119 #define FR_DIALOGTERM 64
121 #define FR_ENABLEHOOK 256
122 #define FR_ENABLETEMPLATE 512
123 #define FR_ENABLETEMPLATEHANDLE 0x2000
124 #define FR_FINDNEXT 8
125 #define FR_HIDEUPDOWN 0x4000
126 #define FR_HIDEMATCHCASE 0x8000
127 #define FR_HIDEWHOLEWORD 0x10000
128 #define FR_MATCHALEFHAMZA 0x80000000
129 #define FR_MATCHCASE 4
130 #define FR_MATCHDIAC 0x20000000
131 #define FR_MATCHKASHIDA 0x40000000
132 #define FR_NOMATCHCASE 0x800
133 #define FR_NOUPDOWN 0x400
134 #define FR_NOWHOLEWORD 4096
135 #define FR_REPLACE 16
136 #define FR_REPLACEALL 32
137 #define FR_SHOWHELP 128
138 #define FR_WHOLEWORD 2
139 #define PD_ALLPAGES 0
140 #define PD_SELECTION 1
141 #define PD_PAGENUMS 2
142 #define PD_NOSELECTION 4
143 #define PD_NOPAGENUMS 8
144 #define PD_COLLATE 16
145 #define PD_PRINTTOFILE 32
146 #define PD_PRINTSETUP 64
147 #define PD_NOWARNING 128
148 #define PD_RETURNDC 256
149 #define PD_RETURNIC 512
150 #define PD_RETURNDEFAULT 1024
151 #define PD_SHOWHELP 2048
152 #define PD_ENABLEPRINTHOOK 4096
153 #define PD_ENABLESETUPHOOK 8192
154 #define PD_ENABLEPRINTTEMPLATE 16384
155 #define PD_ENABLESETUPTEMPLATE 32768
156 #define PD_ENABLEPRINTTEMPLATEHANDLE 65536
157 #define PD_ENABLESETUPTEMPLATEHANDLE 0x20000
158 #define PD_USEDEVMODECOPIES 0x40000
159 #define PD_USEDEVMODECOPIESANDCOLLATE 0x40000
160 #define PD_DISABLEPRINTTOFILE 0x80000
161 #define PD_HIDEPRINTTOFILE 0x100000
162 #define PD_NONETWORKBUTTON 0x200000
163 #define PSD_DEFAULTMINMARGINS 0
164 #define PSD_INWININIINTLMEASURE 0
165 #define PSD_MINMARGINS 1
166 #define PSD_MARGINS 2
167 #define PSD_INTHOUSANDTHSOFINCHES 4
168 #define PSD_INHUNDREDTHSOFMILLIMETERS 8
169 #define PSD_DISABLEMARGINS 16
170 #define PSD_DISABLEPRINTER 32
171 #define PSD_NOWARNING 128
172 #define PSD_DISABLEORIENTATION 256
173 #define PSD_DISABLEPAPER 512
174 #define PSD_RETURNDEFAULT 1024
175 #define PSD_SHOWHELP 2048
176 #define PSD_ENABLEPAGESETUPHOOK 8192
177 #define PSD_ENABLEPAGESETUPTEMPLATE 0x8000
178 #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x20000
179 #define PSD_ENABLEPAGEPAINTHOOK 0x40000
180 #define PSD_DISABLEPAGEPAINTING 0x80000
181 #define WM_PSD_PAGESETUPDLG WM_USER
182 #define WM_PSD_FULLPAGERECT (WM_USER+1)
183 #define WM_PSD_MINMARGINRECT (WM_USER+2)
184 #define WM_PSD_MARGINRECT (WM_USER+3)
185 #define WM_PSD_GREEKTEXTRECT (WM_USER+4)
186 #define WM_PSD_ENVSTAMPRECT (WM_USER+5)
187 #define WM_PSD_YAFULLPAGERECT (WM_USER+6)
188 #define CD_LBSELNOITEMS (-1)
189 #define CD_LBSELCHANGE 0
190 #define CD_LBSELSUB 1
191 #define CD_LBSELADD 2
192 #define DN_DEFAULTPRN 1
196 #define SNDMSG ::SendMessage
198 #define SNDMSG SendMessage
200 #endif /* ifndef SNDMSG */
202 #define CommDlg_OpenSave_GetSpec(d,s,m) ((int)SNDMSG((d),CDM_GETSPEC,(m),(LPARAM)(s)))
203 #define CommDlg_OpenSave_GetSpecA CommDlg_OpenSave_GetSpec
204 #define CommDlg_OpenSave_GetSpecW CommDlg_OpenSave_GetSpec
205 #define CommDlg_OpenSave_GetFilePath(d,s,m) ((int)SNDMSG((d),CDM_GETFILEPATH,(m),(LPARAM)(s)))
206 #define CommDlg_OpenSave_GetFilePathA CommDlg_OpenSave_GetFilePath
207 #define CommDlg_OpenSave_GetFilePathW CommDlg_OpenSave_GetFilePath
208 #define CommDlg_OpenSave_GetFolderPath(d,s,m) ((int)SNDMSG((d),CDM_GETFOLDERPATH,(m),(LPARAM)(LPSTR)(s)))
209 #define CommDlg_OpenSave_GetFolderPathA CommDlg_OpenSave_GetFolderPath
210 #define CommDlg_OpenSave_GetFolderPathW CommDlg_OpenSave_GetFolderPath
211 #define CommDlg_OpenSave_GetFolderIDList(d,i,m) ((int)SNDMSG((d),CDM_GETFOLDERIDLIST,(m),(LPARAM)(i)))
212 #define CommDlg_OpenSave_SetControlText(d,i,t) ((void)SNDMSG((d),CDM_SETCONTROLTEXT,(i),(LPARAM)(t)))
213 #define CommDlg_OpenSave_HideControl(d,i) ((void)SNDMSG((d),CDM_HIDECONTROL,(i),0))
214 #define CommDlg_OpenSave_SetDefExt(d,e) ((void)SNDMSG((d),CDM_SETDEFEXT,0,(LPARAM)(e)))
216 typedef UINT (APIENTRY
*__CDHOOKPROC
)(HWND
,UINT
,WPARAM
,LPARAM
);
217 typedef __CDHOOKPROC LPCCHOOKPROC
;
218 typedef __CDHOOKPROC LPCFHOOKPROC
;
219 typedef __CDHOOKPROC LPFRHOOKPROC
;
220 typedef __CDHOOKPROC LPOFNHOOKPROC
;
221 typedef __CDHOOKPROC LPPAGEPAINTHOOK
;
222 typedef __CDHOOKPROC LPPAGESETUPHOOK
;
223 typedef __CDHOOKPROC LPSETUPHOOKPROC
;
224 typedef __CDHOOKPROC LPPRINTHOOKPROC
;
225 typedef struct tagCHOOSECOLORA
{
230 COLORREF
* lpCustColors
;
233 LPCCHOOKPROC lpfnHook
;
234 LPCSTR lpTemplateName
;
235 } CHOOSECOLORA
,*LPCHOOSECOLORA
;
236 typedef struct tagCHOOSECOLORW
{
241 COLORREF
* lpCustColors
;
244 LPCCHOOKPROC lpfnHook
;
245 LPCWSTR lpTemplateName
;
246 } CHOOSECOLORW
,*LPCHOOSECOLORW
;
247 typedef struct tagCHOOSEFONTA
{
251 LPLOGFONTA lpLogFont
;
256 LPCFHOOKPROC lpfnHook
;
257 LPCSTR lpTemplateName
;
261 WORD ___MISSING_ALIGNMENT__
;
264 } CHOOSEFONTA
,*LPCHOOSEFONTA
;
265 typedef struct tagCHOOSEFONTW
{
269 LPLOGFONTW lpLogFont
;
274 LPCFHOOKPROC lpfnHook
;
275 LPCWSTR lpTemplateName
;
279 WORD ___MISSING_ALIGNMENT__
;
282 } CHOOSEFONTW
,*LPCHOOSEFONTW
;
283 typedef struct tagDEVNAMES
{
288 } DEVNAMES
,*LPDEVNAMES
;
295 LPSTR lpstrReplaceWith
;
297 WORD wReplaceWithLen
;
299 LPFRHOOKPROC lpfnHook
;
300 LPCSTR lpTemplateName
;
301 } FINDREPLACEA
,*LPFINDREPLACEA
;
307 LPWSTR lpstrFindWhat
;
308 LPWSTR lpstrReplaceWith
;
310 WORD wReplaceWithLen
;
312 LPFRHOOKPROC lpfnHook
;
313 LPCWSTR lpTemplateName
;
314 } FINDREPLACEW
,*LPFINDREPLACEW
;
315 typedef struct tagOFNA
{
320 LPSTR lpstrCustomFilter
;
321 DWORD nMaxCustFilter
;
325 LPSTR lpstrFileTitle
;
327 LPCSTR lpstrInitialDir
;
334 LPOFNHOOKPROC lpfnHook
;
335 LPCSTR lpTemplateName
;
336 } OPENFILENAMEA
,*LPOPENFILENAMEA
;
337 typedef struct tagOFNW
{
342 LPWSTR lpstrCustomFilter
;
343 DWORD nMaxCustFilter
;
347 LPWSTR lpstrFileTitle
;
349 LPCWSTR lpstrInitialDir
;
356 LPOFNHOOKPROC lpfnHook
;
357 LPCWSTR lpTemplateName
;
358 } OPENFILENAMEW
,*LPOPENFILENAMEW
;
359 typedef struct _OFNOTIFYA
{
361 LPOPENFILENAMEA lpOFN
;
363 } OFNOTIFYA
,*LPOFNOTIFYA
;
364 typedef struct _OFNOTIFYW
{
366 LPOPENFILENAMEW lpOFN
;
368 } OFNOTIFYW
,*LPOFNOTIFYW
;
369 typedef struct tagPSDA
{
380 LPPAGESETUPHOOK lpfnPageSetupHook
;
381 LPPAGEPAINTHOOK lpfnPagePaintHook
;
382 LPCSTR lpPageSetupTemplateName
;
383 HGLOBAL hPageSetupTemplate
;
384 } PAGESETUPDLGA
,*LPPAGESETUPDLGA
;
385 typedef struct tagPSDW
{
396 LPPAGESETUPHOOK lpfnPageSetupHook
;
397 LPPAGEPAINTHOOK lpfnPagePaintHook
;
398 LPCWSTR lpPageSetupTemplateName
;
399 HGLOBAL hPageSetupTemplate
;
400 } PAGESETUPDLGW
,*LPPAGESETUPDLGW
;
401 typedef struct tagPDA
{
415 LPPRINTHOOKPROC lpfnPrintHook
;
416 LPSETUPHOOKPROC lpfnSetupHook
;
417 LPCSTR lpPrintTemplateName
;
418 LPCSTR lpSetupTemplateName
;
419 HANDLE hPrintTemplate
;
420 HANDLE hSetupTemplate
;
421 } PRINTDLGA
,*LPPRINTDLGA
;
422 typedef struct tagPDW
{
436 LPPRINTHOOKPROC lpfnPrintHook
;
437 LPSETUPHOOKPROC lpfnSetupHook
;
438 LPCWSTR lpPrintTemplateName
;
439 LPCWSTR lpSetupTemplateName
;
440 HANDLE hPrintTemplate
;
441 HANDLE hSetupTemplate
;
442 } PRINTDLGW
,*LPPRINTDLGW
;
443 #if (WINVER >= 0x0500) && !defined (__OBJC__)
444 #include <unknwn.h> /* for LPUNKNOWN */
445 #include <prsht.h> /* for HPROPSHEETPAGE */
446 typedef struct tagPRINTPAGERANGE
{
449 } PRINTPAGERANGE
, *LPPRINTPAGERANGE
;
450 typedef struct tagPDEXA
{
458 DWORD ExclusionFlags
;
460 DWORD nMaxPageRanges
;
461 LPPRINTPAGERANGE lpPageRanges
;
466 LPCSTR lpPrintTemplateName
;
467 LPUNKNOWN lpCallback
;
468 DWORD nPropertyPages
;
469 HPROPSHEETPAGE
*lphPropertyPages
;
471 DWORD dwResultAction
;
472 } PRINTDLGEXA
, *LPPRINTDLGEXA
;
473 typedef struct tagPDEXW
{
481 DWORD ExclusionFlags
;
483 DWORD nMaxPageRanges
;
484 LPPRINTPAGERANGE lpPageRanges
;
489 LPCWSTR lpPrintTemplateName
;
490 LPUNKNOWN lpCallback
;
491 DWORD nPropertyPages
;
492 HPROPSHEETPAGE
*lphPropertyPages
;
494 DWORD dwResultAction
;
495 } PRINTDLGEXW
, *LPPRINTDLGEXW
;
496 #endif /* WINVER >= 0x0500 */
498 BOOL WINAPI
ChooseColorA(LPCHOOSECOLORA
);
499 BOOL WINAPI
ChooseColorW(LPCHOOSECOLORW
);
500 BOOL WINAPI
ChooseFontA(LPCHOOSEFONTA
);
501 BOOL WINAPI
ChooseFontW(LPCHOOSEFONTW
);
502 DWORD WINAPI
CommDlgExtendedError(void);
503 HWND WINAPI
FindTextA(LPFINDREPLACEA
);
504 HWND WINAPI
FindTextW(LPFINDREPLACEW
);
505 short WINAPI
GetFileTitleA(LPCSTR
,LPSTR
,WORD
);
506 short WINAPI
GetFileTitleW(LPCWSTR
,LPWSTR
,WORD
);
507 BOOL WINAPI
GetOpenFileNameA(LPOPENFILENAMEA
);
508 BOOL WINAPI
GetOpenFileNameW(LPOPENFILENAMEW
);
509 BOOL WINAPI
GetSaveFileNameA(LPOPENFILENAMEA
);
510 BOOL WINAPI
GetSaveFileNameW(LPOPENFILENAMEW
);
511 BOOL WINAPI
PageSetupDlgA(LPPAGESETUPDLGA
);
512 BOOL WINAPI
PageSetupDlgW(LPPAGESETUPDLGW
);
513 BOOL WINAPI
PrintDlgA(LPPRINTDLGA
);
514 BOOL WINAPI
PrintDlgW(LPPRINTDLGW
);
515 HWND WINAPI
ReplaceTextA(LPFINDREPLACEA
);
516 HWND WINAPI
ReplaceTextW(LPFINDREPLACEW
);
517 #if (WINVER >= 0x0500) && !defined (__OBJC__)
518 HRESULT WINAPI
PrintDlgExA(LPPRINTDLGEXA
);
519 HRESULT WINAPI
PrintDlgExW(LPPRINTDLGEXW
);
520 #endif /* WINVER >= 0x0500 */
523 #define LBSELCHSTRING LBSELCHSTRINGW
524 #define SHAREVISTRING SHAREVISTRINGW
525 #define FILEOKSTRING FILEOKSTRINGW
526 #define COLOROKSTRING COLOROKSTRINGW
527 #define SETRGBSTRING SETRGBSTRINGW
528 #define HELPMSGSTRING HELPMSGSTRINGW
529 #define FINDMSGSTRING FINDMSGSTRINGW
530 typedef CHOOSECOLORW CHOOSECOLOR
,*LPCHOOSECOLOR
;
531 typedef CHOOSEFONTW CHOOSEFONT
,*LPCHOOSEFONT
;
532 typedef FINDREPLACEW FINDREPLACE
,*LPFINDREPLACE
;
533 typedef OPENFILENAMEW OPENFILENAME
,*LPOPENFILENAME
;
534 typedef OFNOTIFYW OFNOTIFY
,*LPOFNOTIFY
;
535 typedef PAGESETUPDLGW PAGESETUPDLG
,*LPPAGESETUPDLG
;
536 typedef PRINTDLGW PRINTDLG
,*LPPRINTDLG
;
537 #define ChooseColor ChooseColorW
538 #define ChooseFont ChooseFontW
539 #define FindText FindTextW
540 #define GetFileTitle GetFileTitleW
541 #define GetOpenFileName GetOpenFileNameW
542 #define GetSaveFileName GetSaveFileNameW
543 #define PageSetupDlg PageSetupDlgW
544 #define PrintDlg PrintDlgW
545 #define ReplaceText ReplaceTextW
546 #if (WINVER >= 0x0500) && !defined (__OBJC__)
547 typedef PRINTDLGEXW PRINTDLGEX
, *LPPRINTDLGEX
;
548 #define PrintDlgEx PrintDlgExW
549 #endif /* WINVER >= 0x0500 */
551 #define LBSELCHSTRING LBSELCHSTRINGA
552 #define SHAREVISTRING SHAREVISTRINGA
553 #define FILEOKSTRING FILEOKSTRINGA
554 #define COLOROKSTRING COLOROKSTRINGA
555 #define SETRGBSTRING SETRGBSTRINGA
556 #define HELPMSGSTRING HELPMSGSTRINGA
557 #define FINDMSGSTRING FINDMSGSTRINGA
558 typedef CHOOSECOLORA CHOOSECOLOR
,*LPCHOOSECOLOR
;
559 typedef CHOOSEFONTA CHOOSEFONT
,*LPCHOOSEFONT
;
560 typedef FINDREPLACEA FINDREPLACE
,*LPFINDREPLACE
;
561 typedef OPENFILENAMEA OPENFILENAME
,*LPOPENFILENAME
;
562 typedef OFNOTIFYA OFNOTIFY
,*LPOFNOTIFY
;
563 typedef PAGESETUPDLGA PAGESETUPDLG
,*LPPAGESETUPDLG
;
564 typedef PRINTDLGA PRINTDLG
,*LPPRINTDLG
;
565 #define ChooseColor ChooseColorA
566 #define ChooseFont ChooseFontA
567 #define FindText FindTextA
568 #define GetFileTitle GetFileTitleA
569 #define GetOpenFileName GetOpenFileNameA
570 #define GetSaveFileName GetSaveFileNameA
571 #define PageSetupDlg PageSetupDlgA
572 #define PrintDlg PrintDlgA
573 #define ReplaceText ReplaceTextA
574 #if (WINVER >= 0x0500) && !defined (__OBJC__)
575 typedef PRINTDLGEXA PRINTDLGEX
, *LPPRINTDLGEX
;
576 #define PrintDlgEx PrintDlgExA
577 #endif /* WINVER >= 0x0500 */