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