8 #define LBSELCHSTRINGA "commdlg_LBSelChangedNotify"
9 #define SHAREVISTRINGA "commdlg_ShareViolation"
10 #define FILEOKSTRINGA "commdlg_FileNameOK"
11 #define COLOROKSTRINGA "commdlg_ColorOK"
12 #define SETRGBSTRINGA "commdlg_SetRGBColor"
13 #define HELPMSGSTRINGA "commdlg_help"
14 #define FINDMSGSTRINGA "commdlg_FindReplace"
15 #define LBSELCHSTRINGW L"commdlg_LBSelChangedNotify"
16 #define SHAREVISTRINGW L"commdlg_ShareViolation"
17 #define FILEOKSTRINGW L"commdlg_FileNameOK"
18 #define COLOROKSTRINGW L"commdlg_ColorOK"
19 #define SETRGBSTRINGW L"commdlg_SetRGBColor"
20 #define HELPMSGSTRINGW L"commdlg_help"
21 #define FINDMSGSTRINGW L"commdlg_FindReplace"
22 #define CDN_FIRST (-601)
23 #define CDN_LAST (-699)
24 #define CDN_INITDONE CDN_FIRST
25 #define CDN_SELCHANGE (CDN_FIRST-1)
26 #define CDN_FOLDERCHANGE (CDN_FIRST-2)
27 #define CDN_SHAREVIOLATION (CDN_FIRST-3)
28 #define CDN_HELP (CDN_FIRST-4)
29 #define CDN_FILEOK (CDN_FIRST-5)
30 #define CDN_TYPECHANGE (CDN_FIRST-6)
31 #define CDM_FIRST (WM_USER+100)
32 #define CDM_LAST (WM_USER+200)
33 #define CDM_GETSPEC CDM_FIRST
34 #define CDM_GETFILEPATH (CDM_FIRST+1)
35 #define CDM_GETFOLDERPATH (CDM_FIRST+2)
36 #define CDM_GETFOLDERIDLIST (CDM_FIRST+3)
37 #define CDM_SETCONTROLTEXT (CDM_FIRST+4)
38 #define CDM_HIDECONTROL (CDM_FIRST+5)
39 #define CDM_SETDEFEXT (CDM_FIRST+6)
42 #define CC_PREVENTFULLOPEN 4
44 #define CC_ENABLEHOOK 16
45 #define CC_ENABLETEMPLATE 32
46 #define CC_ENABLETEMPLATEHANDLE 64
47 #define CC_SOLIDCOLOR 128
48 #define CC_ANYCOLOR 256
49 #define CF_SCREENFONTS 1
50 #define CF_PRINTERFONTS 2
53 #define CF_ENABLEHOOK 8
54 #define CF_ENABLETEMPLATE 16
55 #define CF_ENABLETEMPLATEHANDLE 32
56 #define CF_INITTOLOGFONTSTRUCT 64
57 #define CF_USESTYLE 128
58 #define CF_EFFECTS 256
60 #define CF_ANSIONLY 1024
61 #define CF_SCRIPTSONLY CF_ANSIONLY
62 #define CF_NOVECTORFONTS 2048
63 #define CF_NOOEMFONTS 2048
64 #define CF_NOSIMULATIONS 4096
65 #define CF_LIMITSIZE 8192
66 #define CF_FIXEDPITCHONLY 16384
67 #define CF_WYSIWYG 32768
68 #define CF_FORCEFONTEXIST 65536
69 #define CF_SCALABLEONLY 131072
70 #define CF_TTONLY 262144
71 #define CF_NOFACESEL 524288
72 #define CF_NOSTYLESEL 1048576
73 #define CF_NOSIZESEL 2097152
74 #define CF_SELECTSCRIPT 4194304
75 #define CF_NOSCRIPTSEL 8388608
76 #define CF_NOVERTFONTS 0x1000000
77 #define SIMULATED_FONTTYPE 0x8000
78 #define PRINTER_FONTTYPE 0x4000
79 #define SCREEN_FONTTYPE 0x2000
80 #define BOLD_FONTTYPE 0x100
81 #define ITALIC_FONTTYPE 0x0200
82 #define REGULAR_FONTTYPE 0x0400
83 #define WM_CHOOSEFONT_GETLOGFONT (WM_USER+1)
84 #define WM_CHOOSEFONT_SETLOGFONT (WM_USER+101)
85 #define WM_CHOOSEFONT_SETFLAGS (WM_USER+102)
86 #define OFN_ALLOWMULTISELECT 512
87 #define OFN_CREATEPROMPT 0x2000
88 #define OFN_ENABLEHOOK 32
89 #define OFN_ENABLETEMPLATE 64
90 #define OFN_ENABLETEMPLATEHANDLE 128
91 #define OFN_EXPLORER 0x80000
92 #define OFN_EXTENSIONDIFFERENT 0x400
93 #define OFN_FILEMUSTEXIST 0x1000
94 #define OFN_HIDEREADONLY 4
95 #define OFN_LONGNAMES 0x200000
96 #define OFN_NOCHANGEDIR 8
97 #define OFN_NODEREFERENCELINKS 0x100000
98 #define OFN_NOLONGNAMES 0x40000
99 #define OFN_NONETWORKBUTTON 0x20000
100 #define OFN_NOREADONLYRETURN 0x8000
101 #define OFN_NOTESTFILECREATE 0x10000
102 #define OFN_NOVALIDATE 256
103 #define OFN_OVERWRITEPROMPT 2
104 #define OFN_PATHMUSTEXIST 0x800
105 #define OFN_READONLY 1
106 #define OFN_SHAREAWARE 0x4000
107 #define OFN_SHOWHELP 16
108 #define OFN_SHAREFALLTHROUGH 2
109 #define OFN_SHARENOWARN 1
110 #define OFN_SHAREWARN 0
111 #define OFN_NODEREFERENCELINKS 0x100000
112 #define FR_DIALOGTERM 64
114 #define FR_ENABLEHOOK 256
115 #define FR_ENABLETEMPLATE 512
116 #define FR_ENABLETEMPLATEHANDLE 0x2000
117 #define FR_FINDNEXT 8
118 #define FR_HIDEUPDOWN 0x4000
119 #define FR_HIDEMATCHCASE 0x8000
120 #define FR_HIDEWHOLEWORD 0x10000
121 #define FR_MATCHCASE 4
122 #define FR_NOMATCHCASE 0x800
123 #define FR_NOUPDOWN 0x400
124 #define FR_NOWHOLEWORD 4096
125 #define FR_REPLACE 16
126 #define FR_REPLACEALL 32
127 #define FR_SHOWHELP 128
128 #define FR_WHOLEWORD 2
129 #define PD_ALLPAGES 0
130 #define PD_SELECTION 1
131 #define PD_PAGENUMS 2
132 #define PD_NOSELECTION 4
133 #define PD_NOPAGENUMS 8
134 #define PD_COLLATE 16
135 #define PD_PRINTTOFILE 32
136 #define PD_PRINTSETUP 64
137 #define PD_NOWARNING 128
138 #define PD_RETURNDC 256
139 #define PD_RETURNIC 512
140 #define PD_RETURNDEFAULT 1024
141 #define PD_SHOWHELP 2048
142 #define PD_ENABLEPRINTHOOK 4096
143 #define PD_ENABLESETUPHOOK 8192
144 #define PD_ENABLEPRINTTEMPLATE 16384
145 #define PD_ENABLESETUPTEMPLATE 32768
146 #define PD_ENABLEPRINTTEMPLATEHANDLE 65536
147 #define PD_ENABLESETUPTEMPLATEHANDLE 0x20000
148 #define PD_USEDEVMODECOPIES 0x40000
149 #define PD_USEDEVMODECOPIESANDCOLLATE 0x40000
150 #define PD_DISABLEPRINTTOFILE 0x80000
151 #define PD_HIDEPRINTTOFILE 0x100000
152 #define PD_NONETWORKBUTTON 0x200000
153 #define PSD_DEFAULTMINMARGINS 0
154 #define PSD_INWININIINTLMEASURE 0
155 #define PSD_MINMARGINS 1
156 #define PSD_MARGINS 2
157 #define PSD_INTHOUSANDTHSOFINCHES 4
158 #define PSD_INHUNDREDTHSOFMILLIMETERS 8
159 #define PSD_DISABLEMARGINS 16
160 #define PSD_DISABLEPRINTER 32
161 #define PSD_NOWARNING 128
162 #define PSD_DISABLEORIENTATION 256
163 #define PSD_DISABLEPAPER 512
164 #define PSD_RETURNDEFAULT 1024
165 #define PSD_SHOWHELP 2048
166 #define PSD_ENABLEPAGESETUPHOOK 8192
167 #define PSD_ENABLEPAGESETUPTEMPLATE 0x8000
168 #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x20000
169 #define PSD_ENABLEPAGEPAINTHOOK 0x40000
170 #define PSD_DISABLEPAGEPAINTING 0x80000
171 #define WM_PSD_PAGESETUPDLG WM_USER
172 #define WM_PSD_FULLPAGERECT (WM_USER+1)
173 #define WM_PSD_MINMARGINRECT (WM_USER+2)
174 #define WM_PSD_MARGINRECT (WM_USER+3)
175 #define WM_PSD_GREEKTEXTRECT (WM_USER+4)
176 #define WM_PSD_ENVSTAMPRECT (WM_USER+5)
177 #define WM_PSD_YAFULLPAGERECT (WM_USER+6)
178 #define CD_LBSELNOITEMS (-1)
179 #define CD_LBSELCHANGE 0
180 #define CD_LBSELSUB 1
181 #define CD_LBSELADD 2
182 #define DN_DEFAULTPRN 1
185 #define SNDMSG SendMessage
188 #define CommDlg_OpenSave_GetSpec(d,s,m) (int)SNDMSG(d,CDM_GETSPEC,m,(LPARAM)s)
189 #define CommDlg_OpenSave_GetSpecA CommDlg_OpenSave_GetSpec
190 #define CommDlg_OpenSave_GetSpecW CommDlg_OpenSave_GetSpec
191 #define CommDlg_OpenSave_GetFilePath(d,s,m) (int)SNDMSG(d,CDM_GETFILEPATH,m,(LPARAM)s)
192 #define CommDlg_OpenSave_GetFilePathA CommDlg_OpenSave_GetFilePath
193 #define CommDlg_OpenSave_GetFilePathW CommDlg_OpenSave_GetFilePath
194 #define CommDlg_OpenSave_GetFolderPath(d,s,m) (int)SendMessage(d,CDM_GETFOLDERPATH,m,(LPARAM)(LPSTR)s)
195 #define CommDlg_OpenSave_GetFolderPathA CommDlg_OpenSave_GetFolderPath
196 #define CommDlg_OpenSave_GetFolderPathW CommDlg_OpenSave_GetFolderPath
197 #define CommDlg_OpenSave_GetFolderIDList(d,i,m) (int)SendMessage(d,CDM_GETFOLDERIDLIST,m,(LPARAM)i)
198 #define CommDlg_OpenSave_SetControlText(d,i,t) (void)SendMessage(d,CDM_SETCONTROLTEXT,i,(LPARAM)t)
199 #define CommDlg_OpenSave_HideControl(d,i) (void)SendMessage(d,CDM_HIDECONTROL,i,0)
200 #define CommDlg_OpenSave_SetDefExt(d,e) (void)SendMessage(d,CDM_SETDEFEXT,0,(LPARAM)e)
202 typedef UINT (APIENTRY
*__CDHOOKPROC
)(HWND
,UINT
,WPARAM
,LPARAM
);
203 typedef __CDHOOKPROC LPCCHOOKPROC
;
204 typedef __CDHOOKPROC LPCFHOOKPROC
;
205 typedef __CDHOOKPROC LPFRHOOKPROC
;
206 typedef __CDHOOKPROC LPOFNHOOKPROC
;
207 typedef __CDHOOKPROC LPPAGEPAINTHOOK
;
208 typedef __CDHOOKPROC LPPAGESETUPHOOK
;
209 typedef __CDHOOKPROC LPSETUPHOOKPROC
;
210 typedef __CDHOOKPROC LPPRINTHOOKPROC
;
211 typedef struct tagCHOOSECOLORA
{
216 COLORREF
* lpCustColors
;
219 LPCCHOOKPROC lpfnHook
;
220 LPCSTR lpTemplateName
;
221 } CHOOSECOLORA
,*LPCHOOSECOLORA
;
222 typedef struct tagCHOOSECOLORW
{
227 COLORREF
* lpCustColors
;
230 LPCCHOOKPROC lpfnHook
;
231 LPCWSTR lpTemplateName
;
232 } CHOOSECOLORW
,*LPCHOOSECOLORW
;
233 typedef struct tagCHOOSEFONTA
{
237 LPLOGFONTA lpLogFont
;
242 LPCFHOOKPROC lpfnHook
;
243 LPCSTR lpTemplateName
;
247 WORD ___MISSING_ALIGNMENT__
;
250 } CHOOSEFONTA
,*LPCHOOSEFONTA
;
251 typedef struct tagCHOOSEFONTW
{
255 LPLOGFONTW lpLogFont
;
260 LPCFHOOKPROC lpfnHook
;
261 LPCWSTR lpTemplateName
;
265 WORD ___MISSING_ALIGNMENT__
;
268 } CHOOSEFONTW
,*LPCHOOSEFONTW
;
269 typedef struct tagDEVNAMES
{
274 } DEVNAMES
,*LPDEVNAMES
;
281 LPSTR lpstrReplaceWith
;
283 WORD wReplaceWithLen
;
285 LPFRHOOKPROC lpfnHook
;
286 LPCSTR lpTemplateName
;
287 } FINDREPLACEA
,*LPFINDREPLACEA
;
293 LPWSTR lpstrFindWhat
;
294 LPWSTR lpstrReplaceWith
;
296 WORD wReplaceWithLen
;
298 LPFRHOOKPROC lpfnHook
;
299 LPCWSTR lpTemplateName
;
300 } FINDREPLACEW
,*LPFINDREPLACEW
;
301 typedef struct tagOFNA
{
306 LPSTR lpstrCustomFilter
;
307 DWORD nMaxCustFilter
;
311 LPSTR lpstrFileTitle
;
313 LPCSTR lpstrInitialDir
;
320 LPOFNHOOKPROC lpfnHook
;
321 LPCSTR lpTemplateName
;
322 } OPENFILENAMEA
,*LPOPENFILENAMEA
;
323 typedef struct tagOFNW
{
328 LPWSTR lpstrCustomFilter
;
329 DWORD nMaxCustFilter
;
333 LPWSTR lpstrFileTitle
;
335 LPCWSTR lpstrInitialDir
;
342 LPOFNHOOKPROC lpfnHook
;
343 LPCWSTR lpTemplateName
;
344 } OPENFILENAMEW
,*LPOPENFILENAMEW
;
345 typedef struct _OFNOTIFYA
{
347 LPOPENFILENAMEA lpOFN
;
349 } OFNOTIFYA
,*LPOFNOTIFYA
;
350 typedef struct _OFNOTIFYW
{
352 LPOPENFILENAMEW lpOFN
;
354 } OFNOTIFYW
,*LPOFNOTIFYW
;
355 typedef struct tagPSDA
{
366 LPPAGESETUPHOOK lpfnPageSetupHook
;
367 LPPAGEPAINTHOOK lpfnPagePaintHook
;
368 LPCSTR lpPageSetupTemplateName
;
369 HGLOBAL hPageSetupTemplate
;
370 } PAGESETUPDLGA
,*LPPAGESETUPDLGA
;
371 typedef struct tagPSDW
{
382 LPPAGESETUPHOOK lpfnPageSetupHook
;
383 LPPAGEPAINTHOOK lpfnPagePaintHook
;
384 LPCWSTR lpPageSetupTemplateName
;
385 HGLOBAL hPageSetupTemplate
;
386 } PAGESETUPDLGW
,*LPPAGESETUPDLGW
;
387 typedef struct tagPDA
{
401 LPPRINTHOOKPROC lpfnPrintHook
;
402 LPSETUPHOOKPROC lpfnSetupHook
;
403 LPCSTR lpPrintTemplateName
;
404 LPCSTR lpSetupTemplateName
;
405 HANDLE hPrintTemplate
;
406 HANDLE hSetupTemplate
;
407 } PRINTDLGA
,*LPPRINTDLGA
;
408 typedef struct tagPDW
{
422 LPPRINTHOOKPROC lpfnPrintHook
;
423 LPSETUPHOOKPROC lpfnSetupHook
;
424 LPCWSTR lpPrintTemplateName
;
425 LPCWSTR lpSetupTemplateName
;
426 HANDLE hPrintTemplate
;
427 HANDLE hSetupTemplate
;
428 } PRINTDLGW
,*LPPRINTDLGW
;
429 #if (WINVER >= 0x0500)
430 #include <unknwn.h> /* for LPUNKNOWN */
431 #include <prsht.h> /* for HPROPSHEETPAGE */
432 typedef struct tagPRINTPAGERANGE
{
435 } PRINTPAGERANGE
, *LPPRINTPAGERANGE
;
436 typedef struct tagPDEXA
{
444 DWORD ExclusionFlags
;
446 DWORD nMaxPageRanges
;
447 LPPRINTPAGERANGE lpPageRanges
;
452 LPCSTR lpPrintTemplateName
;
453 LPUNKNOWN lpCallback
;
454 DWORD nPropertyPages
;
455 HPROPSHEETPAGE
*lphPropertyPages
;
457 DWORD dwResultAction
;
458 } PRINTDLGEXA
, *LPPRINTDLGEXA
;
459 typedef struct tagPDEXW
{
467 DWORD ExclusionFlags
;
469 DWORD nMaxPageRanges
;
470 LPPRINTPAGERANGE lpPageRanges
;
475 LPCWSTR lpPrintTemplateName
;
476 LPUNKNOWN lpCallback
;
477 DWORD nPropertyPages
;
478 HPROPSHEETPAGE
*lphPropertyPages
;
480 DWORD dwResultAction
;
481 } PRINTDLGEXW
, *LPPRINTDLGEXW
;
482 #endif /* WINVER >= 0x0500 */
484 BOOL WINAPI
ChooseColorA(LPCHOOSECOLORA
);
485 BOOL WINAPI
ChooseColorW(LPCHOOSECOLORW
);
486 BOOL WINAPI
ChooseFontA(LPCHOOSEFONTA
);
487 BOOL WINAPI
ChooseFontW(LPCHOOSEFONTW
);
488 DWORD WINAPI
CommDlgExtendedError(void);
489 HWND WINAPI
FindTextA(LPFINDREPLACEA
);
490 HWND WINAPI
FindTextW(LPFINDREPLACEW
);
491 short WINAPI
GetFileTitleA(LPCSTR
,LPSTR
,WORD
);
492 short WINAPI
GetFileTitleW(LPCWSTR
,LPWSTR
,WORD
);
493 BOOL WINAPI
GetOpenFileNameA(LPOPENFILENAMEA
);
494 BOOL WINAPI
GetOpenFileNameW(LPOPENFILENAMEW
);
495 BOOL WINAPI
GetSaveFileNameA(LPOPENFILENAMEA
);
496 BOOL WINAPI
GetSaveFileNameW(LPOPENFILENAMEW
);
497 BOOL WINAPI
PageSetupDlgA(LPPAGESETUPDLGA
);
498 BOOL WINAPI
PageSetupDlgW(LPPAGESETUPDLGW
);
499 BOOL WINAPI
PrintDlgA(LPPRINTDLGA
);
500 BOOL WINAPI
PrintDlgW(LPPRINTDLGW
);
501 HWND WINAPI
ReplaceTextA(LPFINDREPLACEA
);
502 HWND WINAPI
ReplaceTextW(LPFINDREPLACEW
);
503 #if (WINVER >= 0x0500)
504 HRESULT WINAPI
PrintDlgExA(LPPRINTDLGEXA
);
505 HRESULT WINAPI
PrintDlgExW(LPPRINTDLGEXW
);
506 #endif /* WINVER >= 0x0500 */
509 #define LBSELCHSTRING LBSELCHSTRINGW
510 #define SHAREVISTRING SHAREVISTRINGW
511 #define FILEOKSTRING FILEOKSTRINGW
512 #define COLOROKSTRING COLOROKSTRINGW
513 #define SETRGBSTRING SETRGBSTRINGW
514 #define HELPMSGSTRING HELPMSGSTRINGW
515 #define FINDMSGSTRING FINDMSGSTRINGW
516 typedef CHOOSECOLORW CHOOSECOLOR
,*LPCHOOSECOLOR
;
517 typedef CHOOSEFONTW CHOOSEFONT
,*LPCHOOSEFONT
;
518 typedef FINDREPLACEW FINDREPLACE
,*LPFINDREPLACE
;
519 typedef OPENFILENAMEW OPENFILENAME
,*LPOPENFILENAME
;
520 typedef OFNOTIFYW OFNOTIFY
,*LPOFNOTIFY
;
521 typedef PAGESETUPDLGW PAGESETUPDLG
,*LPPAGESETUPDLG
;
522 typedef PRINTDLGW PRINTDLG
,*LPPRINTDLG
;
523 #define ChooseColor ChooseColorW
524 #define ChooseFont ChooseFontW
525 #define FindText FindTextW
526 #define GetFileTitle GetFileTitleW
527 #define GetOpenFileName GetOpenFileNameW
528 #define GetSaveFileName GetSaveFileNameW
529 #define PageSetupDlg PageSetupDlgW
530 #define PrintDlg PrintDlgW
531 #define ReplaceText ReplaceTextW
532 #if (WINVER >= 0x0500)
533 typedef PRINTDLGEXW PRINTDLGEX
, *LPPRINTDLGEX
;
534 #define PrintDlgEx PrintDlgExW
535 #endif /* WINVER >= 0x0500 */
537 #define LBSELCHSTRING LBSELCHSTRINGA
538 #define SHAREVISTRING SHAREVISTRINGA
539 #define FILEOKSTRING FILEOKSTRINGA
540 #define COLOROKSTRING COLOROKSTRINGA
541 #define SETRGBSTRING SETRGBSTRINGA
542 #define HELPMSGSTRING HELPMSGSTRINGA
543 #define FINDMSGSTRING FINDMSGSTRINGA
544 typedef CHOOSECOLORA CHOOSECOLOR
,*LPCHOOSECOLOR
;
545 typedef CHOOSEFONTA CHOOSEFONT
,*LPCHOOSEFONT
;
546 typedef FINDREPLACEA FINDREPLACE
,*LPFINDREPLACE
;
547 typedef OPENFILENAMEA OPENFILENAME
,*LPOPENFILENAME
;
548 typedef OFNOTIFYA OFNOTIFY
,*LPOFNOTIFY
;
549 typedef PAGESETUPDLGA PAGESETUPDLG
,*LPPAGESETUPDLG
;
550 typedef PRINTDLGA PRINTDLG
,*LPPRINTDLG
;
551 #define ChooseColor ChooseColorA
552 #define ChooseFont ChooseFontA
553 #define FindText FindTextA
554 #define GetFileTitle GetFileTitleA
555 #define GetOpenFileName GetOpenFileNameA
556 #define GetSaveFileName GetSaveFileNameA
557 #define PageSetupDlg PageSetupDlgA
558 #define PrintDlg PrintDlgA
559 #define ReplaceText ReplaceTextA
560 #if (WINVER >= 0x0500)
561 typedef PRINTDLGEXA PRINTDLGEX
, *LPPRINTDLGEX
;
562 #define PrintDlgEx PrintDlgExA
563 #endif /* WINVER >= 0x0500 */