OSDN Git Service

41ed7f6fe1efa856c16ff215af2f47bb5bdfcb88
[mingw/mingw-org-wsl.git] / include / commdlg.h
1 /**
2  * @file commdlg.h
3  * @copy 2012 MinGW.org project
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  * 
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  * 
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 #ifndef _COMMDLG_H
25 #define _COMMDLG_H
26 #pragma GCC system_header
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 #pragma pack(push,1)
32
33 #define LBSELCHSTRINGA  "commdlg_LBSelChangedNotify"
34 #define SHAREVISTRINGA  "commdlg_ShareViolation"
35 #define FILEOKSTRINGA   "commdlg_FileNameOK"
36 #define COLOROKSTRINGA  "commdlg_ColorOK"
37 #define SETRGBSTRINGA   "commdlg_SetRGBColor"
38 #define HELPMSGSTRINGA  "commdlg_help"
39 #define FINDMSGSTRINGA  "commdlg_FindReplace"
40 #define LBSELCHSTRINGW  L"commdlg_LBSelChangedNotify"
41 #define SHAREVISTRINGW  L"commdlg_ShareViolation"
42 #define FILEOKSTRINGW   L"commdlg_FileNameOK"
43 #define COLOROKSTRINGW  L"commdlg_ColorOK"
44 #define SETRGBSTRINGW   L"commdlg_SetRGBColor"
45 #define HELPMSGSTRINGW  L"commdlg_help"
46 #define FINDMSGSTRINGW  L"commdlg_FindReplace"
47 #ifndef CDN_FIRST
48 #define CDN_FIRST       ((UINT)-601) /* also in commctrl.h */
49 #define CDN_LAST        ((UINT)-699)
50 #endif
51 #define CDN_INITDONE    CDN_FIRST
52 #define CDN_SELCHANGE   (CDN_FIRST-1U)
53 #define CDN_FOLDERCHANGE        (CDN_FIRST-2U)
54 #define CDN_SHAREVIOLATION      (CDN_FIRST-3U)
55 #define CDN_HELP        (CDN_FIRST-4U)
56 #define CDN_FILEOK      (CDN_FIRST-5U)
57 #define CDN_TYPECHANGE  (CDN_FIRST-6U)
58 #define CDM_FIRST       (WM_USER+100)
59 #define CDM_LAST        (WM_USER+200)
60 #define CDM_GETSPEC     CDM_FIRST
61 #define CDM_GETFILEPATH (CDM_FIRST+1)
62 #define CDM_GETFOLDERPATH (CDM_FIRST+2)
63 #define CDM_GETFOLDERIDLIST     (CDM_FIRST+3)
64 #define CDM_SETCONTROLTEXT      (CDM_FIRST+4)
65 #define CDM_HIDECONTROL (CDM_FIRST+5)
66 #define CDM_SETDEFEXT   (CDM_FIRST+6)
67 #define CC_RGBINIT      1
68 #define CC_FULLOPEN     2
69 #define CC_PREVENTFULLOPEN      4
70 #define CC_SHOWHELP     8
71 #define CC_ENABLEHOOK   16
72 #define CC_ENABLETEMPLATE       32
73 #define CC_ENABLETEMPLATEHANDLE 64
74 #define CC_SOLIDCOLOR   128
75 #define CC_ANYCOLOR     256
76 #define CF_SCREENFONTS  1
77 #define CF_PRINTERFONTS 2
78 #define CF_BOTH 3
79 #define CF_SHOWHELP     4
80 #define CF_ENABLEHOOK   8
81 #define CF_ENABLETEMPLATE       16
82 #define CF_ENABLETEMPLATEHANDLE 32
83 #define CF_INITTOLOGFONTSTRUCT  64
84 #define CF_USESTYLE     128
85 #define CF_EFFECTS      256
86 #define CF_APPLY        512
87 #define CF_ANSIONLY     1024
88 #define CF_SCRIPTSONLY  CF_ANSIONLY
89 #define CF_NOVECTORFONTS        2048
90 #define CF_NOOEMFONTS   2048
91 #define CF_NOSIMULATIONS        4096
92 #define CF_LIMITSIZE    8192
93 #define CF_FIXEDPITCHONLY       16384
94 #define CF_WYSIWYG      32768
95 #define CF_FORCEFONTEXIST       65536
96 #define CF_SCALABLEONLY 131072
97 #define CF_TTONLY       262144
98 #define CF_NOFACESEL     524288
99 #define CF_NOSTYLESEL    1048576
100 #define CF_NOSIZESEL     2097152
101 #define CF_SELECTSCRIPT  4194304
102 #define CF_NOSCRIPTSEL   8388608
103 #define CF_NOVERTFONTS  0x1000000
104 #define SIMULATED_FONTTYPE      0x8000
105 #define PRINTER_FONTTYPE        0x4000
106 #define SCREEN_FONTTYPE 0x2000
107 #define BOLD_FONTTYPE   0x100
108 #define ITALIC_FONTTYPE 0x0200
109 #define REGULAR_FONTTYPE        0x0400
110 #define WM_CHOOSEFONT_GETLOGFONT        (WM_USER+1)
111 #define WM_CHOOSEFONT_SETLOGFONT        (WM_USER+101)
112 #define WM_CHOOSEFONT_SETFLAGS  (WM_USER+102)
113 #define OFN_ALLOWMULTISELECT 512
114 #define OFN_CREATEPROMPT 0x2000
115 #define OFN_ENABLEHOOK 32
116 #define OFN_ENABLESIZING 0x800000
117 #define OFN_ENABLETEMPLATE 64
118 #define OFN_ENABLETEMPLATEHANDLE 128
119 #define OFN_EXPLORER 0x80000
120 #define OFN_EXTENSIONDIFFERENT 0x400
121 #define OFN_FILEMUSTEXIST 0x1000
122 #define OFN_HIDEREADONLY 4
123 #define OFN_LONGNAMES 0x200000
124 #define OFN_NOCHANGEDIR 8
125 #define OFN_NODEREFERENCELINKS 0x100000
126 #define OFN_NOLONGNAMES 0x40000
127 #define OFN_NONETWORKBUTTON 0x20000
128 #define OFN_NOREADONLYRETURN 0x8000
129 #define OFN_NOTESTFILECREATE 0x10000
130 #define OFN_NOVALIDATE 256
131 #define OFN_OVERWRITEPROMPT 2
132 #define OFN_PATHMUSTEXIST 0x800
133 #define OFN_READONLY 1
134 #define OFN_SHAREAWARE 0x4000
135 #define OFN_SHOWHELP 16
136 #define OFN_SHAREFALLTHROUGH 2
137 #define OFN_SHARENOWARN 1
138 #define OFN_SHAREWARN 0
139 #define OFN_NODEREFERENCELINKS 0x100000
140 #if (_WIN32_WINNT >= 0x0500)
141 #define OFN_DONTADDTORECENT 0x02000000
142 #endif
143 #define FR_DIALOGTERM 64
144 #define FR_DOWN 1
145 #define FR_ENABLEHOOK 256
146 #define FR_ENABLETEMPLATE 512
147 #define FR_ENABLETEMPLATEHANDLE 0x2000
148 #define FR_FINDNEXT 8
149 #define FR_HIDEUPDOWN 0x4000
150 #define FR_HIDEMATCHCASE 0x8000
151 #define FR_HIDEWHOLEWORD 0x10000
152 #define FR_MATCHALEFHAMZA       0x80000000
153 #define FR_MATCHCASE 4
154 #define FR_MATCHDIAC    0x20000000
155 #define FR_MATCHKASHIDA 0x40000000
156 #define FR_NOMATCHCASE 0x800
157 #define FR_NOUPDOWN 0x400
158 #define FR_NOWHOLEWORD 4096
159 #define FR_REPLACE 16
160 #define FR_REPLACEALL 32
161 #define FR_SHOWHELP 128
162 #define FR_WHOLEWORD 2
163 #define PD_ALLPAGES     0x00000000
164 #define PD_SELECTION    0x00000001
165 #define PD_PAGENUMS     0x00000002
166 #define PD_NOSELECTION  0x00000004
167 #define PD_NOPAGENUMS   0x00000008
168 #define PD_COLLATE      0x00000010
169 #define PD_PRINTTOFILE  0x00000020
170 #define PD_PRINTSETUP   0x00000040
171 #define PD_NOWARNING    0x00000080
172 #define PD_RETURNDC     0x00000100
173 #define PD_RETURNIC     0x00000200
174 #define PD_RETURNDEFAULT        0x00000400
175 #define PD_SHOWHELP     0x00000800
176 #define PD_ENABLEPRINTHOOK      0x00001000
177 #define PD_ENABLESETUPHOOK      0x00002000
178 #define PD_ENABLEPRINTTEMPLATE  0x00004000
179 #define PD_ENABLESETUPTEMPLATE 0x00008000
180 #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
181 #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
182 #define PD_USEDEVMODECOPIES     0x00040000
183 #define PD_USEDEVMODECOPIESANDCOLLATE   0x00040000
184 #define PD_DISABLEPRINTTOFILE   0x00080000
185 #define PD_HIDEPRINTTOFILE      0x00100000
186 #define PD_NONETWORKBUTTON      0x00200000
187 #if (_WIN32_WINNT >= 0x0500)
188 #define PD_CURRENTPAGE  0x00400000
189 #define PD_NOCURRENTPAGE        0x00800000
190 #define PD_EXCLUSIONFLAGS       0x01000000 
191 #define PD_USELARGETEMPLATE     0x10000000
192 #define PD_RESULT_CANCEL        0
193 #define PD_RESULT_PRINT 1
194 #define PD_RESULT_APPLY 2
195 #define START_PAGE_GENERAL      0XFFFFFFFF
196 #endif
197 #define PSD_DEFAULTMINMARGINS   0
198 #define PSD_INWININIINTLMEASURE 0
199 #define PSD_MINMARGINS  1
200 #define PSD_MARGINS     2
201 #define PSD_INTHOUSANDTHSOFINCHES       4
202 #define PSD_INHUNDREDTHSOFMILLIMETERS   8
203 #define PSD_DISABLEMARGINS      16
204 #define PSD_DISABLEPRINTER      32
205 #define PSD_NOWARNING   128
206 #define PSD_DISABLEORIENTATION  256
207 #define PSD_DISABLEPAPER        512
208 #define PSD_RETURNDEFAULT       1024
209 #define PSD_SHOWHELP    2048
210 #define PSD_ENABLEPAGESETUPHOOK 8192
211 #define PSD_ENABLEPAGESETUPTEMPLATE     0x8000
212 #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE       0x20000
213 #define PSD_ENABLEPAGEPAINTHOOK 0x40000
214 #define PSD_DISABLEPAGEPAINTING 0x80000
215 #define WM_PSD_PAGESETUPDLG     WM_USER
216 #define WM_PSD_FULLPAGERECT     (WM_USER+1)
217 #define WM_PSD_MINMARGINRECT    (WM_USER+2)
218 #define WM_PSD_MARGINRECT       (WM_USER+3)
219 #define WM_PSD_GREEKTEXTRECT    (WM_USER+4)
220 #define WM_PSD_ENVSTAMPRECT     (WM_USER+5)
221 #define WM_PSD_YAFULLPAGERECT   (WM_USER+6)
222 #define CD_LBSELNOITEMS (-1)
223 #define CD_LBSELCHANGE   0
224 #define CD_LBSELSUB      1
225 #define CD_LBSELADD      2
226 #define DN_DEFAULTPRN   1
227 #if (_WIN32_WINNT >= 0x0500)
228 #define OPENFILENAME_SIZE_VERSION_400  76
229 #endif
230
231 #ifndef SNDMSG
232 #ifdef __cplusplus
233 #define SNDMSG ::SendMessage
234 #else
235 #define SNDMSG SendMessage
236 #endif
237 #endif /* ifndef SNDMSG */
238
239 #define CommDlg_OpenSave_GetSpec(d,s,m) ((int)SNDMSG((d),CDM_GETSPEC,(m),(LPARAM)(s)))
240 #define CommDlg_OpenSave_GetSpecA CommDlg_OpenSave_GetSpec
241 #define CommDlg_OpenSave_GetSpecW CommDlg_OpenSave_GetSpec
242 #define CommDlg_OpenSave_GetFilePath(d,s,m) ((int)SNDMSG((d),CDM_GETFILEPATH,(m),(LPARAM)(s)))
243 #define CommDlg_OpenSave_GetFilePathA CommDlg_OpenSave_GetFilePath
244 #define CommDlg_OpenSave_GetFilePathW CommDlg_OpenSave_GetFilePath
245 #define CommDlg_OpenSave_GetFolderPath(d,s,m) ((int)SNDMSG((d),CDM_GETFOLDERPATH,(m),(LPARAM)(LPSTR)(s)))
246 #define CommDlg_OpenSave_GetFolderPathA CommDlg_OpenSave_GetFolderPath
247 #define CommDlg_OpenSave_GetFolderPathW CommDlg_OpenSave_GetFolderPath
248 #define CommDlg_OpenSave_GetFolderIDList(d,i,m) ((int)SNDMSG((d),CDM_GETFOLDERIDLIST,(m),(LPARAM)(i)))
249 #define CommDlg_OpenSave_SetControlText(d,i,t) ((void)SNDMSG((d),CDM_SETCONTROLTEXT,(i),(LPARAM)(t)))
250 #define CommDlg_OpenSave_HideControl(d,i) ((void)SNDMSG((d),CDM_HIDECONTROL,(i),0))
251 #define CommDlg_OpenSave_SetDefExt(d,e) ((void)SNDMSG((d),CDM_SETDEFEXT,0,(LPARAM)(e)))
252
253 typedef UINT (APIENTRY *__CDHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
254 typedef __CDHOOKPROC LPCCHOOKPROC;
255 typedef __CDHOOKPROC LPCFHOOKPROC;
256 typedef __CDHOOKPROC LPFRHOOKPROC;
257 typedef __CDHOOKPROC LPOFNHOOKPROC;
258 typedef __CDHOOKPROC LPPAGEPAINTHOOK;
259 typedef __CDHOOKPROC LPPAGESETUPHOOK;
260 typedef __CDHOOKPROC LPSETUPHOOKPROC;
261 typedef __CDHOOKPROC LPPRINTHOOKPROC;
262 typedef struct tagCHOOSECOLORA {
263         DWORD   lStructSize;
264         HWND    hwndOwner;
265         HWND    hInstance;
266         COLORREF        rgbResult;
267         COLORREF*       lpCustColors;
268         DWORD   Flags;
269         LPARAM  lCustData;
270         LPCCHOOKPROC    lpfnHook;
271         LPCSTR  lpTemplateName;
272 } CHOOSECOLORA,*LPCHOOSECOLORA;
273 typedef struct tagCHOOSECOLORW {
274         DWORD   lStructSize;
275         HWND    hwndOwner;
276         HWND    hInstance;
277         COLORREF        rgbResult;
278         COLORREF*       lpCustColors;
279         DWORD   Flags;
280         LPARAM  lCustData;
281         LPCCHOOKPROC    lpfnHook;
282         LPCWSTR lpTemplateName;
283 } CHOOSECOLORW,*LPCHOOSECOLORW;
284 typedef struct tagCHOOSEFONTA {
285         DWORD   lStructSize;
286         HWND    hwndOwner;
287         HDC     hDC;
288         LPLOGFONTA      lpLogFont;
289         INT     iPointSize;
290         DWORD   Flags;
291         DWORD   rgbColors;
292         LPARAM  lCustData;
293         LPCFHOOKPROC    lpfnHook;
294         LPCSTR  lpTemplateName;
295         HINSTANCE       hInstance;
296         LPSTR   lpszStyle;
297         WORD    nFontType;
298         WORD    ___MISSING_ALIGNMENT__;
299         INT     nSizeMin;
300         INT     nSizeMax;
301 } CHOOSEFONTA,*LPCHOOSEFONTA;
302 typedef struct tagCHOOSEFONTW {
303         DWORD   lStructSize;
304         HWND    hwndOwner;
305         HDC     hDC;
306         LPLOGFONTW      lpLogFont;
307         INT     iPointSize;
308         DWORD   Flags;
309         DWORD   rgbColors;
310         LPARAM  lCustData;
311         LPCFHOOKPROC    lpfnHook;
312         LPCWSTR lpTemplateName;
313         HINSTANCE       hInstance;
314         LPWSTR  lpszStyle;
315         WORD    nFontType;
316         WORD    ___MISSING_ALIGNMENT__;
317         INT     nSizeMin;
318         INT     nSizeMax;
319 } CHOOSEFONTW,*LPCHOOSEFONTW;
320 typedef struct tagDEVNAMES {
321         WORD wDriverOffset;
322         WORD wDeviceOffset;
323         WORD wOutputOffset;
324         WORD wDefault;
325 } DEVNAMES,*LPDEVNAMES;
326 typedef struct {
327         DWORD lStructSize;
328         HWND hwndOwner;
329         HINSTANCE hInstance;
330         DWORD Flags;
331         LPSTR lpstrFindWhat;
332         LPSTR lpstrReplaceWith;
333         WORD wFindWhatLen;
334         WORD wReplaceWithLen;
335         LPARAM lCustData;
336         LPFRHOOKPROC lpfnHook;
337         LPCSTR lpTemplateName;
338 } FINDREPLACEA,*LPFINDREPLACEA;
339 typedef struct {
340         DWORD lStructSize;
341         HWND hwndOwner;
342         HINSTANCE hInstance;
343         DWORD Flags;
344         LPWSTR lpstrFindWhat;
345         LPWSTR lpstrReplaceWith;
346         WORD wFindWhatLen;
347         WORD wReplaceWithLen;
348         LPARAM lCustData;
349         LPFRHOOKPROC lpfnHook;
350         LPCWSTR lpTemplateName;
351 } FINDREPLACEW,*LPFINDREPLACEW;
352 typedef struct tagOFNA {
353         DWORD lStructSize;
354         HWND hwndOwner;
355         HINSTANCE hInstance;
356         LPCSTR lpstrFilter;
357         LPSTR lpstrCustomFilter;
358         DWORD nMaxCustFilter;
359         DWORD nFilterIndex;
360         LPSTR lpstrFile;
361         DWORD nMaxFile;
362         LPSTR lpstrFileTitle;
363         DWORD nMaxFileTitle;
364         LPCSTR lpstrInitialDir;
365         LPCSTR lpstrTitle;
366         DWORD Flags;
367         WORD nFileOffset;
368         WORD nFileExtension;
369         LPCSTR lpstrDefExt;
370         DWORD lCustData;
371         LPOFNHOOKPROC lpfnHook;
372         LPCSTR lpTemplateName;
373 #if (_WIN32_WINNT >= 0x0500)
374         void * pvReserved;
375         DWORD dwReserved;
376         DWORD FlagsEx;
377 #endif /* (_WIN32_WINNT >= 0x0500) */
378 } OPENFILENAMEA,*LPOPENFILENAMEA;
379 typedef struct tagOFNW {
380         DWORD lStructSize;
381         HWND hwndOwner;
382         HINSTANCE hInstance;
383         LPCWSTR lpstrFilter;
384         LPWSTR lpstrCustomFilter;
385         DWORD nMaxCustFilter;
386         DWORD nFilterIndex;
387         LPWSTR lpstrFile;
388         DWORD nMaxFile;
389         LPWSTR lpstrFileTitle;
390         DWORD nMaxFileTitle;
391         LPCWSTR lpstrInitialDir;
392         LPCWSTR lpstrTitle;
393         DWORD Flags;
394         WORD nFileOffset;
395         WORD nFileExtension;
396         LPCWSTR lpstrDefExt;
397         DWORD lCustData;
398         LPOFNHOOKPROC lpfnHook;
399         LPCWSTR lpTemplateName;
400 #if (_WIN32_WINNT >= 0x0500)
401         void * pvReserved;
402         DWORD dwReserved;
403         DWORD FlagsEx;
404 #endif /* (_WIN32_WINNT >= 0x0500) */
405 } OPENFILENAMEW,*LPOPENFILENAMEW;
406 typedef struct _OFNOTIFYA {
407         NMHDR hdr;
408         LPOPENFILENAMEA lpOFN;
409         LPSTR pszFile;
410 } OFNOTIFYA,*LPOFNOTIFYA;
411 typedef struct _OFNOTIFYW {
412         NMHDR hdr;
413         LPOPENFILENAMEW lpOFN;
414         LPWSTR pszFile;
415 } OFNOTIFYW,*LPOFNOTIFYW;
416 typedef struct tagPSDA {
417         DWORD lStructSize;
418         HWND hwndOwner;
419         HGLOBAL hDevMode;
420         HGLOBAL hDevNames;
421         DWORD Flags;
422         POINT ptPaperSize;
423         RECT rtMinMargin;
424         RECT rtMargin;
425         HINSTANCE hInstance;
426         LPARAM lCustData;
427         LPPAGESETUPHOOK lpfnPageSetupHook;
428         LPPAGEPAINTHOOK lpfnPagePaintHook;
429         LPCSTR lpPageSetupTemplateName;
430         HGLOBAL hPageSetupTemplate;
431 } PAGESETUPDLGA,*LPPAGESETUPDLGA;
432 typedef struct tagPSDW {
433         DWORD lStructSize;
434         HWND hwndOwner;
435         HGLOBAL hDevMode;
436         HGLOBAL hDevNames;
437         DWORD Flags;
438         POINT ptPaperSize;
439         RECT rtMinMargin;
440         RECT rtMargin;
441         HINSTANCE hInstance;
442         LPARAM lCustData;
443         LPPAGESETUPHOOK lpfnPageSetupHook;
444         LPPAGEPAINTHOOK lpfnPagePaintHook;
445         LPCWSTR lpPageSetupTemplateName;
446         HGLOBAL hPageSetupTemplate;
447 } PAGESETUPDLGW,*LPPAGESETUPDLGW;
448 typedef struct tagPDA {
449         DWORD lStructSize;
450         HWND hwndOwner;
451         HANDLE hDevMode;
452         HANDLE hDevNames;
453         HDC hDC;
454         DWORD Flags;
455         WORD nFromPage;
456         WORD nToPage;
457         WORD nMinPage;
458         WORD nMaxPage;
459         WORD nCopies;
460         HINSTANCE hInstance;
461         DWORD lCustData;
462         LPPRINTHOOKPROC lpfnPrintHook;
463         LPSETUPHOOKPROC lpfnSetupHook;
464         LPCSTR lpPrintTemplateName;
465         LPCSTR lpSetupTemplateName;
466         HANDLE hPrintTemplate;
467         HANDLE hSetupTemplate;
468 } PRINTDLGA,*LPPRINTDLGA;
469 typedef struct tagPDW {
470         DWORD lStructSize;
471         HWND hwndOwner;
472         HANDLE hDevMode;
473         HANDLE hDevNames;
474         HDC hDC;
475         DWORD Flags;
476         WORD nFromPage;
477         WORD nToPage;
478         WORD nMinPage;
479         WORD nMaxPage;
480         WORD nCopies;
481         HINSTANCE hInstance;
482         DWORD lCustData;
483         LPPRINTHOOKPROC lpfnPrintHook;
484         LPSETUPHOOKPROC lpfnSetupHook;
485         LPCWSTR lpPrintTemplateName;
486         LPCWSTR lpSetupTemplateName;
487         HANDLE hPrintTemplate;
488         HANDLE hSetupTemplate;
489 } PRINTDLGW,*LPPRINTDLGW;
490 #if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
491 #include <unknwn.h>  /* for LPUNKNOWN  */ 
492 #include <prsht.h>   /* for HPROPSHEETPAGE  */
493 typedef struct tagPRINTPAGERANGE {
494    DWORD  nFromPage;
495    DWORD  nToPage;
496 } PRINTPAGERANGE, *LPPRINTPAGERANGE;
497 typedef struct tagPDEXA {
498    DWORD lStructSize;
499    HWND hwndOwner;
500    HGLOBAL hDevMode;
501    HGLOBAL hDevNames;
502    HDC hDC;
503    DWORD Flags;
504    DWORD Flags2;
505    DWORD ExclusionFlags;
506    DWORD nPageRanges;
507    DWORD nMaxPageRanges;
508    LPPRINTPAGERANGE lpPageRanges;
509    DWORD nMinPage;
510    DWORD nMaxPage;
511    DWORD nCopies;
512    HINSTANCE hInstance;
513    LPCSTR lpPrintTemplateName;
514    LPUNKNOWN lpCallback;
515    DWORD nPropertyPages;
516    HPROPSHEETPAGE *lphPropertyPages;
517    DWORD nStartPage;
518    DWORD dwResultAction;
519 } PRINTDLGEXA, *LPPRINTDLGEXA;
520 typedef struct tagPDEXW {
521    DWORD lStructSize;
522    HWND hwndOwner;
523    HGLOBAL hDevMode;
524    HGLOBAL hDevNames;
525    HDC hDC;
526    DWORD Flags;
527    DWORD Flags2;
528    DWORD ExclusionFlags;
529    DWORD nPageRanges;
530    DWORD nMaxPageRanges;
531    LPPRINTPAGERANGE lpPageRanges;
532    DWORD nMinPage;
533    DWORD nMaxPage;
534    DWORD nCopies;
535    HINSTANCE hInstance;
536    LPCWSTR lpPrintTemplateName;
537    LPUNKNOWN lpCallback;
538    DWORD nPropertyPages;
539    HPROPSHEETPAGE *lphPropertyPages;
540    DWORD nStartPage;
541    DWORD dwResultAction;
542 } PRINTDLGEXW, *LPPRINTDLGEXW;
543 #endif /* WINVER >= 0x0500 */
544
545 BOOL WINAPI ChooseColorA(LPCHOOSECOLORA);
546 BOOL WINAPI ChooseColorW(LPCHOOSECOLORW);
547 BOOL WINAPI ChooseFontA(LPCHOOSEFONTA);
548 BOOL WINAPI ChooseFontW(LPCHOOSEFONTW);
549 DWORD WINAPI CommDlgExtendedError(void);
550 HWND WINAPI FindTextA(LPFINDREPLACEA);
551 HWND WINAPI FindTextW(LPFINDREPLACEW);
552 short WINAPI GetFileTitleA(LPCSTR,LPSTR,WORD);
553 short WINAPI GetFileTitleW(LPCWSTR,LPWSTR,WORD);
554 BOOL WINAPI GetOpenFileNameA(LPOPENFILENAMEA);
555 BOOL WINAPI GetOpenFileNameW(LPOPENFILENAMEW);
556 BOOL WINAPI GetSaveFileNameA(LPOPENFILENAMEA);
557 BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW);
558 BOOL WINAPI PageSetupDlgA(LPPAGESETUPDLGA);
559 BOOL WINAPI PageSetupDlgW(LPPAGESETUPDLGW);
560 BOOL WINAPI PrintDlgA(LPPRINTDLGA);
561 BOOL WINAPI PrintDlgW(LPPRINTDLGW);
562 HWND WINAPI ReplaceTextA(LPFINDREPLACEA);
563 HWND WINAPI ReplaceTextW(LPFINDREPLACEW);
564 #if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
565 HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA);
566 HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW);
567 #endif /* WINVER >= 0x0500 */
568
569 #ifdef UNICODE
570 #define LBSELCHSTRING  LBSELCHSTRINGW
571 #define SHAREVISTRING  SHAREVISTRINGW
572 #define FILEOKSTRING   FILEOKSTRINGW
573 #define COLOROKSTRING  COLOROKSTRINGW
574 #define SETRGBSTRING   SETRGBSTRINGW
575 #define HELPMSGSTRING  HELPMSGSTRINGW
576 #define FINDMSGSTRING  FINDMSGSTRINGW
577 typedef CHOOSECOLORW CHOOSECOLOR,*LPCHOOSECOLOR;
578 typedef CHOOSEFONTW CHOOSEFONT,*LPCHOOSEFONT;
579 typedef FINDREPLACEW FINDREPLACE,*LPFINDREPLACE;
580 typedef OPENFILENAMEW OPENFILENAME,*LPOPENFILENAME;
581 typedef OFNOTIFYW OFNOTIFY,*LPOFNOTIFY;
582 typedef PAGESETUPDLGW PAGESETUPDLG,*LPPAGESETUPDLG;
583 typedef PRINTDLGW PRINTDLG,*LPPRINTDLG;
584 #define ChooseColor ChooseColorW
585 #define ChooseFont ChooseFontW
586 #define FindText FindTextW
587 #define GetFileTitle GetFileTitleW
588 #define GetOpenFileName GetOpenFileNameW
589 #define GetSaveFileName GetSaveFileNameW
590 #define PageSetupDlg PageSetupDlgW
591 #define PrintDlg PrintDlgW
592 #define ReplaceText ReplaceTextW
593 #if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
594 typedef PRINTDLGEXW PRINTDLGEX, *LPPRINTDLGEX;
595 #define PrintDlgEx PrintDlgExW
596 #endif /* WINVER >= 0x0500 */
597 #else /* UNICODE */
598 #define LBSELCHSTRING  LBSELCHSTRINGA
599 #define SHAREVISTRING  SHAREVISTRINGA
600 #define FILEOKSTRING   FILEOKSTRINGA
601 #define COLOROKSTRING  COLOROKSTRINGA
602 #define SETRGBSTRING   SETRGBSTRINGA
603 #define HELPMSGSTRING  HELPMSGSTRINGA
604 #define FINDMSGSTRING  FINDMSGSTRINGA
605 typedef CHOOSECOLORA CHOOSECOLOR,*LPCHOOSECOLOR;
606 typedef CHOOSEFONTA CHOOSEFONT,*LPCHOOSEFONT;
607 typedef FINDREPLACEA FINDREPLACE,*LPFINDREPLACE;
608 typedef OPENFILENAMEA OPENFILENAME,*LPOPENFILENAME;
609 typedef OFNOTIFYA OFNOTIFY,*LPOFNOTIFY;
610 typedef PAGESETUPDLGA PAGESETUPDLG,*LPPAGESETUPDLG;
611 typedef PRINTDLGA PRINTDLG,*LPPRINTDLG;
612 #define ChooseColor ChooseColorA
613 #define ChooseFont ChooseFontA
614 #define FindText FindTextA
615 #define GetFileTitle GetFileTitleA
616 #define GetOpenFileName GetOpenFileNameA
617 #define GetSaveFileName GetSaveFileNameA
618 #define PageSetupDlg PageSetupDlgA
619 #define PrintDlg PrintDlgA
620 #define ReplaceText ReplaceTextA
621 #if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
622 typedef PRINTDLGEXA PRINTDLGEX, *LPPRINTDLGEX;
623 #define PrintDlgEx PrintDlgExA
624 #endif /* WINVER >= 0x0500 */
625 #endif /* UNICODE */
626 #pragma pack(pop)
627 #ifdef __cplusplus
628 }
629 #endif
630 #endif