We got passed a NULL Dialect ptr and accessed it unprotected.
[wine] / include / commdlg.h
1 /* 
2  * COMMDLG - Common Wine Dialog ... :-)
3  */
4
5 #ifndef __WINE_COMMDLG_H
6 #define __WINE_COMMDLG_H
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 #include "wintypes.h"           /* needed for CHOOSEFONT structure */
13
14 #define OFN_READONLY                 0x00000001
15 #define OFN_OVERWRITEPROMPT          0x00000002
16 #define OFN_HIDEREADONLY             0x00000004
17 #define OFN_NOCHANGEDIR              0x00000008
18 #define OFN_SHOWHELP                 0x00000010
19 #define OFN_ENABLEHOOK               0x00000020
20 #define OFN_ENABLETEMPLATE           0x00000040
21 #define OFN_ENABLETEMPLATEHANDLE     0x00000080
22 #define OFN_NOVALIDATE               0x00000100
23 #define OFN_ALLOWMULTISELECT         0x00000200
24 #define OFN_EXTENSIONDIFFERENT       0x00000400
25 #define OFN_PATHMUSTEXIST            0x00000800
26 #define OFN_FILEMUSTEXIST            0x00001000
27 #define OFN_CREATEPROMPT             0x00002000
28 #define OFN_SHAREAWARE               0x00004000
29 #define OFN_NOREADONLYRETURN         0x00008000
30 #define OFN_NOTESTFILECREATE         0x00010000
31
32 /*      OFN_?                        0x00020000 */
33
34 #define OFN_NOLONGNAMES              0x00040000
35 #define OFN_EXPLORER                 0x00080000
36 #define OFN_NODEREFERENCELINKS       0x00100000
37 #define OFN_LONGNAMES                0x00200000
38
39 /* WINE internal flags */
40 #define OFN_UNICODE                  0x40000000 /*to differ between 32W/A hook*/
41 #define OFN_WINE                     0x80000000 /* comdlg32 */
42
43 #define OFN_SHAREFALLTHROUGH     2
44 #define OFN_SHARENOWARN          1
45 #define OFN_SHAREWARN            0
46
47 typedef struct {
48         DWORD           lStructSize;
49         HWND16          hwndOwner;
50         HINSTANCE16     hInstance;
51         SEGPTR          lpstrFilter;
52         SEGPTR          lpstrCustomFilter;
53         DWORD           nMaxCustFilter;
54         DWORD           nFilterIndex;
55         SEGPTR          lpstrFile;
56         DWORD           nMaxFile;
57         SEGPTR          lpstrFileTitle;
58         DWORD           nMaxFileTitle;
59         SEGPTR          lpstrInitialDir;
60         SEGPTR          lpstrTitle;
61         DWORD           Flags;
62         UINT16          nFileOffset;
63         UINT16          nFileExtension;
64         SEGPTR          lpstrDefExt;
65         LPARAM          lCustData;
66         WNDPROC16       lpfnHook;
67         SEGPTR          lpTemplateName;
68 }   OPENFILENAME16,*LPOPENFILENAME16;
69
70 typedef struct {
71         DWORD           lStructSize;
72         HWND            hwndOwner;
73         HINSTANCE       hInstance;
74         LPCSTR          lpstrFilter;
75         LPSTR           lpstrCustomFilter;
76         DWORD           nMaxCustFilter;
77         DWORD           nFilterIndex;
78         LPSTR           lpstrFile;
79         DWORD           nMaxFile;
80         LPSTR           lpstrFileTitle;
81         DWORD           nMaxFileTitle;
82         LPCSTR          lpstrInitialDir;
83         LPCSTR          lpstrTitle;
84         DWORD           Flags;
85         WORD            nFileOffset;
86         WORD            nFileExtension;
87         LPCSTR          lpstrDefExt;
88         LPARAM          lCustData;
89         WNDPROC lpfnHook;
90         LPCSTR          lpTemplateName;
91 } OPENFILENAMEA,*LPOPENFILENAMEA;
92
93 typedef struct {
94         DWORD           lStructSize;
95         HWND            hwndOwner;
96         HINSTANCE       hInstance;
97         LPCWSTR         lpstrFilter;
98         LPWSTR          lpstrCustomFilter;
99         DWORD           nMaxCustFilter;
100         DWORD           nFilterIndex;
101         LPWSTR          lpstrFile;
102         DWORD           nMaxFile;
103         LPWSTR          lpstrFileTitle;
104         DWORD           nMaxFileTitle;
105         LPCWSTR         lpstrInitialDir;
106         LPCWSTR         lpstrTitle;
107         DWORD           Flags;
108         WORD            nFileOffset;
109         WORD            nFileExtension;
110         LPCWSTR         lpstrDefExt;
111         LPARAM          lCustData;
112         WNDPROC lpfnHook;
113         LPCWSTR         lpTemplateName;
114 } OPENFILENAMEW,*LPOPENFILENAMEW;
115
116 DECL_WINELIB_TYPE_AW(OPENFILENAME)
117 DECL_WINELIB_TYPE_AW(LPOPENFILENAME)
118
119 typedef struct
120 {
121         NMHDR           hdr;
122         LPOPENFILENAMEA lpOFN;
123         LPSTR           pszFile;
124 } OFNOTIFYA, *LPOFNOTIFYA;
125
126 typedef struct
127 {
128         NMHDR           hdr;
129         LPOPENFILENAMEW lpOFN;
130         LPWSTR          pszFile;
131 } OFNOTIFYW, *LPOFNOTIFYW;
132
133 DECL_WINELIB_TYPE_AW(OFNOTIFY)
134 DECL_WINELIB_TYPE_AW(LPOFNOTIFY)
135  
136 typedef UINT (CALLBACK *LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
137
138 typedef struct {
139         DWORD           lStructSize;
140         HWND16          hwndOwner;
141         HWND16          hInstance;
142         COLORREF        rgbResult;
143         COLORREF       *lpCustColors;
144         DWORD           Flags;
145         LPARAM          lCustData;
146         WNDPROC16       lpfnHook;
147         SEGPTR          lpTemplateName;
148 } CHOOSECOLOR16;
149 typedef CHOOSECOLOR16 *LPCHOOSECOLOR16;
150
151 typedef struct {
152         DWORD           lStructSize;
153         HWND            hwndOwner;
154         HWND            hInstance;
155         DWORD           rgbResult;
156         LPDWORD         lpCustColors;
157         DWORD           Flags;
158         DWORD           lCustData;
159         LPCCHOOKPROC    lpfnHook;
160         LPCSTR          lpTemplateName;
161 } CHOOSECOLORA;
162 typedef CHOOSECOLORA *LPCHOOSECOLORA;
163
164 typedef struct {
165         DWORD           lStructSize;
166         HWND            hwndOwner;
167         HWND            hInstance;
168         DWORD           rgbResult;
169         LPDWORD         *lpCustColors;
170         DWORD           Flags;
171         DWORD           lCustData;
172         LPCCHOOKPROC    lpfnHook;
173         LPCWSTR         lpTemplateName;
174 } CHOOSECOLORW;
175 typedef CHOOSECOLORW *LPCHOOSECOLORW;
176
177 DECL_WINELIB_TYPE_AW(CHOOSECOLOR)
178 DECL_WINELIB_TYPE_AW(LPCHOOSECOLOR)
179
180
181 #define CC_RGBINIT               0x00000001
182 #define CC_FULLOPEN              0x00000002
183 #define CC_PREVENTFULLOPEN       0x00000004
184 #define CC_SHOWHELP              0x00000008
185 #define CC_ENABLEHOOK            0x00000010
186 #define CC_ENABLETEMPLATE        0x00000020
187 #define CC_ENABLETEMPLATEHANDLE  0x00000040
188
189 typedef struct {
190         DWORD           lStructSize;                    /* size of this struct 0x20 */
191         HWND16          hwndOwner;                              /* handle to owner's window */
192         HINSTANCE16     hInstance;                              /* instance handle of.EXE that  */
193                                                                                 /*      contains cust. dlg. template */
194         DWORD           Flags;                  /* one or more of the FR_?? */
195         SEGPTR          lpstrFindWhat;          /* ptr. to search string    */
196         SEGPTR          lpstrReplaceWith;       /* ptr. to replace string   */
197         UINT16          wFindWhatLen;           /* size of find buffer      */
198         UINT16          wReplaceWithLen;        /* size of replace buffer   */
199         LPARAM          lCustData;              /* data passed to hook fn.  */
200         WNDPROC16       lpfnHook;
201         SEGPTR          lpTemplateName;         /* custom template name     */
202         } FINDREPLACE16, *LPFINDREPLACE16;
203
204 typedef struct {
205         DWORD           lStructSize;
206         HWND            hwndOwner;
207         HINSTANCE       hInstance;
208
209         DWORD           Flags;
210         LPSTR           lpstrFindWhat;
211         LPSTR           lpstrReplaceWith;
212         WORD            wFindWhatLen;
213         WORD            wReplaceWithLen;
214         LPARAM          lCustData;
215         WNDPROC       lpfnHook;
216         LPCSTR          lpTemplateName;
217         } FINDREPLACEA, *LPFINDREPLACEA;
218
219 typedef struct {
220         DWORD           lStructSize;
221         HWND            hwndOwner;
222         HINSTANCE       hInstance;
223
224         DWORD           Flags;
225         LPWSTR          lpstrFindWhat;
226         LPWSTR          lpstrReplaceWith;
227         WORD            wFindWhatLen;
228         WORD            wReplaceWithLen;
229         LPARAM          lCustData;
230         WNDPROC       lpfnHook;
231         LPCWSTR         lpTemplateName;
232         } FINDREPLACEW, *LPFINDREPLACEW;
233         
234 DECL_WINELIB_TYPE_AW(FINDREPLACE)
235 DECL_WINELIB_TYPE_AW(LPFINDREPLACE)
236         
237 #define FR_DOWN                         0x00000001
238 #define FR_WHOLEWORD                    0x00000002
239 #define FR_MATCHCASE                    0x00000004
240 #define FR_FINDNEXT                     0x00000008
241 #define FR_REPLACE                      0x00000010
242 #define FR_REPLACEALL                   0x00000020
243 #define FR_DIALOGTERM                   0x00000040
244 #define FR_SHOWHELP                     0x00000080
245 #define FR_ENABLEHOOK                   0x00000100
246 #define FR_ENABLETEMPLATE               0x00000200
247 #define FR_NOUPDOWN                     0x00000400
248 #define FR_NOMATCHCASE                  0x00000800
249 #define FR_NOWHOLEWORD                  0x00001000
250 #define FR_ENABLETEMPLATEHANDLE         0x00002000
251 #define FR_HIDEUPDOWN                   0x00004000
252 #define FR_HIDEMATCHCASE                0x00008000
253 #define FR_HIDEWHOLEWORD                0x00010000
254
255
256 #pragma pack(1)
257
258 typedef struct 
259 {
260         DWORD                   lStructSize;
261         HWND16                  hwndOwner;          /* caller's window handle   */
262         HDC16                   hDC;                /* printer DC/IC or NULL    */
263         SEGPTR                  lpLogFont;          /* ptr. to a LOGFONT struct */
264         short                   iPointSize;         /* 10 * size in points of selected font */
265         DWORD                   Flags WINE_PACKED;  /* enum. type flags         */
266         COLORREF                rgbColors;          /* returned text color      */
267         LPARAM                  lCustData;          /* data passed to hook fn.  */
268         WNDPROC16               lpfnHook;
269         SEGPTR                  lpTemplateName;     /* custom template name     */
270         HINSTANCE16             hInstance;          /* instance handle of.EXE that   */
271                                                         /* contains cust. dlg. template  */
272         SEGPTR                  lpszStyle WINE_PACKED;  /* return the style field here   */
273                                                         /* must be LF_FACESIZE or bigger */
274         UINT16                  nFontType;              /* same value reported to the    */
275                                                         /* EnumFonts callback with the   */
276                                                         /* extra FONTTYPE_ bits added    */
277         short                   nSizeMin WINE_PACKED;   /* minimum pt size allowed & */
278         short                   nSizeMax WINE_PACKED;   /* max pt size allowed if    */
279                                                         /* CF_LIMITSIZE is used      */
280 } CHOOSEFONT16, *LPCHOOSEFONT16;
281
282
283 typedef struct
284 {
285         UINT    lStructSize; 
286         HWND            hwndOwner; 
287         HDC             hDC; 
288         LPLOGFONTA    lpLogFont; 
289         INT             iPointSize; 
290         UINT            Flags; 
291         COLORREF        rgbColors; 
292         LPARAM          lCustData; 
293         WNDPROC         lpfnHook; 
294         LPCSTR          lpTemplateName; 
295         HINSTANCE       hInstance; 
296         LPSTR           lpszStyle; 
297         UINT16          nFontType; 
298         UINT16  ___MISSING_ALIGNMENT__; 
299         INT     nSizeMin; 
300         INT             nSizeMax; 
301 } CHOOSEFONTA, *LPCHOOSEFONTA;
302
303 typedef struct
304 {
305         UINT    lStructSize; 
306         HWND            hwndOwner; 
307         HDC             hDC; 
308         LPLOGFONTW    lpLogFont; 
309         INT             iPointSize; 
310         UINT            Flags; 
311         COLORREF        rgbColors; 
312         LPARAM          lCustData; 
313         WNDPROC         lpfnHook; 
314         LPCWSTR         lpTemplateName; 
315         HINSTANCE       hInstance; 
316         LPWSTR          lpszStyle; 
317         UINT16          nFontType; 
318         UINT16  ___MISSING_ALIGNMENT__; 
319         INT     nSizeMin; 
320         INT             nSizeMax; 
321 } CHOOSEFONTW, *LPCHOOSEFONTW;
322
323 DECL_WINELIB_TYPE_AW(CHOOSEFONT)
324 DECL_WINELIB_TYPE_AW(LPCHOOSEFONT)
325
326 #pragma pack(4)
327
328 #define CF_SCREENFONTS               0x00000001
329 #define CF_PRINTERFONTS              0x00000002
330 #define CF_BOTH                      (CF_SCREENFONTS | CF_PRINTERFONTS)
331 #define CF_SHOWHELP                  0x00000004L
332 #define CF_ENABLEHOOK                0x00000008L
333 #define CF_ENABLETEMPLATE            0x00000010L
334 #define CF_ENABLETEMPLATEHANDLE      0x00000020L
335 #define CF_INITTOLOGFONTSTRUCT       0x00000040L
336 #define CF_USESTYLE                  0x00000080L
337 #define CF_EFFECTS                   0x00000100L
338 #define CF_APPLY                     0x00000200L
339 #define CF_ANSIONLY                  0x00000400L
340 #define CF_SCRIPTSONLY               CF_ANSIONLY
341 #define CF_NOVECTORFONTS             0x00000800L
342 #define CF_NOOEMFONTS                CF_NOVECTORFONTS
343 #define CF_NOSIMULATIONS             0x00001000L
344 #define CF_LIMITSIZE                 0x00002000L
345 #define CF_FIXEDPITCHONLY            0x00004000L
346 #define CF_WYSIWYG                   0x00008000L /* use with CF_SCREENFONTS & CF_PRINTERFONTS */
347 #define CF_FORCEFONTEXIST            0x00010000L
348 #define CF_SCALABLEONLY              0x00020000L
349 #define CF_TTONLY                    0x00040000L
350 #define CF_NOFACESEL                 0x00080000L
351 #define CF_NOSTYLESEL                0x00100000L
352 #define CF_NOSIZESEL                 0x00200000L
353 #define CF_SELECTSCRIPT              0x00400000L
354 #define CF_NOSCRIPTSEL               0x00800000L
355 #define CF_NOVERTFONTS               0x01000000L
356
357 #define SIMULATED_FONTTYPE      0x8000
358 #define PRINTER_FONTTYPE        0x4000
359 #define SCREEN_FONTTYPE         0x2000
360 #define BOLD_FONTTYPE           0x0100
361 #define ITALIC_FONTTYPE         0x0200
362 #define REGULAR_FONTTYPE        0x0400
363
364 #define WM_CHOOSEFONT_GETLOGFONT        (WM_USER + 1)
365 #define WM_CHOOSEFONT_SETLOGFONT        (WM_USER + 101)
366 #define WM_CHOOSEFONT_SETFLAGS          (WM_USER + 102)
367
368 #define LBSELCHSTRING  "commdlg_LBSelChangedNotify"
369 #define SHAREVISTRING  "commdlg_ShareViolation"
370 #define FILEOKSTRING   "commdlg_FileNameOK"
371 #define COLOROKSTRING  "commdlg_ColorOK"
372 #define SETRGBSTRING   "commdlg_SetRGBColor"
373 #define FINDMSGSTRING  "commdlg_FindReplace"
374 #define HELPMSGSTRING  "commdlg_help"
375
376 #define CD_LBSELNOITEMS -1
377 #define CD_LBSELCHANGE   0
378 #define CD_LBSELSUB      1
379 #define CD_LBSELADD      2
380
381 #define CDN_FIRST   (0U-601U)
382 #define CDN_LAST    (0U-699U)
383
384 #define CDN_INITDONE            (CDN_FIRST - 0x0000)
385 #define CDN_SELCHANGE           (CDN_FIRST - 0x0001)
386 #define CDN_FOLDERCHANGE        (CDN_FIRST - 0x0002)
387 #define CDN_SHAREVIOLATION      (CDN_FIRST - 0x0003)
388 #define CDN_HELP                (CDN_FIRST - 0x0004)
389 #define CDN_FILEOK              (CDN_FIRST - 0x0005)
390 #define CDN_TYPECHANGE          (CDN_FIRST - 0x0006)
391
392 #define CDM_FIRST               (WM_USER + 100)
393 #define CDM_LAST                (WM_USER + 200)
394
395 #define CDM_GETSPEC             (CDM_FIRST + 0x0000)
396 #define CDM_GETFILEPATH         (CDM_FIRST + 0x0001)
397 #define CDM_GETFOLDERPATH       (CDM_FIRST + 0x0002)
398 #define CDM_GETFOLDERLIST       (CDM_FIRST + 0x0003)
399 #define CDM_SETCONTROLTEXT      (CDM_FIRST + 0x0004)
400 #define CDM_HIDECONTROL         (CDM_FIRST + 0x0005)
401 #define CDM_SETDEFEXT           (CDM_FIRST + 0x0006)
402
403 typedef struct
404 {
405     DWORD            lStructSize;
406     HWND16           hwndOwner;
407     HGLOBAL16        hDevMode;
408     HGLOBAL16        hDevNames;
409     HDC16            hDC;
410     DWORD            Flags;
411     WORD             nFromPage;
412     WORD             nToPage;
413     WORD             nMinPage;
414     WORD             nMaxPage;
415     WORD             nCopies;
416     HINSTANCE16      hInstance;
417     LPARAM           lCustData;
418     WNDPROC16        lpfnPrintHook;
419     WNDPROC16        lpfnSetupHook;
420     SEGPTR           lpPrintTemplateName;
421     SEGPTR           lpSetupTemplateName;
422     HGLOBAL16        hPrintTemplate;
423     HGLOBAL16        hSetupTemplate;
424 } PRINTDLG16, *LPPRINTDLG16;
425
426 typedef UINT (CALLBACK *LPPRINTHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
427 typedef UINT (CALLBACK *LPSETUPHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
428
429 typedef struct tagPDA
430 {
431     DWORD            lStructSize;
432     HWND           hwndOwner;
433     HGLOBAL        hDevMode;
434     HGLOBAL        hDevNames;
435     HDC            hDC;
436     DWORD            Flags;
437     WORD             nFromPage;
438     WORD             nToPage;
439     WORD             nMinPage;
440     WORD             nMaxPage;
441     WORD             nCopies;
442     HINSTANCE      hInstance;
443     LPARAM           lCustData;
444     LPPRINTHOOKPROC  lpfnPrintHook;
445     LPSETUPHOOKPROC  lpfnSetupHook;
446     LPCSTR           lpPrintTemplateName;
447     LPCSTR           lpSetupTemplateName;
448     HGLOBAL        hPrintTemplate;
449     HGLOBAL        hSetupTemplate;
450 } PRINTDLGA, *LPPRINTDLGA;
451
452 typedef struct tagPDW
453 {
454     DWORD            lStructSize;
455     HWND           hwndOwner;
456     HGLOBAL        hDevMode;
457     HGLOBAL        hDevNames;
458     HDC            hDC;
459     DWORD            Flags;
460     WORD             nFromPage;
461     WORD             nToPage;
462     WORD             nMinPage;
463     WORD             nMaxPage;
464     WORD             nCopies;
465     HINSTANCE      hInstance;
466     LPARAM           lCustData;
467     LPPRINTHOOKPROC  lpfnPrintHook;
468     LPSETUPHOOKPROC  lpfnSetupHook;
469     LPCWSTR          lpPrintTemplateName;
470     LPCWSTR          lpSetupTemplateName;
471     HGLOBAL        hPrintTemplate;
472     HGLOBAL        hSetupTemplate;
473 } PRINTDLGW, *LPPRINTDLGW;
474
475 DECL_WINELIB_TYPE_AW(PRINTDLG)
476 DECL_WINELIB_TYPE_AW(LPPRINTDLG)
477
478 #define PD_ALLPAGES                  0x00000000
479 #define PD_SELECTION                 0x00000001
480 #define PD_PAGENUMS                  0x00000002
481 #define PD_NOSELECTION               0x00000004
482 #define PD_NOPAGENUMS                0x00000008
483 #define PD_COLLATE                   0x00000010
484 #define PD_PRINTTOFILE               0x00000020
485 #define PD_PRINTSETUP                0x00000040
486 #define PD_NOWARNING                 0x00000080
487 #define PD_RETURNDC                  0x00000100
488 #define PD_RETURNIC                  0x00000200
489 #define PD_RETURNDEFAULT             0x00000400
490 #define PD_SHOWHELP                  0x00000800
491 #define PD_ENABLEPRINTHOOK           0x00001000
492 #define PD_ENABLESETUPHOOK           0x00002000
493 #define PD_ENABLEPRINTTEMPLATE       0x00004000
494 #define PD_ENABLESETUPTEMPLATE       0x00008000
495 #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
496 #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
497 #define PD_USEDEVMODECOPIES          0x00040000
498 #define PD_DISABLEPRINTTOFILE        0x00080000
499 #define PD_HIDEPRINTTOFILE           0x00100000
500
501 typedef enum __MIDL_IPrint_0001
502 {
503         PRINTFLAG_MAYBOTHERUSER = 1,
504         PRINTFLAG_PROMPTUSER    = 2,
505         PRINTFLAG_USERMAYCHANGEPRINTER  = 4,
506         PRINTFLAG_RECOMPOSETODEVICE     = 8,
507         PRINTFLAG_DONTACTUALLYPRINT     = 16,
508         PRINTFLAG_FORCEPROPERTIES       = 32,
509         PRINTFLAG_PRINTTOFILE   = 64
510 } PRINTFLAG;
511  
512 typedef struct {
513         UINT16  wDriverOffset;
514         UINT16  wDeviceOffset;
515         UINT16  wOutputOffset;
516         UINT16  wDefault;
517         } DEVNAMES;
518 typedef DEVNAMES * LPDEVNAMES;
519
520 #define DN_DEFAULTPRN      0x0001
521
522
523 #define CDERR_DIALOGFAILURE   0xFFFF
524 #define CDERR_GENERALCODES     0x0000
525 #define CDERR_STRUCTSIZE       0x0001
526 #define CDERR_INITIALIZATION   0x0002
527 #define CDERR_NOTEMPLATE       0x0003
528 #define CDERR_NOHINSTANCE      0x0004
529 #define CDERR_LOADSTRFAILURE   0x0005
530 #define CDERR_FINDRESFAILURE   0x0006
531 #define CDERR_LOADRESFAILURE   0x0007
532 #define CDERR_LOCKRESFAILURE   0x0008
533 #define CDERR_MEMALLOCFAILURE  0x0009
534 #define CDERR_MEMLOCKFAILURE   0x000A
535 #define CDERR_NOHOOK           0x000B
536 #define CDERR_REGISTERMSGFAIL  0x000C
537
538 #define PDERR_PRINTERCODES     0x1000
539 #define PDERR_SETUPFAILURE     0x1001
540 #define PDERR_PARSEFAILURE     0x1002
541 #define PDERR_RETDEFFAILURE    0x1003
542 #define PDERR_LOADDRVFAILURE   0x1004
543 #define PDERR_GETDEVMODEFAIL   0x1005
544 #define PDERR_INITFAILURE      0x1006
545 #define PDERR_NODEVICES        0x1007
546 #define PDERR_NODEFAULTPRN     0x1008
547 #define PDERR_DNDMMISMATCH     0x1009
548 #define PDERR_CREATEICFAILURE  0x100A
549 #define PDERR_PRINTERNOTFOUND  0x100B
550 #define PDERR_DEFAULTDIFFERENT 0x100C
551
552 /* PageSetupDlg stuff ... */
553 #define WM_PSD_PAGESETUPDLG     (WM_USER  )
554 #define WM_PSD_FULLPAGERECT     (WM_USER+1)
555 #define WM_PSD_MINMARGINRECT    (WM_USER+2)
556 #define WM_PSD_MARGINRECT       (WM_USER+3)
557 #define WM_PSD_GREEKTEXTRECT    (WM_USER+4)
558 #define WM_PSD_ENVSTAMPRECT     (WM_USER+5)
559 #define WM_PSD_YAFULLPAGERECT   (WM_USER+6)
560
561 typedef UINT (CALLBACK* LPPAGEPAINTHOOK)( HWND, UINT, WPARAM, LPARAM );
562 typedef UINT (CALLBACK* LPPAGESETUPHOOK)( HWND, UINT, WPARAM, LPARAM );
563
564 typedef struct tagPSDA
565 {
566         DWORD           lStructSize;
567         HWND            hwndOwner;
568         HGLOBAL hDevMode;
569         HGLOBAL hDevNames;
570         DWORD           Flags;
571         POINT           ptPaperSize;
572         RECT            rtMinMargin;
573         RECT            rtMargin;
574         HINSTANCE       hInstance;
575         LPARAM          lCustData;
576         LPPAGESETUPHOOK lpfnPageSetupHook;
577         LPPAGEPAINTHOOK lpfnPagePaintHook;
578         LPCSTR          lpPageSetupTemplateName;
579         HGLOBAL hPageSetupTemplate;
580 } PAGESETUPDLGA,*LPPAGESETUPDLGA;
581
582 typedef struct tagPSDW
583 {
584         DWORD           lStructSize;
585         HWND            hwndOwner;
586         HGLOBAL hDevMode;
587         HGLOBAL hDevNames;
588         DWORD           Flags;
589         POINT           ptPaperSize;
590         RECT            rtMinMargin;
591         RECT            rtMargin;
592         HINSTANCE       hInstance;
593         LPARAM          lCustData;
594         LPPAGESETUPHOOK lpfnPageSetupHook;
595         LPPAGEPAINTHOOK lpfnPagePaintHook;
596         LPCWSTR         lpPageSetupTemplateName;
597         HGLOBAL hPageSetupTemplate;
598 } PAGESETUPDLGW,*LPPAGESETUPDLGW;
599 DECL_WINELIB_TYPE_AW(PAGESETUPDLG)
600 DECL_WINELIB_TYPE_AW(LPPAGESETUPDLG)
601
602 #define PSD_DEFAULTMINMARGINS             0x00000000
603 #define PSD_INWININIINTLMEASURE           0x00000000
604
605 #define PSD_MINMARGINS                    0x00000001
606 #define PSD_MARGINS                       0x00000002
607 #define PSD_INTHOUSANDTHSOFINCHES         0x00000004
608 #define PSD_INHUNDREDTHSOFMILLIMETERS     0x00000008
609 #define PSD_DISABLEMARGINS                0x00000010
610 #define PSD_DISABLEPRINTER                0x00000020
611 #define PSD_NOWARNING                     0x00000080
612 #define PSD_DISABLEORIENTATION            0x00000100
613 #define PSD_RETURNDEFAULT                 0x00000400
614 #define PSD_DISABLEPAPER                  0x00000200
615 #define PSD_SHOWHELP                      0x00000800
616 #define PSD_ENABLEPAGESETUPHOOK           0x00002000
617 #define PSD_ENABLEPAGESETUPTEMPLATE       0x00008000
618 #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x00020000
619 #define PSD_ENABLEPAGEPAINTHOOK           0x00040000
620 #define PSD_DISABLEPAGEPAINTING           0x00080000
621
622 BOOL16  WINAPI ChooseColor16(LPCHOOSECOLOR16 lpChCol);
623 BOOL  WINAPI ChooseColorA(LPCHOOSECOLORA lpChCol);
624 BOOL  WINAPI ChooseColorW(LPCHOOSECOLORW lpChCol);
625 #define ChooseColor WINELIB_NAME_AW(ChooseColor)
626 DWORD   WINAPI CommDlgExtendedError(void);
627 HWND16  WINAPI FindText16( SEGPTR find);
628 HWND  WINAPI FindTextA(LPFINDREPLACEA lpFind);
629 HWND  WINAPI FindTextW(LPFINDREPLACEW lpFind);
630 #define FindText WINELIB_NAME_AW(FindText)
631 INT16   WINAPI GetFileTitle16(LPCSTR lpFile, LPSTR lpTitle, UINT16 cbBuf);
632 INT16   WINAPI GetFileTitleA(LPCSTR lpFile, LPSTR lpTitle, UINT cbBuf);
633 INT16   WINAPI GetFileTitleW(LPCWSTR lpFile, LPWSTR lpTitle, UINT cbBuf);
634 #define GetFileTitle WINELIB_NAME_AW(GetFileTitle)
635 BOOL16  WINAPI GetOpenFileName16(SEGPTR ofn);
636 BOOL  WINAPI GetOpenFileNameA(LPOPENFILENAMEA ofn);
637 BOOL  WINAPI GetOpenFileNameW(LPOPENFILENAMEW ofn);
638 #define GetOpenFileName WINELIB_NAME_AW(GetOpenFileName)
639 BOOL16  WINAPI GetSaveFileName16(SEGPTR ofn);
640 BOOL  WINAPI GetSaveFileNameA(LPOPENFILENAMEA ofn);
641 BOOL  WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn);
642 #define GetSaveFileName WINELIB_NAME_AW(GetSaveFileName)
643 BOOL WINAPI PageSetupDlgA( LPPAGESETUPDLGA );
644 BOOL WINAPI PageSetupDlgW( LPPAGESETUPDLGW );
645 #define PageSetupDlg WINELIB_NAME_AW(PageSetupDlg)
646 BOOL16  WINAPI PrintDlg16( SEGPTR print);
647 BOOL  WINAPI PrintDlgA( LPPRINTDLGA printdlg);
648 BOOL  WINAPI PrintDlgW( LPPRINTDLGW printdlg);
649 #define PrintDlg WINELIB_NAME_AW(PrintDlg)
650 HWND16  WINAPI ReplaceText16( SEGPTR find);
651 HWND  WINAPI ReplaceTextA( LPFINDREPLACEA lpFind);
652 HWND  WINAPI ReplaceTextW( LPFINDREPLACEW lpFind);
653 #define ReplaceText WINELIB_NAME_AW(ReplaceText)
654 BOOL16  WINAPI ChooseFont16(LPCHOOSEFONT16);
655 BOOL  WINAPI ChooseFontA(LPCHOOSEFONTA);
656 BOOL  WINAPI ChooseFontW(LPCHOOSEFONTW);
657 #define ChooseFont WINELIB_NAME_AW(ChooseFont)
658 LRESULT WINAPI FileOpenDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam, LPARAM lParam);
659 LRESULT WINAPI FileSaveDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam, LPARAM lParam);
660 LRESULT WINAPI ColorDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam, LPARAM lParam);
661 LRESULT WINAPI FindTextDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam, LPARAM lParam);
662 LRESULT WINAPI FindTextDlgProcA(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
663 LRESULT WINAPI FindTextDlgProcW(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
664 #define FindTextDlgProc WINELIB_NAME_AW(FindTextDlgProc)
665 LRESULT WINAPI ReplaceTextDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam, LPARAM lParam);
666 LRESULT WINAPI ReplaceTextDlgProcA(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
667 LRESULT WINAPI ReplaceTextDlgProcW(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
668 #define ReplaceTextProc WINELIB_NAME_AW(ReplaceTextDlgProc)
669 LRESULT WINAPI PrintDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam, LPARAM lParam);
670 LRESULT WINAPI PrintSetupDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam, LPARAM lParam);
671 LRESULT WINAPI FormatCharDlgProc16(HWND16,UINT16,WPARAM16,LPARAM);
672 LRESULT WINAPI FormatCharDlgProcA(HWND,UINT,WPARAM,LPARAM);
673 LRESULT WINAPI FormatCharDlgProcW(HWND,UINT,WPARAM,LPARAM);
674 #define FormatCharDlgProc WINELIB_NAME_AW(FormatCharDlgProc)
675 #ifdef __cplusplus
676 }
677 #endif
678
679 #endif  /* __WINE_COMMDLG_H */