blob: 436a6c1477daa2435036a68502f46294cfbafcbc [file] [log] [blame]
Alexandre Julliard3a405ba1994-10-30 16:25:19 +00001/*
2 * COMMDLG - Common Wine Dialog ... :-)
3 */
4
Alexandre Julliard1e9ac791996-06-06 18:38:27 +00005#ifndef __WINE_COMMDLG_H
6#define __WINE_COMMDLG_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
Alexandre Julliard3a405ba1994-10-30 16:25:19 +000011
Jim Aston2e1cafa1999-03-14 16:35:05 +000012#include "windef.h" /* needed for CHOOSEFONT structure */
Jeremy Whited3e22d92000-02-10 19:03:02 +000013#include "wingdi.h"
Paul Quinnea1640f1999-03-10 18:03:53 +000014#include "winuser.h"
Klaas van Gendb24a67f1999-05-02 11:22:50 +000015#include "pshpack1.h"
Alexandre Julliard1285c2f1996-05-06 16:06:24 +000016
Alexandre Julliard3a405ba1994-10-30 16:25:19 +000017#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
Jim Aston10141fe1999-04-25 12:31:20 +000034#define OFN_NONETWORKBUTTON 0x00020000
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000035#define OFN_NOLONGNAMES 0x00040000
36#define OFN_EXPLORER 0x00080000
37#define OFN_NODEREFERENCELINKS 0x00100000
38#define OFN_LONGNAMES 0x00200000
39
40/* WINE internal flags */
Alexandre Julliard33072e11997-06-29 18:08:02 +000041#define OFN_UNICODE 0x40000000 /*to differ between 32W/A hook*/
Alexandre Julliarda3960291999-02-26 11:11:13 +000042#define OFN_WINE 0x80000000 /* comdlg32 */
Alexandre Julliard33072e11997-06-29 18:08:02 +000043
Alexandre Julliard3a405ba1994-10-30 16:25:19 +000044#define OFN_SHAREFALLTHROUGH 2
45#define OFN_SHARENOWARN 1
46#define OFN_SHAREWARN 0
47
Francois Boisvert87b81de1999-07-27 16:20:36 +000048#define SAVE_DIALOG 1
49#define OPEN_DIALOG 2
50
Francois Gougetae41e8c2000-06-11 20:07:58 +000051typedef UINT CALLBACK (*LPOFNHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
Paul Quinnaaa83061999-06-05 15:23:20 +000052
Alexandre Julliard3a405ba1994-10-30 16:25:19 +000053typedef struct {
54 DWORD lStructSize;
Alexandre Julliarda3960291999-02-26 11:11:13 +000055 HWND hwndOwner;
56 HINSTANCE hInstance;
Alexandre Julliard33072e11997-06-29 18:08:02 +000057 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;
Paul Quinnaaa83061999-06-05 15:23:20 +000072 LPOFNHOOKPROC lpfnHook;
Alexandre Julliard33072e11997-06-29 18:08:02 +000073 LPCSTR lpTemplateName;
Alexandre Julliarda3960291999-02-26 11:11:13 +000074} OPENFILENAMEA,*LPOPENFILENAMEA;
Alexandre Julliard33072e11997-06-29 18:08:02 +000075
76typedef struct {
77 DWORD lStructSize;
Alexandre Julliarda3960291999-02-26 11:11:13 +000078 HWND hwndOwner;
79 HINSTANCE hInstance;
Alexandre Julliard33072e11997-06-29 18:08:02 +000080 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;
Paul Quinnaaa83061999-06-05 15:23:20 +000095 LPOFNHOOKPROC lpfnHook;
Alexandre Julliard33072e11997-06-29 18:08:02 +000096 LPCWSTR lpTemplateName;
Alexandre Julliarda3960291999-02-26 11:11:13 +000097} OPENFILENAMEW,*LPOPENFILENAMEW;
Alexandre Julliard33072e11997-06-29 18:08:02 +000098
Alexandre Julliarda845b881998-06-01 10:44:35 +000099DECL_WINELIB_TYPE_AW(OPENFILENAME)
100DECL_WINELIB_TYPE_AW(LPOPENFILENAME)
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000101
Paul Quinn1beaae51998-12-15 15:38:36 +0000102typedef struct
103{
104 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000105 LPOPENFILENAMEA lpOFN;
Paul Quinn1beaae51998-12-15 15:38:36 +0000106 LPSTR pszFile;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000107} OFNOTIFYA, *LPOFNOTIFYA;
Paul Quinn1beaae51998-12-15 15:38:36 +0000108
109typedef struct
110{
111 NMHDR hdr;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000112 LPOPENFILENAMEW lpOFN;
Paul Quinn1beaae51998-12-15 15:38:36 +0000113 LPWSTR pszFile;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000114} OFNOTIFYW, *LPOFNOTIFYW;
Paul Quinn1beaae51998-12-15 15:38:36 +0000115
116DECL_WINELIB_TYPE_AW(OFNOTIFY)
117DECL_WINELIB_TYPE_AW(LPOFNOTIFY)
118
Francois Gougetae41e8c2000-06-11 20:07:58 +0000119typedef UINT CALLBACK (*LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000120
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000121typedef struct {
122 DWORD lStructSize;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000123 HWND hwndOwner;
124 HWND hInstance;
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000125 DWORD rgbResult;
126 LPDWORD lpCustColors;
127 DWORD Flags;
128 DWORD lCustData;
129 LPCCHOOKPROC lpfnHook;
130 LPCSTR lpTemplateName;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000131} CHOOSECOLORA;
132typedef CHOOSECOLORA *LPCHOOSECOLORA;
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000133
134typedef struct {
135 DWORD lStructSize;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000136 HWND hwndOwner;
137 HWND hInstance;
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000138 DWORD rgbResult;
Gerard Patel73242952000-04-24 17:35:11 +0000139 LPDWORD lpCustColors;
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000140 DWORD Flags;
141 DWORD lCustData;
142 LPCCHOOKPROC lpfnHook;
143 LPCWSTR lpTemplateName;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000144} CHOOSECOLORW;
145typedef CHOOSECOLORW *LPCHOOSECOLORW;
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000146
Alexandre Julliarda845b881998-06-01 10:44:35 +0000147DECL_WINELIB_TYPE_AW(CHOOSECOLOR)
148DECL_WINELIB_TYPE_AW(LPCHOOSECOLOR)
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000149
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000150
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
Francois Gougetae41e8c2000-06-11 20:07:58 +0000159typedef UINT CALLBACK (*LPFRHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
Paul Quinnaaa83061999-06-05 15:23:20 +0000160
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000161typedef struct {
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000162 DWORD lStructSize;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000163 HWND hwndOwner;
164 HINSTANCE hInstance;
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000165 DWORD Flags;
166 LPSTR lpstrFindWhat;
167 LPSTR lpstrReplaceWith;
168 WORD wFindWhatLen;
169 WORD wReplaceWithLen;
170 LPARAM lCustData;
Paul Quinnaaa83061999-06-05 15:23:20 +0000171 LPFRHOOKPROC lpfnHook;
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000172 LPCSTR lpTemplateName;
Huw D M Daviesb40a9b72000-05-26 22:26:06 +0000173} FINDREPLACEA, *LPFINDREPLACEA;
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000174
175typedef struct {
176 DWORD lStructSize;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000177 HWND hwndOwner;
178 HINSTANCE hInstance;
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000179 DWORD Flags;
180 LPWSTR lpstrFindWhat;
181 LPWSTR lpstrReplaceWith;
182 WORD wFindWhatLen;
183 WORD wReplaceWithLen;
184 LPARAM lCustData;
Paul Quinnaaa83061999-06-05 15:23:20 +0000185 LPFRHOOKPROC lpfnHook;
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000186 LPCWSTR lpTemplateName;
Huw D M Daviesb40a9b72000-05-26 22:26:06 +0000187} FINDREPLACEW, *LPFINDREPLACEW;
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000188
Alexandre Julliarda845b881998-06-01 10:44:35 +0000189DECL_WINELIB_TYPE_AW(FINDREPLACE)
190DECL_WINELIB_TYPE_AW(LPFINDREPLACE)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000191
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000192#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
Francois Gougetae41e8c2000-06-11 20:07:58 +0000210typedef UINT CALLBACK (*LPCFHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
Paul Quinnaaa83061999-06-05 15:23:20 +0000211
Alexandre Julliard54c27111998-03-29 19:44:57 +0000212typedef struct
213{
Alexandre Julliarda3960291999-02-26 11:11:13 +0000214 UINT lStructSize;
215 HWND hwndOwner;
216 HDC hDC;
217 LPLOGFONTA lpLogFont;
218 INT iPointSize;
Pavel Roskin137cd8c1999-03-28 12:33:18 +0000219 DWORD Flags;
Alexandre Julliard54c27111998-03-29 19:44:57 +0000220 COLORREF rgbColors;
221 LPARAM lCustData;
Paul Quinnaaa83061999-06-05 15:23:20 +0000222 LPCFHOOKPROC lpfnHook;
Alexandre Julliard54c27111998-03-29 19:44:57 +0000223 LPCSTR lpTemplateName;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000224 HINSTANCE hInstance;
Alexandre Julliard54c27111998-03-29 19:44:57 +0000225 LPSTR lpszStyle;
226 UINT16 nFontType;
227 UINT16 ___MISSING_ALIGNMENT__;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000228 INT nSizeMin;
229 INT nSizeMax;
230} CHOOSEFONTA, *LPCHOOSEFONTA;
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000231
232typedef struct
233{
Alexandre Julliarda3960291999-02-26 11:11:13 +0000234 UINT lStructSize;
235 HWND hwndOwner;
236 HDC hDC;
237 LPLOGFONTW lpLogFont;
238 INT iPointSize;
Pavel Roskin137cd8c1999-03-28 12:33:18 +0000239 DWORD Flags;
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000240 COLORREF rgbColors;
241 LPARAM lCustData;
Paul Quinnaaa83061999-06-05 15:23:20 +0000242 LPCFHOOKPROC lpfnHook;
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000243 LPCWSTR lpTemplateName;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000244 HINSTANCE hInstance;
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000245 LPWSTR lpszStyle;
246 UINT16 nFontType;
247 UINT16 ___MISSING_ALIGNMENT__;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000248 INT nSizeMin;
249 INT nSizeMax;
250} CHOOSEFONTW, *LPCHOOSEFONTW;
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000251
Alexandre Julliarda845b881998-06-01 10:44:35 +0000252DECL_WINELIB_TYPE_AW(CHOOSEFONT)
253DECL_WINELIB_TYPE_AW(LPCHOOSEFONT)
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000254
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000255#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
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000267#define CF_SCRIPTSONLY CF_ANSIONLY
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000268#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
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000280#define CF_SELECTSCRIPT 0x00400000L
281#define CF_NOSCRIPTSEL 0x00800000L
282#define CF_NOVERTFONTS 0x01000000L
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000283
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)
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000292#define WM_CHOOSEFONT_SETLOGFONT (WM_USER + 101)
293#define WM_CHOOSEFONT_SETFLAGS (WM_USER + 102)
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000294
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
Paul Quinn1beaae51998-12-15 15:38:36 +0000308#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
Michael Cardenas6a52a502000-02-07 17:22:01 +0000330
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
Michael Cardenase5e2fc92000-06-02 20:25:56 +0000363#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
Michael Cardenas6a52a502000-02-07 17:22:01 +0000393
Francois Gougetae41e8c2000-06-11 20:07:58 +0000394typedef UINT CALLBACK (*LPPRINTHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
395typedef UINT CALLBACK (*LPSETUPHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
Paul Quinnaaa83061999-06-05 15:23:20 +0000396
Paul Quinn1beaae51998-12-15 15:38:36 +0000397typedef struct tagPDA
Alexandre Julliard17216f51997-10-12 16:30:17 +0000398{
399 DWORD lStructSize;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000400 HWND hwndOwner;
401 HGLOBAL hDevMode;
402 HGLOBAL hDevNames;
403 HDC hDC;
Alexandre Julliard17216f51997-10-12 16:30:17 +0000404 DWORD Flags;
405 WORD nFromPage;
406 WORD nToPage;
407 WORD nMinPage;
408 WORD nMaxPage;
409 WORD nCopies;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000410 HINSTANCE hInstance;
Alexandre Julliard17216f51997-10-12 16:30:17 +0000411 LPARAM lCustData;
412 LPPRINTHOOKPROC lpfnPrintHook;
413 LPSETUPHOOKPROC lpfnSetupHook;
414 LPCSTR lpPrintTemplateName;
415 LPCSTR lpSetupTemplateName;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000416 HGLOBAL hPrintTemplate;
417 HGLOBAL hSetupTemplate;
418} PRINTDLGA, *LPPRINTDLGA;
Alexandre Julliard17216f51997-10-12 16:30:17 +0000419
Paul Quinn1beaae51998-12-15 15:38:36 +0000420typedef struct tagPDW
Alexandre Julliard17216f51997-10-12 16:30:17 +0000421{
422 DWORD lStructSize;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000423 HWND hwndOwner;
424 HGLOBAL hDevMode;
425 HGLOBAL hDevNames;
426 HDC hDC;
Alexandre Julliard17216f51997-10-12 16:30:17 +0000427 DWORD Flags;
428 WORD nFromPage;
429 WORD nToPage;
430 WORD nMinPage;
431 WORD nMaxPage;
432 WORD nCopies;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000433 HINSTANCE hInstance;
Alexandre Julliard17216f51997-10-12 16:30:17 +0000434 LPARAM lCustData;
435 LPPRINTHOOKPROC lpfnPrintHook;
436 LPSETUPHOOKPROC lpfnSetupHook;
437 LPCWSTR lpPrintTemplateName;
438 LPCWSTR lpSetupTemplateName;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000439 HGLOBAL hPrintTemplate;
440 HGLOBAL hSetupTemplate;
441} PRINTDLGW, *LPPRINTDLGW;
Alexandre Julliard17216f51997-10-12 16:30:17 +0000442
Alexandre Julliarda845b881998-06-01 10:44:35 +0000443DECL_WINELIB_TYPE_AW(PRINTDLG)
444DECL_WINELIB_TYPE_AW(LPPRINTDLG)
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000445
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000446#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
Klaas van Gend3d5f2a81999-08-07 12:34:54 +0000466#define PD_USEDEVMODECOPIESANDCOLLATE 0x00040000
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000467#define PD_DISABLEPRINTTOFILE 0x00080000
468#define PD_HIDEPRINTTOFILE 0x00100000
Huw D M Daviesb40a9b72000-05-26 22:26:06 +0000469#define PD_NONETWORKBUTTON 0x00200000
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000470
471typedef struct {
Alexandre Julliard21979011997-03-05 08:22:35 +0000472 UINT16 wDriverOffset;
473 UINT16 wDeviceOffset;
474 UINT16 wOutputOffset;
475 UINT16 wDefault;
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000476 } DEVNAMES;
477typedef DEVNAMES * LPDEVNAMES;
478
479#define DN_DEFAULTPRN 0x0001
480
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000481/* 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
Francois Gougetae41e8c2000-06-11 20:07:58 +0000490typedef UINT CALLBACK (*LPPAGEPAINTHOOK)( HWND, UINT, WPARAM, LPARAM );
491typedef UINT CALLBACK (*LPPAGESETUPHOOK)( HWND, UINT, WPARAM, LPARAM );
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000492
Alexandre Julliarda3960291999-02-26 11:11:13 +0000493typedef struct tagPSDA
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000494{
495 DWORD lStructSize;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000496 HWND hwndOwner;
497 HGLOBAL hDevMode;
498 HGLOBAL hDevNames;
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000499 DWORD Flags;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000500 POINT ptPaperSize;
501 RECT rtMinMargin;
502 RECT rtMargin;
503 HINSTANCE hInstance;
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000504 LPARAM lCustData;
505 LPPAGESETUPHOOK lpfnPageSetupHook;
506 LPPAGEPAINTHOOK lpfnPagePaintHook;
507 LPCSTR lpPageSetupTemplateName;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000508 HGLOBAL hPageSetupTemplate;
509} PAGESETUPDLGA,*LPPAGESETUPDLGA;
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000510
Alexandre Julliarda3960291999-02-26 11:11:13 +0000511typedef struct tagPSDW
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000512{
513 DWORD lStructSize;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000514 HWND hwndOwner;
515 HGLOBAL hDevMode;
516 HGLOBAL hDevNames;
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000517 DWORD Flags;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000518 POINT ptPaperSize;
519 RECT rtMinMargin;
520 RECT rtMargin;
521 HINSTANCE hInstance;
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000522 LPARAM lCustData;
523 LPPAGESETUPHOOK lpfnPageSetupHook;
524 LPPAGEPAINTHOOK lpfnPagePaintHook;
525 LPCWSTR lpPageSetupTemplateName;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000526 HGLOBAL hPageSetupTemplate;
527} PAGESETUPDLGW,*LPPAGESETUPDLGW;
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000528DECL_WINELIB_TYPE_AW(PAGESETUPDLG)
529DECL_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
Huw D M Daviesb40a9b72000-05-26 22:26:06 +0000551
Alexandre Julliarda3960291999-02-26 11:11:13 +0000552BOOL WINAPI ChooseColorA(LPCHOOSECOLORA lpChCol);
553BOOL WINAPI ChooseColorW(LPCHOOSECOLORW lpChCol);
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000554#define ChooseColor WINELIB_NAME_AW(ChooseColor)
Alexandre Julliard670cdc41997-08-24 16:00:30 +0000555DWORD WINAPI CommDlgExtendedError(void);
Alexandre Julliarda3960291999-02-26 11:11:13 +0000556HWND WINAPI FindTextA(LPFINDREPLACEA lpFind);
557HWND WINAPI FindTextW(LPFINDREPLACEW lpFind);
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000558#define FindText WINELIB_NAME_AW(FindText)
Huw D M Daviesb40a9b72000-05-26 22:26:06 +0000559short WINAPI GetFileTitleA(LPCSTR lpFile, LPSTR lpTitle, UINT cbBuf);
560short WINAPI GetFileTitleW(LPCWSTR lpFile, LPWSTR lpTitle, UINT cbBuf);
Alexandre Julliard33072e11997-06-29 18:08:02 +0000561#define GetFileTitle WINELIB_NAME_AW(GetFileTitle)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000562BOOL WINAPI GetOpenFileNameA(LPOPENFILENAMEA ofn);
563BOOL WINAPI GetOpenFileNameW(LPOPENFILENAMEW ofn);
Alexandre Julliard33072e11997-06-29 18:08:02 +0000564#define GetOpenFileName WINELIB_NAME_AW(GetOpenFileName)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000565BOOL WINAPI GetSaveFileNameA(LPOPENFILENAMEA ofn);
566BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn);
Alexandre Julliard33072e11997-06-29 18:08:02 +0000567#define GetSaveFileName WINELIB_NAME_AW(GetSaveFileName)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000568BOOL WINAPI PageSetupDlgA( LPPAGESETUPDLGA );
569BOOL WINAPI PageSetupDlgW( LPPAGESETUPDLGW );
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000570#define PageSetupDlg WINELIB_NAME_AW(PageSetupDlg)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000571BOOL WINAPI PrintDlgA( LPPRINTDLGA printdlg);
572BOOL WINAPI PrintDlgW( LPPRINTDLGW printdlg);
Uwe Bonnes9fdceb81998-11-08 13:12:49 +0000573#define PrintDlg WINELIB_NAME_AW(PrintDlg)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000574HWND WINAPI ReplaceTextA( LPFINDREPLACEA lpFind);
575HWND WINAPI ReplaceTextW( LPFINDREPLACEW lpFind);
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000576#define ReplaceText WINELIB_NAME_AW(ReplaceText)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000577BOOL WINAPI ChooseFontA(LPCHOOSEFONTA);
578BOOL WINAPI ChooseFontW(LPCHOOSEFONTW);
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000579#define ChooseFont WINELIB_NAME_AW(ChooseFont)
Klaas van Gend3c6253b1999-03-15 15:16:54 +0000580
Francois Boisvert87b81de1999-07-27 16:20:36 +0000581void COMDLG32_SetCommDlgExtendedError(DWORD err);
582
Klaas van Gend3c6253b1999-03-15 15:16:54 +0000583
Klaas van Gendb24a67f1999-05-02 11:22:50 +0000584#include "poppack.h"
585
Alexandre Julliard1e9ac791996-06-06 18:38:27 +0000586#ifdef __cplusplus
587}
588#endif
Alexandre Julliard3a405ba1994-10-30 16:25:19 +0000589
Alexandre Julliard1e9ac791996-06-06 18:38:27 +0000590#endif /* __WINE_COMMDLG_H */