- Fixed resource functions to work directly from the HMODULE instead of
[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 "wingdi.h"
14 #include "winuser.h"
15 #include "pshpack1.h"
16
17 #define OFN_READONLY                 0x00000001
18 #define OFN_OVERWRITEPROMPT          0x00000002
19 #define OFN_HIDEREADONLY             0x00000004
20 #define OFN_NOCHANGEDIR              0x00000008
21 #define OFN_SHOWHELP                 0x00000010
22 #define OFN_ENABLEHOOK               0x00000020
23 #define OFN_ENABLETEMPLATE           0x00000040
24 #define OFN_ENABLETEMPLATEHANDLE     0x00000080
25 #define OFN_NOVALIDATE               0x00000100
26 #define OFN_ALLOWMULTISELECT         0x00000200
27 #define OFN_EXTENSIONDIFFERENT       0x00000400
28 #define OFN_PATHMUSTEXIST            0x00000800
29 #define OFN_FILEMUSTEXIST            0x00001000
30 #define OFN_CREATEPROMPT             0x00002000
31 #define OFN_SHAREAWARE               0x00004000
32 #define OFN_NOREADONLYRETURN         0x00008000
33 #define OFN_NOTESTFILECREATE         0x00010000
34 #define OFN_NONETWORKBUTTON          0x00020000 
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 #define SAVE_DIALOG  1
49 #define OPEN_DIALOG  2
50     
51 typedef UINT CALLBACK (*LPOFNHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
52
53 typedef struct {
54         DWORD           lStructSize;
55         HWND            hwndOwner;
56         HINSTANCE       hInstance;
57         LPCSTR          lpstrFilter;
58         LPSTR           lpstrCustomFilter;
59         DWORD           nMaxCustFilter;
60         DWORD           nFilterIndex;
61         LPSTR           lpstrFile;
62         DWORD           nMaxFile;
63         LPSTR           lpstrFileTitle;
64         DWORD           nMaxFileTitle;
65         LPCSTR          lpstrInitialDir;
66         LPCSTR          lpstrTitle;
67         DWORD           Flags;
68         WORD            nFileOffset;
69         WORD            nFileExtension;
70         LPCSTR          lpstrDefExt;
71         LPARAM          lCustData;
72         LPOFNHOOKPROC   lpfnHook;
73         LPCSTR          lpTemplateName;
74 } OPENFILENAMEA,*LPOPENFILENAMEA;
75
76 typedef struct {
77         DWORD           lStructSize;
78         HWND            hwndOwner;
79         HINSTANCE       hInstance;
80         LPCWSTR         lpstrFilter;
81         LPWSTR          lpstrCustomFilter;
82         DWORD           nMaxCustFilter;
83         DWORD           nFilterIndex;
84         LPWSTR          lpstrFile;
85         DWORD           nMaxFile;
86         LPWSTR          lpstrFileTitle;
87         DWORD           nMaxFileTitle;
88         LPCWSTR         lpstrInitialDir;
89         LPCWSTR         lpstrTitle;
90         DWORD           Flags;
91         WORD            nFileOffset;
92         WORD            nFileExtension;
93         LPCWSTR         lpstrDefExt;
94         LPARAM          lCustData;
95         LPOFNHOOKPROC   lpfnHook;
96         LPCWSTR         lpTemplateName;
97 } OPENFILENAMEW,*LPOPENFILENAMEW;
98
99 DECL_WINELIB_TYPE_AW(OPENFILENAME)
100 DECL_WINELIB_TYPE_AW(LPOPENFILENAME)
101
102 typedef struct
103 {
104         NMHDR           hdr;
105         LPOPENFILENAMEA lpOFN;
106         LPSTR           pszFile;
107 } OFNOTIFYA, *LPOFNOTIFYA;
108
109 typedef struct
110 {
111         NMHDR           hdr;
112         LPOPENFILENAMEW lpOFN;
113         LPWSTR          pszFile;
114 } OFNOTIFYW, *LPOFNOTIFYW;
115
116 DECL_WINELIB_TYPE_AW(OFNOTIFY)
117 DECL_WINELIB_TYPE_AW(LPOFNOTIFY)
118  
119 typedef UINT CALLBACK (*LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
120
121 typedef struct {
122         DWORD           lStructSize;
123         HWND            hwndOwner;
124         HWND            hInstance;
125         DWORD           rgbResult;
126         LPDWORD         lpCustColors;
127         DWORD           Flags;
128         DWORD           lCustData;
129         LPCCHOOKPROC    lpfnHook;
130         LPCSTR          lpTemplateName;
131 } CHOOSECOLORA;
132 typedef CHOOSECOLORA *LPCHOOSECOLORA;
133
134 typedef struct {
135         DWORD           lStructSize;
136         HWND            hwndOwner;
137         HWND            hInstance;
138         DWORD           rgbResult;
139         LPDWORD         lpCustColors;
140         DWORD           Flags;
141         DWORD           lCustData;
142         LPCCHOOKPROC    lpfnHook;
143         LPCWSTR         lpTemplateName;
144 } CHOOSECOLORW;
145 typedef CHOOSECOLORW *LPCHOOSECOLORW;
146
147 DECL_WINELIB_TYPE_AW(CHOOSECOLOR)
148 DECL_WINELIB_TYPE_AW(LPCHOOSECOLOR)
149
150
151 #define CC_RGBINIT               0x00000001
152 #define CC_FULLOPEN              0x00000002
153 #define CC_PREVENTFULLOPEN       0x00000004
154 #define CC_SHOWHELP              0x00000008
155 #define CC_ENABLEHOOK            0x00000010
156 #define CC_ENABLETEMPLATE        0x00000020
157 #define CC_ENABLETEMPLATEHANDLE  0x00000040
158
159 typedef UINT CALLBACK (*LPFRHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
160
161 typedef struct {
162         DWORD           lStructSize;
163         HWND            hwndOwner;
164         HINSTANCE       hInstance;
165         DWORD           Flags;
166         LPSTR           lpstrFindWhat;
167         LPSTR           lpstrReplaceWith;
168         WORD            wFindWhatLen;
169         WORD            wReplaceWithLen;
170         LPARAM          lCustData;
171         LPFRHOOKPROC    lpfnHook;
172         LPCSTR          lpTemplateName;
173 } FINDREPLACEA, *LPFINDREPLACEA;
174
175 typedef struct {
176         DWORD           lStructSize;
177         HWND            hwndOwner;
178         HINSTANCE       hInstance;
179         DWORD           Flags;
180         LPWSTR          lpstrFindWhat;
181         LPWSTR          lpstrReplaceWith;
182         WORD            wFindWhatLen;
183         WORD            wReplaceWithLen;
184         LPARAM          lCustData;
185         LPFRHOOKPROC    lpfnHook;
186         LPCWSTR         lpTemplateName;
187 } FINDREPLACEW, *LPFINDREPLACEW;
188         
189 DECL_WINELIB_TYPE_AW(FINDREPLACE)
190 DECL_WINELIB_TYPE_AW(LPFINDREPLACE)
191         
192 #define FR_DOWN                         0x00000001
193 #define FR_WHOLEWORD                    0x00000002
194 #define FR_MATCHCASE                    0x00000004
195 #define FR_FINDNEXT                     0x00000008
196 #define FR_REPLACE                      0x00000010
197 #define FR_REPLACEALL                   0x00000020
198 #define FR_DIALOGTERM                   0x00000040
199 #define FR_SHOWHELP                     0x00000080
200 #define FR_ENABLEHOOK                   0x00000100
201 #define FR_ENABLETEMPLATE               0x00000200
202 #define FR_NOUPDOWN                     0x00000400
203 #define FR_NOMATCHCASE                  0x00000800
204 #define FR_NOWHOLEWORD                  0x00001000
205 #define FR_ENABLETEMPLATEHANDLE         0x00002000
206 #define FR_HIDEUPDOWN                   0x00004000
207 #define FR_HIDEMATCHCASE                0x00008000
208 #define FR_HIDEWHOLEWORD                0x00010000
209
210 typedef UINT CALLBACK (*LPCFHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
211
212 typedef struct
213 {
214         UINT    lStructSize; 
215         HWND            hwndOwner; 
216         HDC             hDC; 
217         LPLOGFONTA    lpLogFont; 
218         INT             iPointSize; 
219         DWORD           Flags; 
220         COLORREF        rgbColors; 
221         LPARAM          lCustData; 
222         LPCFHOOKPROC    lpfnHook; 
223         LPCSTR          lpTemplateName; 
224         HINSTANCE       hInstance; 
225         LPSTR           lpszStyle; 
226         UINT16          nFontType; 
227         UINT16  ___MISSING_ALIGNMENT__; 
228         INT     nSizeMin; 
229         INT             nSizeMax; 
230 } CHOOSEFONTA, *LPCHOOSEFONTA;
231
232 typedef struct
233 {
234         UINT    lStructSize; 
235         HWND            hwndOwner; 
236         HDC             hDC; 
237         LPLOGFONTW    lpLogFont; 
238         INT             iPointSize; 
239         DWORD           Flags; 
240         COLORREF        rgbColors; 
241         LPARAM          lCustData; 
242         LPCFHOOKPROC    lpfnHook; 
243         LPCWSTR         lpTemplateName; 
244         HINSTANCE       hInstance; 
245         LPWSTR          lpszStyle; 
246         UINT16          nFontType; 
247         UINT16  ___MISSING_ALIGNMENT__; 
248         INT     nSizeMin; 
249         INT             nSizeMax; 
250 } CHOOSEFONTW, *LPCHOOSEFONTW;
251
252 DECL_WINELIB_TYPE_AW(CHOOSEFONT)
253 DECL_WINELIB_TYPE_AW(LPCHOOSEFONT)
254
255 #define CF_SCREENFONTS               0x00000001
256 #define CF_PRINTERFONTS              0x00000002
257 #define CF_BOTH                      (CF_SCREENFONTS | CF_PRINTERFONTS)
258 #define CF_SHOWHELP                  0x00000004L
259 #define CF_ENABLEHOOK                0x00000008L
260 #define CF_ENABLETEMPLATE            0x00000010L
261 #define CF_ENABLETEMPLATEHANDLE      0x00000020L
262 #define CF_INITTOLOGFONTSTRUCT       0x00000040L
263 #define CF_USESTYLE                  0x00000080L
264 #define CF_EFFECTS                   0x00000100L
265 #define CF_APPLY                     0x00000200L
266 #define CF_ANSIONLY                  0x00000400L
267 #define CF_SCRIPTSONLY               CF_ANSIONLY
268 #define CF_NOVECTORFONTS             0x00000800L
269 #define CF_NOOEMFONTS                CF_NOVECTORFONTS
270 #define CF_NOSIMULATIONS             0x00001000L
271 #define CF_LIMITSIZE                 0x00002000L
272 #define CF_FIXEDPITCHONLY            0x00004000L
273 #define CF_WYSIWYG                   0x00008000L /* use with CF_SCREENFONTS & CF_PRINTERFONTS */
274 #define CF_FORCEFONTEXIST            0x00010000L
275 #define CF_SCALABLEONLY              0x00020000L
276 #define CF_TTONLY                    0x00040000L
277 #define CF_NOFACESEL                 0x00080000L
278 #define CF_NOSTYLESEL                0x00100000L
279 #define CF_NOSIZESEL                 0x00200000L
280 #define CF_SELECTSCRIPT              0x00400000L
281 #define CF_NOSCRIPTSEL               0x00800000L
282 #define CF_NOVERTFONTS               0x01000000L
283
284 #define SIMULATED_FONTTYPE      0x8000
285 #define PRINTER_FONTTYPE        0x4000
286 #define SCREEN_FONTTYPE         0x2000
287 #define BOLD_FONTTYPE           0x0100
288 #define ITALIC_FONTTYPE         0x0200
289 #define REGULAR_FONTTYPE        0x0400
290
291 #define WM_CHOOSEFONT_GETLOGFONT        (WM_USER + 1)
292 #define WM_CHOOSEFONT_SETLOGFONT        (WM_USER + 101)
293 #define WM_CHOOSEFONT_SETFLAGS          (WM_USER + 102)
294
295 #define LBSELCHSTRING  "commdlg_LBSelChangedNotify"
296 #define SHAREVISTRING  "commdlg_ShareViolation"
297 #define FILEOKSTRING   "commdlg_FileNameOK"
298 #define COLOROKSTRING  "commdlg_ColorOK"
299 #define SETRGBSTRING   "commdlg_SetRGBColor"
300 #define FINDMSGSTRING  "commdlg_FindReplace"
301 #define HELPMSGSTRING  "commdlg_help"
302
303 #define CD_LBSELNOITEMS -1
304 #define CD_LBSELCHANGE   0
305 #define CD_LBSELSUB      1
306 #define CD_LBSELADD      2
307
308 #define CDN_FIRST   (0U-601U)
309 #define CDN_LAST    (0U-699U)
310
311 #define CDN_INITDONE            (CDN_FIRST - 0x0000)
312 #define CDN_SELCHANGE           (CDN_FIRST - 0x0001)
313 #define CDN_FOLDERCHANGE        (CDN_FIRST - 0x0002)
314 #define CDN_SHAREVIOLATION      (CDN_FIRST - 0x0003)
315 #define CDN_HELP                (CDN_FIRST - 0x0004)
316 #define CDN_FILEOK              (CDN_FIRST - 0x0005)
317 #define CDN_TYPECHANGE          (CDN_FIRST - 0x0006)
318
319 #define CDM_FIRST               (WM_USER + 100)
320 #define CDM_LAST                (WM_USER + 200)
321
322 #define CDM_GETSPEC             (CDM_FIRST + 0x0000)
323 #define CDM_GETFILEPATH         (CDM_FIRST + 0x0001)
324 #define CDM_GETFOLDERPATH       (CDM_FIRST + 0x0002)
325 #define CDM_GETFOLDERLIST       (CDM_FIRST + 0x0003)
326 #define CDM_SETCONTROLTEXT      (CDM_FIRST + 0x0004)
327 #define CDM_HIDECONTROL         (CDM_FIRST + 0x0005)
328 #define CDM_SETDEFEXT           (CDM_FIRST + 0x0006)
329
330
331 /* Messages to query information from the open or save dialogs */
332
333 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
334         (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
335 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
336         (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
337 #define CommDlg_OpenSave_GetSpec  WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
338
339 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
340         (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
341 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
342         (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
343 #define CommDlg_OpenSave_GetFilePath  WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
344
345 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
346         (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
347 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
348         (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
349 #define CommDlg_OpenSave_GetFolderPath  WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
350
351 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
352         (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
353
354 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
355         (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
356
357 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
358         (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
359
360 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
361         (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
362
363 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
364         (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
365 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
366         (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
367 #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
368
369 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
370         (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
371 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
372         (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
373 #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
374
375 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
376         (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
377 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
378         (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
379 #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
380
381 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
382         (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
383
384 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
385         (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
386
387 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
388         (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
389
390 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
391         (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
392
393
394 typedef UINT CALLBACK (*LPPRINTHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
395 typedef UINT CALLBACK (*LPSETUPHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
396
397 typedef struct tagPDA
398 {
399     DWORD            lStructSize;
400     HWND           hwndOwner;
401     HGLOBAL        hDevMode;
402     HGLOBAL        hDevNames;
403     HDC            hDC;
404     DWORD            Flags;
405     WORD             nFromPage;
406     WORD             nToPage;
407     WORD             nMinPage;
408     WORD             nMaxPage;
409     WORD             nCopies;
410     HINSTANCE      hInstance;
411     LPARAM           lCustData;
412     LPPRINTHOOKPROC  lpfnPrintHook;
413     LPSETUPHOOKPROC  lpfnSetupHook;
414     LPCSTR           lpPrintTemplateName;
415     LPCSTR           lpSetupTemplateName;
416     HGLOBAL        hPrintTemplate;
417     HGLOBAL        hSetupTemplate;
418 } PRINTDLGA, *LPPRINTDLGA;
419
420 typedef struct tagPDW
421 {
422     DWORD            lStructSize;
423     HWND           hwndOwner;
424     HGLOBAL        hDevMode;
425     HGLOBAL        hDevNames;
426     HDC            hDC;
427     DWORD            Flags;
428     WORD             nFromPage;
429     WORD             nToPage;
430     WORD             nMinPage;
431     WORD             nMaxPage;
432     WORD             nCopies;
433     HINSTANCE      hInstance;
434     LPARAM           lCustData;
435     LPPRINTHOOKPROC  lpfnPrintHook;
436     LPSETUPHOOKPROC  lpfnSetupHook;
437     LPCWSTR          lpPrintTemplateName;
438     LPCWSTR          lpSetupTemplateName;
439     HGLOBAL        hPrintTemplate;
440     HGLOBAL        hSetupTemplate;
441 } PRINTDLGW, *LPPRINTDLGW;
442
443 DECL_WINELIB_TYPE_AW(PRINTDLG)
444 DECL_WINELIB_TYPE_AW(LPPRINTDLG)
445
446 #define PD_ALLPAGES                  0x00000000
447 #define PD_SELECTION                 0x00000001
448 #define PD_PAGENUMS                  0x00000002
449 #define PD_NOSELECTION               0x00000004
450 #define PD_NOPAGENUMS                0x00000008
451 #define PD_COLLATE                   0x00000010
452 #define PD_PRINTTOFILE               0x00000020
453 #define PD_PRINTSETUP                0x00000040
454 #define PD_NOWARNING                 0x00000080
455 #define PD_RETURNDC                  0x00000100
456 #define PD_RETURNIC                  0x00000200
457 #define PD_RETURNDEFAULT             0x00000400
458 #define PD_SHOWHELP                  0x00000800
459 #define PD_ENABLEPRINTHOOK           0x00001000
460 #define PD_ENABLESETUPHOOK           0x00002000
461 #define PD_ENABLEPRINTTEMPLATE       0x00004000
462 #define PD_ENABLESETUPTEMPLATE       0x00008000
463 #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
464 #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
465 #define PD_USEDEVMODECOPIES          0x00040000
466 #define PD_USEDEVMODECOPIESANDCOLLATE 0x00040000
467 #define PD_DISABLEPRINTTOFILE        0x00080000
468 #define PD_HIDEPRINTTOFILE           0x00100000
469 #define PD_NONETWORKBUTTON           0x00200000
470
471 typedef struct {
472         UINT16  wDriverOffset;
473         UINT16  wDeviceOffset;
474         UINT16  wOutputOffset;
475         UINT16  wDefault;
476         } DEVNAMES;
477 typedef DEVNAMES * LPDEVNAMES;
478
479 #define DN_DEFAULTPRN      0x0001
480
481 /* PageSetupDlg stuff ... */
482 #define WM_PSD_PAGESETUPDLG     (WM_USER  )
483 #define WM_PSD_FULLPAGERECT     (WM_USER+1)
484 #define WM_PSD_MINMARGINRECT    (WM_USER+2)
485 #define WM_PSD_MARGINRECT       (WM_USER+3)
486 #define WM_PSD_GREEKTEXTRECT    (WM_USER+4)
487 #define WM_PSD_ENVSTAMPRECT     (WM_USER+5)
488 #define WM_PSD_YAFULLPAGERECT   (WM_USER+6)
489
490 typedef UINT CALLBACK (*LPPAGEPAINTHOOK)( HWND, UINT, WPARAM, LPARAM );
491 typedef UINT CALLBACK (*LPPAGESETUPHOOK)( HWND, UINT, WPARAM, LPARAM );
492
493 typedef struct tagPSDA
494 {
495         DWORD           lStructSize;
496         HWND            hwndOwner;
497         HGLOBAL hDevMode;
498         HGLOBAL hDevNames;
499         DWORD           Flags;
500         POINT           ptPaperSize;
501         RECT            rtMinMargin;
502         RECT            rtMargin;
503         HINSTANCE       hInstance;
504         LPARAM          lCustData;
505         LPPAGESETUPHOOK lpfnPageSetupHook;
506         LPPAGEPAINTHOOK lpfnPagePaintHook;
507         LPCSTR          lpPageSetupTemplateName;
508         HGLOBAL hPageSetupTemplate;
509 } PAGESETUPDLGA,*LPPAGESETUPDLGA;
510
511 typedef struct tagPSDW
512 {
513         DWORD           lStructSize;
514         HWND            hwndOwner;
515         HGLOBAL hDevMode;
516         HGLOBAL hDevNames;
517         DWORD           Flags;
518         POINT           ptPaperSize;
519         RECT            rtMinMargin;
520         RECT            rtMargin;
521         HINSTANCE       hInstance;
522         LPARAM          lCustData;
523         LPPAGESETUPHOOK lpfnPageSetupHook;
524         LPPAGEPAINTHOOK lpfnPagePaintHook;
525         LPCWSTR         lpPageSetupTemplateName;
526         HGLOBAL hPageSetupTemplate;
527 } PAGESETUPDLGW,*LPPAGESETUPDLGW;
528 DECL_WINELIB_TYPE_AW(PAGESETUPDLG)
529 DECL_WINELIB_TYPE_AW(LPPAGESETUPDLG)
530
531 #define PSD_DEFAULTMINMARGINS             0x00000000
532 #define PSD_INWININIINTLMEASURE           0x00000000
533
534 #define PSD_MINMARGINS                    0x00000001
535 #define PSD_MARGINS                       0x00000002
536 #define PSD_INTHOUSANDTHSOFINCHES         0x00000004
537 #define PSD_INHUNDREDTHSOFMILLIMETERS     0x00000008
538 #define PSD_DISABLEMARGINS                0x00000010
539 #define PSD_DISABLEPRINTER                0x00000020
540 #define PSD_NOWARNING                     0x00000080
541 #define PSD_DISABLEORIENTATION            0x00000100
542 #define PSD_RETURNDEFAULT                 0x00000400
543 #define PSD_DISABLEPAPER                  0x00000200
544 #define PSD_SHOWHELP                      0x00000800
545 #define PSD_ENABLEPAGESETUPHOOK           0x00002000
546 #define PSD_ENABLEPAGESETUPTEMPLATE       0x00008000
547 #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x00020000
548 #define PSD_ENABLEPAGEPAINTHOOK           0x00040000
549 #define PSD_DISABLEPAGEPAINTING           0x00080000
550
551
552 BOOL  WINAPI ChooseColorA(LPCHOOSECOLORA lpChCol);
553 BOOL  WINAPI ChooseColorW(LPCHOOSECOLORW lpChCol);
554 #define ChooseColor WINELIB_NAME_AW(ChooseColor)
555 DWORD   WINAPI CommDlgExtendedError(void);
556 HWND  WINAPI FindTextA(LPFINDREPLACEA lpFind);
557 HWND  WINAPI FindTextW(LPFINDREPLACEW lpFind);
558 #define FindText WINELIB_NAME_AW(FindText)
559 short   WINAPI GetFileTitleA(LPCSTR lpFile, LPSTR lpTitle, UINT cbBuf);
560 short   WINAPI GetFileTitleW(LPCWSTR lpFile, LPWSTR lpTitle, UINT cbBuf);
561 #define GetFileTitle WINELIB_NAME_AW(GetFileTitle)
562 BOOL  WINAPI GetOpenFileNameA(LPOPENFILENAMEA ofn);
563 BOOL  WINAPI GetOpenFileNameW(LPOPENFILENAMEW ofn);
564 #define GetOpenFileName WINELIB_NAME_AW(GetOpenFileName)
565 BOOL  WINAPI GetSaveFileNameA(LPOPENFILENAMEA ofn);
566 BOOL  WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn);
567 #define GetSaveFileName WINELIB_NAME_AW(GetSaveFileName)
568 BOOL WINAPI PageSetupDlgA( LPPAGESETUPDLGA );
569 BOOL WINAPI PageSetupDlgW( LPPAGESETUPDLGW );
570 #define PageSetupDlg WINELIB_NAME_AW(PageSetupDlg)
571 BOOL  WINAPI PrintDlgA( LPPRINTDLGA printdlg);
572 BOOL  WINAPI PrintDlgW( LPPRINTDLGW printdlg);
573 #define PrintDlg WINELIB_NAME_AW(PrintDlg)
574 HWND  WINAPI ReplaceTextA( LPFINDREPLACEA lpFind);
575 HWND  WINAPI ReplaceTextW( LPFINDREPLACEW lpFind);
576 #define ReplaceText WINELIB_NAME_AW(ReplaceText)
577 BOOL  WINAPI ChooseFontA(LPCHOOSEFONTA);
578 BOOL  WINAPI ChooseFontW(LPCHOOSEFONTW);
579 #define ChooseFont WINELIB_NAME_AW(ChooseFont)
580
581 void COMDLG32_SetCommDlgExtendedError(DWORD err); 
582
583
584 #include "poppack.h"
585
586 #ifdef __cplusplus
587 }
588 #endif
589
590 #endif  /* __WINE_COMMDLG_H */