Implemented processing for actions: SPI_GET/SETGRIDGRANULARITY,
[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 "prsht.h"
13 #include "pshpack1.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 #define OFN_NONETWORKBUTTON          0x00020000 
33 #define OFN_NOLONGNAMES              0x00040000
34 #define OFN_EXPLORER                 0x00080000
35 #define OFN_NODEREFERENCELINKS       0x00100000
36 #define OFN_LONGNAMES                0x00200000
37 #define OFN_ENABLEINCLUDENOTIFY      0x00400000
38 #define OFN_ENABLESIZING             0x00800000
39 #define OFN_DONTADDTORECENT          0x02000000
40 #define OFN_FORCESHOWHIDDEN          0x10000000
41
42 /* WINE internal flags */
43 #define OFN_UNICODE                  0x40000000 /*to differ between 32W/A hook*/
44 #define OFN_WINE                     0x80000000 /* comdlg32 */
45
46 #define OFN_SHAREFALLTHROUGH     2
47 #define OFN_SHARENOWARN          1
48 #define OFN_SHAREWARN            0
49
50 #define SAVE_DIALOG  1
51 #define OPEN_DIALOG  2
52     
53 typedef UINT CALLBACK (*LPOFNHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
54
55 typedef struct {
56         DWORD           lStructSize;
57         HWND            hwndOwner;
58         HINSTANCE       hInstance;
59         LPCSTR          lpstrFilter;
60         LPSTR           lpstrCustomFilter;
61         DWORD           nMaxCustFilter;
62         DWORD           nFilterIndex;
63         LPSTR           lpstrFile;
64         DWORD           nMaxFile;
65         LPSTR           lpstrFileTitle;
66         DWORD           nMaxFileTitle;
67         LPCSTR          lpstrInitialDir;
68         LPCSTR          lpstrTitle;
69         DWORD           Flags;
70         WORD            nFileOffset;
71         WORD            nFileExtension;
72         LPCSTR          lpstrDefExt;
73         LPARAM          lCustData;
74         LPOFNHOOKPROC   lpfnHook;
75         LPCSTR          lpTemplateName;
76 } OPENFILENAMEA,*LPOPENFILENAMEA;
77
78 typedef struct {
79         DWORD           lStructSize;
80         HWND            hwndOwner;
81         HINSTANCE       hInstance;
82         LPCWSTR         lpstrFilter;
83         LPWSTR          lpstrCustomFilter;
84         DWORD           nMaxCustFilter;
85         DWORD           nFilterIndex;
86         LPWSTR          lpstrFile;
87         DWORD           nMaxFile;
88         LPWSTR          lpstrFileTitle;
89         DWORD           nMaxFileTitle;
90         LPCWSTR         lpstrInitialDir;
91         LPCWSTR         lpstrTitle;
92         DWORD           Flags;
93         WORD            nFileOffset;
94         WORD            nFileExtension;
95         LPCWSTR         lpstrDefExt;
96         LPARAM          lCustData;
97         LPOFNHOOKPROC   lpfnHook;
98         LPCWSTR         lpTemplateName;
99 } OPENFILENAMEW,*LPOPENFILENAMEW;
100
101 DECL_WINELIB_TYPE_AW(OPENFILENAME)
102 DECL_WINELIB_TYPE_AW(LPOPENFILENAME)
103
104 typedef struct
105 {
106         NMHDR           hdr;
107         LPOPENFILENAMEA lpOFN;
108         LPSTR           pszFile;
109 } OFNOTIFYA, *LPOFNOTIFYA;
110
111 typedef struct
112 {
113         NMHDR           hdr;
114         LPOPENFILENAMEW lpOFN;
115         LPWSTR          pszFile;
116 } OFNOTIFYW, *LPOFNOTIFYW;
117
118 DECL_WINELIB_TYPE_AW(OFNOTIFY)
119 DECL_WINELIB_TYPE_AW(LPOFNOTIFY)
120  
121 typedef UINT CALLBACK (*LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
122
123 typedef struct {
124         DWORD           lStructSize;
125         HWND            hwndOwner;
126         HWND            hInstance; /* Should be an HINSTANCE but MS made a typo */
127         DWORD           rgbResult;
128         LPDWORD         lpCustColors;
129         DWORD           Flags;
130         DWORD           lCustData;
131         LPCCHOOKPROC    lpfnHook;
132         LPCSTR          lpTemplateName;
133 } CHOOSECOLORA;
134 typedef CHOOSECOLORA *LPCHOOSECOLORA;
135
136 typedef struct {
137         DWORD           lStructSize;
138         HWND            hwndOwner;
139         HWND            hInstance; /* Should be an HINSTANCE but MS made a typo */
140         DWORD           rgbResult;
141         LPDWORD         lpCustColors;
142         DWORD           Flags;
143         DWORD           lCustData;
144         LPCCHOOKPROC    lpfnHook;
145         LPCWSTR         lpTemplateName;
146 } CHOOSECOLORW;
147 typedef CHOOSECOLORW *LPCHOOSECOLORW;
148
149 DECL_WINELIB_TYPE_AW(CHOOSECOLOR)
150 DECL_WINELIB_TYPE_AW(LPCHOOSECOLOR)
151
152
153 #define CC_RGBINIT               0x00000001
154 #define CC_FULLOPEN              0x00000002
155 #define CC_PREVENTFULLOPEN       0x00000004
156 #define CC_SHOWHELP              0x00000008
157 #define CC_ENABLEHOOK            0x00000010
158 #define CC_ENABLETEMPLATE        0x00000020
159 #define CC_ENABLETEMPLATEHANDLE  0x00000040
160 #define CC_SOLIDCOLOR            0x00000080
161 #define CC_ANYCOLOR              0x00000100
162
163 typedef UINT CALLBACK (*LPFRHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
164
165 typedef struct {
166         DWORD           lStructSize;
167         HWND            hwndOwner;
168         HINSTANCE       hInstance;
169         DWORD           Flags;
170         LPSTR           lpstrFindWhat;
171         LPSTR           lpstrReplaceWith;
172         WORD            wFindWhatLen;
173         WORD            wReplaceWithLen;
174         LPARAM          lCustData;
175         LPFRHOOKPROC    lpfnHook;
176         LPCSTR          lpTemplateName;
177 } FINDREPLACEA, *LPFINDREPLACEA;
178
179 typedef struct {
180         DWORD           lStructSize;
181         HWND            hwndOwner;
182         HINSTANCE       hInstance;
183         DWORD           Flags;
184         LPWSTR          lpstrFindWhat;
185         LPWSTR          lpstrReplaceWith;
186         WORD            wFindWhatLen;
187         WORD            wReplaceWithLen;
188         LPARAM          lCustData;
189         LPFRHOOKPROC    lpfnHook;
190         LPCWSTR         lpTemplateName;
191 } FINDREPLACEW, *LPFINDREPLACEW;
192         
193 DECL_WINELIB_TYPE_AW(FINDREPLACE)
194 DECL_WINELIB_TYPE_AW(LPFINDREPLACE)
195         
196 #define FR_DOWN                         0x00000001
197 #define FR_WHOLEWORD                    0x00000002
198 #define FR_MATCHCASE                    0x00000004
199 #define FR_FINDNEXT                     0x00000008
200 #define FR_REPLACE                      0x00000010
201 #define FR_REPLACEALL                   0x00000020
202 #define FR_DIALOGTERM                   0x00000040
203 #define FR_SHOWHELP                     0x00000080
204 #define FR_ENABLEHOOK                   0x00000100
205 #define FR_ENABLETEMPLATE               0x00000200
206 #define FR_NOUPDOWN                     0x00000400
207 #define FR_NOMATCHCASE                  0x00000800
208 #define FR_NOWHOLEWORD                  0x00001000
209 #define FR_ENABLETEMPLATEHANDLE         0x00002000
210 #define FR_HIDEUPDOWN                   0x00004000
211 #define FR_HIDEMATCHCASE                0x00008000
212 #define FR_HIDEWHOLEWORD                0x00010000
213
214 typedef UINT CALLBACK (*LPCFHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
215
216 typedef struct
217 {
218         UINT    lStructSize; 
219         HWND            hwndOwner; 
220         HDC             hDC; 
221         LPLOGFONTA    lpLogFont; 
222         INT             iPointSize; 
223         DWORD           Flags; 
224         COLORREF        rgbColors; 
225         LPARAM          lCustData; 
226         LPCFHOOKPROC    lpfnHook; 
227         LPCSTR          lpTemplateName; 
228         HINSTANCE       hInstance; 
229         LPSTR           lpszStyle; 
230         WORD            nFontType; 
231         WORD    ___MISSING_ALIGNMENT__; 
232         INT     nSizeMin; 
233         INT             nSizeMax; 
234 } CHOOSEFONTA, *LPCHOOSEFONTA;
235
236 typedef struct
237 {
238         UINT    lStructSize; 
239         HWND            hwndOwner; 
240         HDC             hDC; 
241         LPLOGFONTW    lpLogFont; 
242         INT             iPointSize; 
243         DWORD           Flags; 
244         COLORREF        rgbColors; 
245         LPARAM          lCustData; 
246         LPCFHOOKPROC    lpfnHook; 
247         LPCWSTR         lpTemplateName; 
248         HINSTANCE       hInstance; 
249         LPWSTR          lpszStyle; 
250         WORD            nFontType; 
251         WORD    ___MISSING_ALIGNMENT__; 
252         INT     nSizeMin; 
253         INT             nSizeMax; 
254 } CHOOSEFONTW, *LPCHOOSEFONTW;
255
256 DECL_WINELIB_TYPE_AW(CHOOSEFONT)
257 DECL_WINELIB_TYPE_AW(LPCHOOSEFONT)
258
259 #define CF_SCREENFONTS               0x00000001
260 #define CF_PRINTERFONTS              0x00000002
261 #define CF_BOTH                      (CF_SCREENFONTS | CF_PRINTERFONTS)
262 #define CF_SHOWHELP                  0x00000004L
263 #define CF_ENABLEHOOK                0x00000008L
264 #define CF_ENABLETEMPLATE            0x00000010L
265 #define CF_ENABLETEMPLATEHANDLE      0x00000020L
266 #define CF_INITTOLOGFONTSTRUCT       0x00000040L
267 #define CF_USESTYLE                  0x00000080L
268 #define CF_EFFECTS                   0x00000100L
269 #define CF_APPLY                     0x00000200L
270 #define CF_ANSIONLY                  0x00000400L
271 #define CF_SCRIPTSONLY               CF_ANSIONLY
272 #define CF_NOVECTORFONTS             0x00000800L
273 #define CF_NOOEMFONTS                CF_NOVECTORFONTS
274 #define CF_NOSIMULATIONS             0x00001000L
275 #define CF_LIMITSIZE                 0x00002000L
276 #define CF_FIXEDPITCHONLY            0x00004000L
277 #define CF_WYSIWYG                   0x00008000L /* use with CF_SCREENFONTS & CF_PRINTERFONTS */
278 #define CF_FORCEFONTEXIST            0x00010000L
279 #define CF_SCALABLEONLY              0x00020000L
280 #define CF_TTONLY                    0x00040000L
281 #define CF_NOFACESEL                 0x00080000L
282 #define CF_NOSTYLESEL                0x00100000L
283 #define CF_NOSIZESEL                 0x00200000L
284 #define CF_SELECTSCRIPT              0x00400000L
285 #define CF_NOSCRIPTSEL               0x00800000L
286 #define CF_NOVERTFONTS               0x01000000L
287
288 #define SIMULATED_FONTTYPE      0x8000
289 #define PRINTER_FONTTYPE        0x4000
290 #define SCREEN_FONTTYPE         0x2000
291 #define BOLD_FONTTYPE           0x0100
292 #define ITALIC_FONTTYPE         0x0200
293 #define REGULAR_FONTTYPE        0x0400
294
295 #define WM_CHOOSEFONT_GETLOGFONT        (WM_USER + 1)
296 #define WM_CHOOSEFONT_SETLOGFONT        (WM_USER + 101)
297 #define WM_CHOOSEFONT_SETFLAGS          (WM_USER + 102)
298
299 #define LBSELCHSTRINGA  "commdlg_LBSelChangedNotify"
300 static const WCHAR LBSELCHSTRINGW[] = { 'c','o','m','m','d','l','g','_',
301   'L','B','S','e','l','C','h','a','n','g','e','d','N','o','t','i','f','y',0 };
302 #define LBSELCHSTRING   WINELIB_NAME_AW(LBSELCHSTRING)
303
304 #define SHAREVISTRINGA  "commdlg_ShareViolation"
305 static const WCHAR SHAREVISTRINGW[] = { 'c','o','m','m','d','l','g','_',
306   'S','h','a','r','e','V','i','o','l','a','t','i','o','n',0 };
307 #define SHAREVISTRING   WINELIB_NAME_AW(SHAREVISTRING)
308
309 #define FILEOKSTRINGA   "commdlg_FileNameOK"
310 static const WCHAR FILEOKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
311   'F','i','l','e','N','a','m','e','O','K',0 };
312 #define FILEOKSTRING    WINELIB_NAME_AW(FILEOKSTRING)
313
314 #define COLOROKSTRINGA  "commdlg_ColorOK"
315 static const WCHAR COLOROKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
316   'C','o','l','o','r','O','K',0 };
317 #define COLOROKSTRING   WINELIB_NAME_AW(COLOROKSTRING)
318
319 #define SETRGBSTRINGA   "commdlg_SetRGBColor"
320 static const WCHAR SETRGBSTRINGW[] = { 'c','o','m','m','d','l','g','_',
321   'S','e','t','R','G','B','C','o','l','o','r',0 };
322 #define SETRGBSTRING    WINELIB_NAME_AW(SETRGBSTRING)
323
324 #define FINDMSGSTRINGA  "commdlg_FindReplace"
325 static const WCHAR FINDMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
326   'F','i','n','d','R','e','p','l','a','c','e',0 };
327 #define FINDMSGSTRING   WINELIB_NAME_AW(FINDMSGSTRING)
328
329 #define HELPMSGSTRINGA  "commdlg_help"
330 static const WCHAR HELPMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
331   'H','e','l','p',0 };
332 #define HELPMSGSTRING   WINELIB_NAME_AW(HELPMSGSTRING)
333
334
335 #define CD_LBSELNOITEMS -1
336 #define CD_LBSELCHANGE   0
337 #define CD_LBSELSUB      1
338 #define CD_LBSELADD      2
339
340 #define CDN_FIRST   (0U-601U)
341 #define CDN_LAST    (0U-699U)
342
343 #define CDN_INITDONE            (CDN_FIRST - 0x0000)
344 #define CDN_SELCHANGE           (CDN_FIRST - 0x0001)
345 #define CDN_FOLDERCHANGE        (CDN_FIRST - 0x0002)
346 #define CDN_SHAREVIOLATION      (CDN_FIRST - 0x0003)
347 #define CDN_HELP                (CDN_FIRST - 0x0004)
348 #define CDN_FILEOK              (CDN_FIRST - 0x0005)
349 #define CDN_TYPECHANGE          (CDN_FIRST - 0x0006)
350
351 #define CDM_FIRST               (WM_USER + 100)
352 #define CDM_LAST                (WM_USER + 200)
353
354 #define CDM_GETSPEC             (CDM_FIRST + 0x0000)
355 #define CDM_GETFILEPATH         (CDM_FIRST + 0x0001)
356 #define CDM_GETFOLDERPATH       (CDM_FIRST + 0x0002)
357 #define CDM_GETFOLDERLIST       (CDM_FIRST + 0x0003)
358 #define CDM_SETCONTROLTEXT      (CDM_FIRST + 0x0004)
359 #define CDM_HIDECONTROL         (CDM_FIRST + 0x0005)
360 #define CDM_SETDEFEXT           (CDM_FIRST + 0x0006)
361
362
363 /* Messages to query information from the open or save dialogs */
364
365 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
366         (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
367 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
368         (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
369 #define CommDlg_OpenSave_GetSpec  WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
370
371 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
372         (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
373 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
374         (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
375 #define CommDlg_OpenSave_GetFilePath  WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
376
377 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
378         (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
379 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
380         (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
381 #define CommDlg_OpenSave_GetFolderPath  WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
382
383 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
384         (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
385
386 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
387         (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
388
389 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
390         (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
391
392 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
393         (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
394
395 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
396         (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
397 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
398         (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
399 #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
400
401 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
402         (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
403 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
404         (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
405 #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
406
407 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
408         (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
409 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
410         (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
411 #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
412
413 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
414         (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
415
416 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
417         (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
418
419 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
420         (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
421
422 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
423         (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
424
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_USEDEVMODECOPIESANDCOLLATE 0x00040000
499 #define PD_DISABLEPRINTTOFILE        0x00080000
500 #define PD_HIDEPRINTTOFILE           0x00100000
501 #define PD_NONETWORKBUTTON           0x00200000
502
503 typedef struct
504 {
505     WORD  wDriverOffset;
506     WORD  wDeviceOffset;
507     WORD  wOutputOffset;
508     WORD  wDefault;
509 } DEVNAMES;
510 typedef DEVNAMES * LPDEVNAMES;
511
512 #define DN_DEFAULTPRN      0x0001
513
514 /* PageSetupDlg stuff ... */
515 #define WM_PSD_PAGESETUPDLG     (WM_USER  )
516 #define WM_PSD_FULLPAGERECT     (WM_USER+1)
517 #define WM_PSD_MINMARGINRECT    (WM_USER+2)
518 #define WM_PSD_MARGINRECT       (WM_USER+3)
519 #define WM_PSD_GREEKTEXTRECT    (WM_USER+4)
520 #define WM_PSD_ENVSTAMPRECT     (WM_USER+5)
521 #define WM_PSD_YAFULLPAGERECT   (WM_USER+6)
522
523 typedef UINT CALLBACK (*LPPAGEPAINTHOOK)( HWND, UINT, WPARAM, LPARAM );
524 typedef UINT CALLBACK (*LPPAGESETUPHOOK)( HWND, UINT, WPARAM, LPARAM );
525
526 typedef struct tagPSDA
527 {
528         DWORD           lStructSize;
529         HWND            hwndOwner;
530         HGLOBAL hDevMode;
531         HGLOBAL hDevNames;
532         DWORD           Flags;
533         POINT           ptPaperSize;
534         RECT            rtMinMargin;
535         RECT            rtMargin;
536         HINSTANCE       hInstance;
537         LPARAM          lCustData;
538         LPPAGESETUPHOOK lpfnPageSetupHook;
539         LPPAGEPAINTHOOK lpfnPagePaintHook;
540         LPCSTR          lpPageSetupTemplateName;
541         HGLOBAL hPageSetupTemplate;
542 } PAGESETUPDLGA,*LPPAGESETUPDLGA;
543
544 typedef struct tagPSDW
545 {
546         DWORD           lStructSize;
547         HWND            hwndOwner;
548         HGLOBAL hDevMode;
549         HGLOBAL hDevNames;
550         DWORD           Flags;
551         POINT           ptPaperSize;
552         RECT            rtMinMargin;
553         RECT            rtMargin;
554         HINSTANCE       hInstance;
555         LPARAM          lCustData;
556         LPPAGESETUPHOOK lpfnPageSetupHook;
557         LPPAGEPAINTHOOK lpfnPagePaintHook;
558         LPCWSTR         lpPageSetupTemplateName;
559         HGLOBAL hPageSetupTemplate;
560 } PAGESETUPDLGW,*LPPAGESETUPDLGW;
561 DECL_WINELIB_TYPE_AW(PAGESETUPDLG)
562 DECL_WINELIB_TYPE_AW(LPPAGESETUPDLG)
563
564 #define PSD_DEFAULTMINMARGINS             0x00000000
565 #define PSD_INWININIINTLMEASURE           0x00000000
566
567 #define PSD_MINMARGINS                    0x00000001
568 #define PSD_MARGINS                       0x00000002
569 #define PSD_INTHOUSANDTHSOFINCHES         0x00000004
570 #define PSD_INHUNDREDTHSOFMILLIMETERS     0x00000008
571 #define PSD_DISABLEMARGINS                0x00000010
572 #define PSD_DISABLEPRINTER                0x00000020
573 #define PSD_NOWARNING                     0x00000080
574 #define PSD_DISABLEORIENTATION            0x00000100
575 #define PSD_RETURNDEFAULT                 0x00000400
576 #define PSD_DISABLEPAPER                  0x00000200
577 #define PSD_SHOWHELP                      0x00000800
578 #define PSD_ENABLEPAGESETUPHOOK           0x00002000
579 #define PSD_ENABLEPAGESETUPTEMPLATE       0x00008000
580 #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x00020000
581 #define PSD_ENABLEPAGEPAINTHOOK           0x00040000
582 #define PSD_DISABLEPAGEPAINTING           0x00080000
583
584
585 BOOL  WINAPI ChooseColorA(LPCHOOSECOLORA lpChCol);
586 BOOL  WINAPI ChooseColorW(LPCHOOSECOLORW lpChCol);
587 #define ChooseColor WINELIB_NAME_AW(ChooseColor)
588 DWORD   WINAPI CommDlgExtendedError(void);
589 HWND  WINAPI FindTextA(LPFINDREPLACEA lpFind);
590 HWND  WINAPI FindTextW(LPFINDREPLACEW lpFind);
591 #define FindText WINELIB_NAME_AW(FindText)
592 short   WINAPI GetFileTitleA(LPCSTR lpFile, LPSTR lpTitle, UINT cbBuf);
593 short   WINAPI GetFileTitleW(LPCWSTR lpFile, LPWSTR lpTitle, UINT cbBuf);
594 #define GetFileTitle WINELIB_NAME_AW(GetFileTitle)
595 BOOL  WINAPI GetOpenFileNameA(LPOPENFILENAMEA ofn);
596 BOOL  WINAPI GetOpenFileNameW(LPOPENFILENAMEW ofn);
597 #define GetOpenFileName WINELIB_NAME_AW(GetOpenFileName)
598 BOOL  WINAPI GetSaveFileNameA(LPOPENFILENAMEA ofn);
599 BOOL  WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn);
600 #define GetSaveFileName WINELIB_NAME_AW(GetSaveFileName)
601 BOOL WINAPI PageSetupDlgA( LPPAGESETUPDLGA );
602 BOOL WINAPI PageSetupDlgW( LPPAGESETUPDLGW );
603 #define PageSetupDlg WINELIB_NAME_AW(PageSetupDlg)
604 BOOL  WINAPI PrintDlgA( LPPRINTDLGA printdlg);
605 BOOL  WINAPI PrintDlgW( LPPRINTDLGW printdlg);
606 #define PrintDlg WINELIB_NAME_AW(PrintDlg)
607 HWND  WINAPI ReplaceTextA( LPFINDREPLACEA lpFind);
608 HWND  WINAPI ReplaceTextW( LPFINDREPLACEW lpFind);
609 #define ReplaceText WINELIB_NAME_AW(ReplaceText)
610 BOOL  WINAPI ChooseFontA(LPCHOOSEFONTA);
611 BOOL  WINAPI ChooseFontW(LPCHOOSEFONTW);
612 #define ChooseFont WINELIB_NAME_AW(ChooseFont)
613
614 void COMDLG32_SetCommDlgExtendedError(DWORD err); 
615
616
617 #include "poppack.h"
618
619 #ifdef __cplusplus
620 }
621 #endif
622
623 #endif  /* __WINE_COMMDLG_H */