dsound/tests: Add tests to check notifications after duplicate.
[wine.git] / include / commdlg.h
blob67b18a20fb8df20f9a60980811a886f02a1c6a4a
1 /*
2 * COMMDLG - Common Wine Dialog ... :-)
4 * Copyright (C) the Wine project
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_COMMDLG_H
22 #define __WINE_COMMDLG_H
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 #include <prsht.h>
29 #ifndef _WIN64
30 #include <pshpack1.h>
31 #endif
33 #ifndef SNDMSG
34 #ifdef __cplusplus
35 #define SNDMSG ::SendMessage
36 #else /* __cplusplus */
37 #define SNDMSG SendMessage
38 #endif /* __cplusplus */
39 #endif /* SNDMSG */
41 #define OFN_READONLY 0x00000001
42 #define OFN_OVERWRITEPROMPT 0x00000002
43 #define OFN_HIDEREADONLY 0x00000004
44 #define OFN_NOCHANGEDIR 0x00000008
45 #define OFN_SHOWHELP 0x00000010
46 #define OFN_ENABLEHOOK 0x00000020
47 #define OFN_ENABLETEMPLATE 0x00000040
48 #define OFN_ENABLETEMPLATEHANDLE 0x00000080
49 #define OFN_NOVALIDATE 0x00000100
50 #define OFN_ALLOWMULTISELECT 0x00000200
51 #define OFN_EXTENSIONDIFFERENT 0x00000400
52 #define OFN_PATHMUSTEXIST 0x00000800
53 #define OFN_FILEMUSTEXIST 0x00001000
54 #define OFN_CREATEPROMPT 0x00002000
55 #define OFN_SHAREAWARE 0x00004000
56 #define OFN_NOREADONLYRETURN 0x00008000
57 #define OFN_NOTESTFILECREATE 0x00010000
58 #define OFN_NONETWORKBUTTON 0x00020000
59 #define OFN_NOLONGNAMES 0x00040000
60 #define OFN_EXPLORER 0x00080000
61 #define OFN_NODEREFERENCELINKS 0x00100000
62 #define OFN_LONGNAMES 0x00200000
63 #define OFN_ENABLEINCLUDENOTIFY 0x00400000
64 #define OFN_ENABLESIZING 0x00800000
65 #define OFN_DONTADDTORECENT 0x02000000
66 #define OFN_FORCESHOWHIDDEN 0x10000000
68 #define OFN_SHAREFALLTHROUGH 2
69 #define OFN_SHARENOWARN 1
70 #define OFN_SHAREWARN 0
72 #define SAVE_DIALOG 1
73 #define OPEN_DIALOG 2
75 typedef UINT_PTR (CALLBACK *LPOFNHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
77 typedef struct tagOFNA {
78 DWORD lStructSize;
79 HWND hwndOwner;
80 HINSTANCE hInstance;
81 LPCSTR lpstrFilter;
82 LPSTR lpstrCustomFilter;
83 DWORD nMaxCustFilter;
84 DWORD nFilterIndex;
85 LPSTR lpstrFile;
86 DWORD nMaxFile;
87 LPSTR lpstrFileTitle;
88 DWORD nMaxFileTitle;
89 LPCSTR lpstrInitialDir;
90 LPCSTR lpstrTitle;
91 DWORD Flags;
92 WORD nFileOffset;
93 WORD nFileExtension;
94 LPCSTR lpstrDefExt;
95 LPARAM lCustData;
96 LPOFNHOOKPROC lpfnHook;
97 LPCSTR lpTemplateName;
98 } OPENFILENAMEA,*LPOPENFILENAMEA;
100 typedef struct tagOFNW {
101 DWORD lStructSize;
102 HWND hwndOwner;
103 HINSTANCE hInstance;
104 LPCWSTR lpstrFilter;
105 LPWSTR lpstrCustomFilter;
106 DWORD nMaxCustFilter;
107 DWORD nFilterIndex;
108 LPWSTR lpstrFile;
109 DWORD nMaxFile;
110 LPWSTR lpstrFileTitle;
111 DWORD nMaxFileTitle;
112 LPCWSTR lpstrInitialDir;
113 LPCWSTR lpstrTitle;
114 DWORD Flags;
115 WORD nFileOffset;
116 WORD nFileExtension;
117 LPCWSTR lpstrDefExt;
118 LPARAM lCustData;
119 LPOFNHOOKPROC lpfnHook;
120 LPCWSTR lpTemplateName;
121 } OPENFILENAMEW,*LPOPENFILENAMEW;
123 DECL_WINELIB_TYPE_AW(OPENFILENAME)
124 DECL_WINELIB_TYPE_AW(LPOPENFILENAME)
126 #ifndef CDSIZEOF_STRUCT
127 #define CDSIZEOF_STRUCT(type,field) ((int)&(((type *)0)->field) + sizeof(((type*)0)->field))
128 #endif
130 #define OPENFILENAME_SIZE_VERSION_400A CDSIZEOF_STRUCT(OPENFILENAMEA,lpTemplateName)
131 #define OPENFILENAME_SIZE_VERSION_400W CDSIZEOF_STRUCT(OPENFILENAMEW,lpTemplateName)
132 #define OPENFILENAME_SIZE_VERSION_400 WINELIB_NAME_AW(OPENFILENAME_SIZE_VERSION_400)
135 typedef struct
137 NMHDR hdr;
138 LPOPENFILENAMEA lpOFN;
139 LPSTR pszFile;
140 } OFNOTIFYA, *LPOFNOTIFYA;
142 typedef struct
144 NMHDR hdr;
145 LPOPENFILENAMEW lpOFN;
146 LPWSTR pszFile;
147 } OFNOTIFYW, *LPOFNOTIFYW;
149 DECL_WINELIB_TYPE_AW(OFNOTIFY)
150 DECL_WINELIB_TYPE_AW(LPOFNOTIFY)
152 typedef struct _OFNOTIFYEXA
154 NMHDR hdr;
155 LPOPENFILENAMEA lpOFN;
156 LPVOID psf;
157 LPVOID pidl;
158 } OFNOTIFYEXA, *LPOFNOTIFYEXA;
160 typedef struct _OFNOTIFYEXW
162 NMHDR hdr;
163 LPOPENFILENAMEW lpOFN;
164 LPVOID psf;
165 LPVOID pidl;
166 } OFNOTIFYEXW, *LPOFNOTIFYEXW;
168 DECL_WINELIB_TYPE_AW(OFNOTIFYEX)
169 DECL_WINELIB_TYPE_AW(LPOFNOTIFYEX)
171 typedef UINT_PTR (CALLBACK *LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
173 typedef struct {
174 DWORD lStructSize;
175 HWND hwndOwner;
176 HWND hInstance; /* Should be an HINSTANCE but MS made a typo */
177 DWORD rgbResult;
178 LPDWORD lpCustColors;
179 DWORD Flags;
180 DWORD lCustData;
181 LPCCHOOKPROC lpfnHook;
182 LPCSTR lpTemplateName;
183 } CHOOSECOLORA;
184 typedef CHOOSECOLORA *LPCHOOSECOLORA;
186 typedef struct {
187 DWORD lStructSize;
188 HWND hwndOwner;
189 HWND hInstance; /* Should be an HINSTANCE but MS made a typo */
190 DWORD rgbResult;
191 LPDWORD lpCustColors;
192 DWORD Flags;
193 DWORD lCustData;
194 LPCCHOOKPROC lpfnHook;
195 LPCWSTR lpTemplateName;
196 } CHOOSECOLORW;
197 typedef CHOOSECOLORW *LPCHOOSECOLORW;
199 DECL_WINELIB_TYPE_AW(CHOOSECOLOR)
200 DECL_WINELIB_TYPE_AW(LPCHOOSECOLOR)
203 #define CC_RGBINIT 0x00000001
204 #define CC_FULLOPEN 0x00000002
205 #define CC_PREVENTFULLOPEN 0x00000004
206 #define CC_SHOWHELP 0x00000008
207 #define CC_ENABLEHOOK 0x00000010
208 #define CC_ENABLETEMPLATE 0x00000020
209 #define CC_ENABLETEMPLATEHANDLE 0x00000040
210 #define CC_SOLIDCOLOR 0x00000080
211 #define CC_ANYCOLOR 0x00000100
213 typedef UINT_PTR (CALLBACK *LPFRHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
215 typedef struct {
216 DWORD lStructSize;
217 HWND hwndOwner;
218 HINSTANCE hInstance;
219 DWORD Flags;
220 LPSTR lpstrFindWhat;
221 LPSTR lpstrReplaceWith;
222 WORD wFindWhatLen;
223 WORD wReplaceWithLen;
224 LPARAM lCustData;
225 LPFRHOOKPROC lpfnHook;
226 LPCSTR lpTemplateName;
227 } FINDREPLACEA, *LPFINDREPLACEA;
229 typedef struct {
230 DWORD lStructSize;
231 HWND hwndOwner;
232 HINSTANCE hInstance;
233 DWORD Flags;
234 LPWSTR lpstrFindWhat;
235 LPWSTR lpstrReplaceWith;
236 WORD wFindWhatLen;
237 WORD wReplaceWithLen;
238 LPARAM lCustData;
239 LPFRHOOKPROC lpfnHook;
240 LPCWSTR lpTemplateName;
241 } FINDREPLACEW, *LPFINDREPLACEW;
243 DECL_WINELIB_TYPE_AW(FINDREPLACE)
244 DECL_WINELIB_TYPE_AW(LPFINDREPLACE)
246 #define FR_DOWN 0x00000001
247 #define FR_WHOLEWORD 0x00000002
248 #define FR_MATCHCASE 0x00000004
249 #define FR_FINDNEXT 0x00000008
250 #define FR_REPLACE 0x00000010
251 #define FR_REPLACEALL 0x00000020
252 #define FR_DIALOGTERM 0x00000040
253 #define FR_SHOWHELP 0x00000080
254 #define FR_ENABLEHOOK 0x00000100
255 #define FR_ENABLETEMPLATE 0x00000200
256 #define FR_NOUPDOWN 0x00000400
257 #define FR_NOMATCHCASE 0x00000800
258 #define FR_NOWHOLEWORD 0x00001000
259 #define FR_ENABLETEMPLATEHANDLE 0x00002000
260 #define FR_HIDEUPDOWN 0x00004000
261 #define FR_HIDEMATCHCASE 0x00008000
262 #define FR_HIDEWHOLEWORD 0x00010000
263 #define FR_MATCHDIAC 0x20000000
264 #define FR_MATCHKASHIDA 0x40000000
265 #define FR_MATCHALEFHAMZA 0x80000000
267 typedef UINT_PTR (CALLBACK *LPCFHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
269 typedef struct tagCHOOSEFONTA
271 UINT lStructSize;
272 HWND hwndOwner;
273 HDC hDC;
274 LPLOGFONTA lpLogFont;
275 INT iPointSize;
276 DWORD Flags;
277 COLORREF rgbColors;
278 LPARAM lCustData;
279 LPCFHOOKPROC lpfnHook;
280 LPCSTR lpTemplateName;
281 HINSTANCE hInstance;
282 LPSTR lpszStyle;
283 WORD nFontType;
284 WORD ___MISSING_ALIGNMENT__;
285 INT nSizeMin;
286 INT nSizeMax;
287 } CHOOSEFONTA, *LPCHOOSEFONTA;
289 typedef struct tagCHOOSEFONTW
291 UINT lStructSize;
292 HWND hwndOwner;
293 HDC hDC;
294 LPLOGFONTW lpLogFont;
295 INT iPointSize;
296 DWORD Flags;
297 COLORREF rgbColors;
298 LPARAM lCustData;
299 LPCFHOOKPROC lpfnHook;
300 LPCWSTR lpTemplateName;
301 HINSTANCE hInstance;
302 LPWSTR lpszStyle;
303 WORD nFontType;
304 WORD ___MISSING_ALIGNMENT__;
305 INT nSizeMin;
306 INT nSizeMax;
307 } CHOOSEFONTW, *LPCHOOSEFONTW;
309 DECL_WINELIB_TYPE_AW(CHOOSEFONT)
310 DECL_WINELIB_TYPE_AW(LPCHOOSEFONT)
312 #define CF_SCREENFONTS 0x00000001
313 #define CF_PRINTERFONTS 0x00000002
314 #define CF_BOTH (CF_SCREENFONTS | CF_PRINTERFONTS)
315 #define CF_SHOWHELP 0x00000004L
316 #define CF_ENABLEHOOK 0x00000008L
317 #define CF_ENABLETEMPLATE 0x00000010L
318 #define CF_ENABLETEMPLATEHANDLE 0x00000020L
319 #define CF_INITTOLOGFONTSTRUCT 0x00000040L
320 #define CF_USESTYLE 0x00000080L
321 #define CF_EFFECTS 0x00000100L
322 #define CF_APPLY 0x00000200L
323 #define CF_ANSIONLY 0x00000400L
324 #define CF_SCRIPTSONLY CF_ANSIONLY
325 #define CF_NOVECTORFONTS 0x00000800L
326 #define CF_NOOEMFONTS CF_NOVECTORFONTS
327 #define CF_NOSIMULATIONS 0x00001000L
328 #define CF_LIMITSIZE 0x00002000L
329 #define CF_FIXEDPITCHONLY 0x00004000L
330 #define CF_WYSIWYG 0x00008000L /* use with CF_SCREENFONTS & CF_PRINTERFONTS */
331 #define CF_FORCEFONTEXIST 0x00010000L
332 #define CF_SCALABLEONLY 0x00020000L
333 #define CF_TTONLY 0x00040000L
334 #define CF_NOFACESEL 0x00080000L
335 #define CF_NOSTYLESEL 0x00100000L
336 #define CF_NOSIZESEL 0x00200000L
337 #define CF_SELECTSCRIPT 0x00400000L
338 #define CF_NOSCRIPTSEL 0x00800000L
339 #define CF_NOVERTFONTS 0x01000000L
341 #define SIMULATED_FONTTYPE 0x8000
342 #define PRINTER_FONTTYPE 0x4000
343 #define SCREEN_FONTTYPE 0x2000
344 #define BOLD_FONTTYPE 0x0100
345 #define ITALIC_FONTTYPE 0x0200
346 #define REGULAR_FONTTYPE 0x0400
348 #define WM_CHOOSEFONT_GETLOGFONT (WM_USER + 1)
349 #define WM_CHOOSEFONT_SETLOGFONT (WM_USER + 101)
350 #define WM_CHOOSEFONT_SETFLAGS (WM_USER + 102)
352 #define LBSELCHSTRINGA "commdlg_LBSelChangedNotify"
353 #if defined(__GNUC__)
354 # define LBSELCHSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
355 'L','B','S','e','l','C','h','a','n','g','e','d','N','o','t','i','f','y',0 }
356 #elif defined(_MSC_VER)
357 # define LBSELCHSTRINGW L"commdlg_LBSelChangedNotify"
358 #else
359 static const WCHAR LBSELCHSTRINGW[] = { 'c','o','m','m','d','l','g','_',
360 'L','B','S','e','l','C','h','a','n','g','e','d','N','o','t','i','f','y',0 };
361 #endif
362 #define LBSELCHSTRING WINELIB_NAME_AW(LBSELCHSTRING)
364 #define SHAREVISTRINGA "commdlg_ShareViolation"
365 #if defined(__GNUC__)
366 # define SHAREVISTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
367 'S','h','a','r','e','V','i','o','l','a','t','i','o','n',0 }
368 #elif defined(_MSC_VER)
369 # define SHAREVISTRINGW L"commdlg_ShareViolation"
370 #else
371 static const WCHAR SHAREVISTRINGW[] = { 'c','o','m','m','d','l','g','_',
372 'S','h','a','r','e','V','i','o','l','a','t','i','o','n',0 };
373 #endif
374 #define SHAREVISTRING WINELIB_NAME_AW(SHAREVISTRING)
376 #define FILEOKSTRINGA "commdlg_FileNameOK"
377 #if defined(__GNUC__)
378 # define FILEOKSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
379 'F','i','l','e','N','a','m','e','O','K',0 }
380 #elif defined(_MSC_VER)
381 # define FILEOKSTRINGW L"commdlg_FileNameOK"
382 #else
383 static const WCHAR FILEOKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
384 'F','i','l','e','N','a','m','e','O','K',0 };
385 #endif
386 #define FILEOKSTRING WINELIB_NAME_AW(FILEOKSTRING)
388 #define COLOROKSTRINGA "commdlg_ColorOK"
389 #if defined(__GNUC__)
390 # define COLOROKSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
391 'C','o','l','o','r','O','K',0 }
392 #elif defined(_MSC_VER)
393 # define COLOROKSTRINGW L"commdlg_ColorOK"
394 #else
395 static const WCHAR COLOROKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
396 'C','o','l','o','r','O','K',0 };
397 #endif
398 #define COLOROKSTRING WINELIB_NAME_AW(COLOROKSTRING)
400 #define SETRGBSTRINGA "commdlg_SetRGBColor"
401 #if defined(__GNUC__)
402 # define SETRGBSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
403 'S','e','t','R','G','B','C','o','l','o','r',0 }
404 #elif defined(_MSC_VER)
405 # define SETRGBSTRINGW L"commdlg_SetRGBColor"
406 #else
407 static const WCHAR SETRGBSTRINGW[] = { 'c','o','m','m','d','l','g','_',
408 'S','e','t','R','G','B','C','o','l','o','r',0 };
409 #endif
410 #define SETRGBSTRING WINELIB_NAME_AW(SETRGBSTRING)
412 #define FINDMSGSTRINGA "commdlg_FindReplace"
413 #if defined(__GNUC__)
414 # define FINDMSGSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
415 'F','i','n','d','R','e','p','l','a','c','e',0 }
416 #elif defined(_MSC_VER)
417 # define FINDMSGSTRINGW L"commdlg_FindReplace"
418 #else
419 static const WCHAR FINDMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
420 'F','i','n','d','R','e','p','l','a','c','e',0 };
421 #endif
422 #define FINDMSGSTRING WINELIB_NAME_AW(FINDMSGSTRING)
424 #define HELPMSGSTRINGA "commdlg_help"
425 #if defined(__GNUC__)
426 # define HELPMSGSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
427 'H','e','l','p',0 }
428 #elif defined(_MSC_VER)
429 # define HELPMSGSTRINGW L"commdlg_help"
430 #else
431 static const WCHAR HELPMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
432 'H','e','l','p',0 };
433 #endif
434 #define HELPMSGSTRING WINELIB_NAME_AW(HELPMSGSTRING)
436 #define CD_LBSELNOITEMS -1
437 #define CD_LBSELCHANGE 0
438 #define CD_LBSELSUB 1
439 #define CD_LBSELADD 2
441 #define CDN_FIRST (0U-601U)
442 #define CDN_LAST (0U-699U)
444 #define CDN_INITDONE (CDN_FIRST - 0x0000)
445 #define CDN_SELCHANGE (CDN_FIRST - 0x0001)
446 #define CDN_FOLDERCHANGE (CDN_FIRST - 0x0002)
447 #define CDN_SHAREVIOLATION (CDN_FIRST - 0x0003)
448 #define CDN_HELP (CDN_FIRST - 0x0004)
449 #define CDN_FILEOK (CDN_FIRST - 0x0005)
450 #define CDN_TYPECHANGE (CDN_FIRST - 0x0006)
451 #define CDN_INCLUDEITEM (CDN_FIRST - 0x0007)
453 #define CDM_FIRST (WM_USER + 100)
454 #define CDM_LAST (WM_USER + 200)
456 #define CDM_GETSPEC (CDM_FIRST + 0x0000)
457 #define CDM_GETFILEPATH (CDM_FIRST + 0x0001)
458 #define CDM_GETFOLDERPATH (CDM_FIRST + 0x0002)
459 #define CDM_GETFOLDERIDLIST (CDM_FIRST + 0x0003)
460 #define CDM_SETCONTROLTEXT (CDM_FIRST + 0x0004)
461 #define CDM_HIDECONTROL (CDM_FIRST + 0x0005)
462 #define CDM_SETDEFEXT (CDM_FIRST + 0x0006)
465 /* Messages to query information from the open or save dialogs */
467 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
468 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
469 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
470 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
471 #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
473 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
474 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
475 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
476 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
477 #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
479 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
480 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
481 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
482 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
483 #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
485 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
486 (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
488 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
489 (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
491 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
492 (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
494 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
495 (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
497 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
498 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
499 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
500 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
501 #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
503 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
504 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
505 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
506 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
507 #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
509 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
510 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
511 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
512 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
513 #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
515 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
516 (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
518 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
519 (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
521 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
522 (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
524 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
525 (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
528 typedef UINT (CALLBACK *LPPRINTHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
529 typedef UINT (CALLBACK *LPSETUPHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
531 typedef struct tagPDA
533 DWORD lStructSize;
534 HWND hwndOwner;
535 HGLOBAL hDevMode;
536 HGLOBAL hDevNames;
537 HDC hDC;
538 DWORD Flags;
539 WORD nFromPage;
540 WORD nToPage;
541 WORD nMinPage;
542 WORD nMaxPage;
543 WORD nCopies;
544 HINSTANCE hInstance;
545 LPARAM lCustData;
546 LPPRINTHOOKPROC lpfnPrintHook;
547 LPSETUPHOOKPROC lpfnSetupHook;
548 LPCSTR lpPrintTemplateName;
549 LPCSTR lpSetupTemplateName;
550 HGLOBAL hPrintTemplate;
551 HGLOBAL hSetupTemplate;
552 } PRINTDLGA, *LPPRINTDLGA;
554 typedef struct tagPDW
556 DWORD lStructSize;
557 HWND hwndOwner;
558 HGLOBAL hDevMode;
559 HGLOBAL hDevNames;
560 HDC hDC;
561 DWORD Flags;
562 WORD nFromPage;
563 WORD nToPage;
564 WORD nMinPage;
565 WORD nMaxPage;
566 WORD nCopies;
567 HINSTANCE hInstance;
568 LPARAM lCustData;
569 LPPRINTHOOKPROC lpfnPrintHook;
570 LPSETUPHOOKPROC lpfnSetupHook;
571 LPCWSTR lpPrintTemplateName;
572 LPCWSTR lpSetupTemplateName;
573 HGLOBAL hPrintTemplate;
574 HGLOBAL hSetupTemplate;
575 } PRINTDLGW, *LPPRINTDLGW;
577 DECL_WINELIB_TYPE_AW(PRINTDLG)
578 DECL_WINELIB_TYPE_AW(LPPRINTDLG)
580 #define PD_ALLPAGES 0x00000000
581 #define PD_SELECTION 0x00000001
582 #define PD_PAGENUMS 0x00000002
583 #define PD_NOSELECTION 0x00000004
584 #define PD_NOPAGENUMS 0x00000008
585 #define PD_COLLATE 0x00000010
586 #define PD_PRINTTOFILE 0x00000020
587 #define PD_PRINTSETUP 0x00000040
588 #define PD_NOWARNING 0x00000080
589 #define PD_RETURNDC 0x00000100
590 #define PD_RETURNIC 0x00000200
591 #define PD_RETURNDEFAULT 0x00000400
592 #define PD_SHOWHELP 0x00000800
593 #define PD_ENABLEPRINTHOOK 0x00001000
594 #define PD_ENABLESETUPHOOK 0x00002000
595 #define PD_ENABLEPRINTTEMPLATE 0x00004000
596 #define PD_ENABLESETUPTEMPLATE 0x00008000
597 #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
598 #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
599 #define PD_USEDEVMODECOPIES 0x00040000
600 #define PD_USEDEVMODECOPIESANDCOLLATE 0x00040000
601 #define PD_DISABLEPRINTTOFILE 0x00080000
602 #define PD_HIDEPRINTTOFILE 0x00100000
603 #define PD_NONETWORKBUTTON 0x00200000
604 #define PD_CURRENTPAGE 0x00400000
605 #define PD_NOCURRENTPAGE 0x00800000
606 #define PD_EXCLUSIONFLAGS 0x01000000
607 #define PD_USELARGETEMPLATE 0x10000000
610 #define PD_EXCL_COPIESANDCOLLATE (DM_COPIES | DM_COLLATE)
612 #define START_PAGE_GENERAL 0xffffffff
614 #define PD_RESULT_CANCEL 0
615 #define PD_RESULT_PRINT 1
616 #define PD_RESULT_APPLY 2
618 typedef struct
620 WORD wDriverOffset;
621 WORD wDeviceOffset;
622 WORD wOutputOffset;
623 WORD wDefault;
624 } DEVNAMES;
625 typedef DEVNAMES * LPDEVNAMES;
627 #define DN_DEFAULTPRN 0x0001
629 /* PageSetupDlg stuff ... */
630 #define WM_PSD_PAGESETUPDLG (WM_USER )
631 #define WM_PSD_FULLPAGERECT (WM_USER+1)
632 #define WM_PSD_MINMARGINRECT (WM_USER+2)
633 #define WM_PSD_MARGINRECT (WM_USER+3)
634 #define WM_PSD_GREEKTEXTRECT (WM_USER+4)
635 #define WM_PSD_ENVSTAMPRECT (WM_USER+5)
636 #define WM_PSD_YAFULLPAGERECT (WM_USER+6)
638 typedef UINT (CALLBACK *LPPAGEPAINTHOOK)( HWND, UINT, WPARAM, LPARAM );
639 typedef UINT (CALLBACK *LPPAGESETUPHOOK)( HWND, UINT, WPARAM, LPARAM );
641 typedef struct tagPSDA
643 DWORD lStructSize;
644 HWND hwndOwner;
645 HGLOBAL hDevMode;
646 HGLOBAL hDevNames;
647 DWORD Flags;
648 POINT ptPaperSize;
649 RECT rtMinMargin;
650 RECT rtMargin;
651 HINSTANCE hInstance;
652 LPARAM lCustData;
653 LPPAGESETUPHOOK lpfnPageSetupHook;
654 LPPAGEPAINTHOOK lpfnPagePaintHook;
655 LPCSTR lpPageSetupTemplateName;
656 HGLOBAL hPageSetupTemplate;
657 } PAGESETUPDLGA,*LPPAGESETUPDLGA;
659 typedef struct tagPSDW
661 DWORD lStructSize;
662 HWND hwndOwner;
663 HGLOBAL hDevMode;
664 HGLOBAL hDevNames;
665 DWORD Flags;
666 POINT ptPaperSize;
667 RECT rtMinMargin;
668 RECT rtMargin;
669 HINSTANCE hInstance;
670 LPARAM lCustData;
671 LPPAGESETUPHOOK lpfnPageSetupHook;
672 LPPAGEPAINTHOOK lpfnPagePaintHook;
673 LPCWSTR lpPageSetupTemplateName;
674 HGLOBAL hPageSetupTemplate;
675 } PAGESETUPDLGW,*LPPAGESETUPDLGW;
676 DECL_WINELIB_TYPE_AW(PAGESETUPDLG)
677 DECL_WINELIB_TYPE_AW(LPPAGESETUPDLG)
679 #define PSD_DEFAULTMINMARGINS 0x00000000
680 #define PSD_INWININIINTLMEASURE 0x00000000
682 #define PSD_MINMARGINS 0x00000001
683 #define PSD_MARGINS 0x00000002
684 #define PSD_INTHOUSANDTHSOFINCHES 0x00000004
685 #define PSD_INHUNDREDTHSOFMILLIMETERS 0x00000008
686 #define PSD_DISABLEMARGINS 0x00000010
687 #define PSD_DISABLEPRINTER 0x00000020
688 #define PSD_NOWARNING 0x00000080
689 #define PSD_DISABLEORIENTATION 0x00000100
690 #define PSD_RETURNDEFAULT 0x00000400
691 #define PSD_DISABLEPAPER 0x00000200
692 #define PSD_SHOWHELP 0x00000800
693 #define PSD_ENABLEPAGESETUPHOOK 0x00002000
694 #define PSD_ENABLEPAGESETUPTEMPLATE 0x00008000
695 #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x00020000
696 #define PSD_ENABLEPAGEPAINTHOOK 0x00040000
697 #define PSD_DISABLEPAGEPAINTING 0x00080000
698 #define PSD_NONETWORKBUTTON 0x00200000
700 typedef struct tagPRINTPAGERANGE
702 DWORD nFromPage;
703 DWORD nToPage;
704 } PRINTPAGERANGE, *LPPRINTPAGERANGE;
706 typedef struct tagPDEXA
708 DWORD lStructSize;
709 HWND hwndOwner;
710 HGLOBAL hDevMode;
711 HGLOBAL hDevNames;
712 HDC hDC;
713 DWORD Flags;
714 DWORD Flags2;
715 DWORD ExclusionFlags;
716 DWORD nPageRanges;
717 DWORD nMaxPageRanges;
718 LPPRINTPAGERANGE lpPageRanges;
719 DWORD nMinPage;
720 DWORD nMaxPage;
721 DWORD nCopies;
722 HINSTANCE hInstance;
723 LPCSTR lpPrintTemplateName;
724 void* /*LPUNKNOWN*/ lpCallback;
725 DWORD nPropertyPages;
726 HPROPSHEETPAGE* lphPropertyPages;
727 DWORD nStartPage;
728 DWORD dwResultAction;
729 } PRINTDLGEXA, *LPPRINTDLGEXA;
731 typedef struct tagPDEXW
733 DWORD lStructSize;
734 HWND hwndOwner;
735 HGLOBAL hDevMode;
736 HGLOBAL hDevNames;
737 HDC hDC;
738 DWORD Flags;
739 DWORD Flags2;
740 DWORD ExclusionFlags;
741 DWORD nPageRanges;
742 DWORD nMaxPageRanges;
743 LPPRINTPAGERANGE lpPageRanges;
744 DWORD nMinPage;
745 DWORD nMaxPage;
746 DWORD nCopies;
747 HINSTANCE hInstance;
748 LPCWSTR lpPrintTemplateName;
749 void* /*LPUNKNOWN*/ lpCallback;
750 DWORD nPropertyPages;
751 HPROPSHEETPAGE* lphPropertyPages;
752 DWORD nStartPage;
753 DWORD dwResultAction;
754 } PRINTDLGEXW, *LPPRINTDLGEXW;
756 DECL_WINELIB_TYPE_AW(PRINTDLGEX)
757 DECL_WINELIB_TYPE_AW(LPPRINTDLGEX)
759 BOOL WINAPI ChooseColorA(LPCHOOSECOLORA lpChCol);
760 BOOL WINAPI ChooseColorW(LPCHOOSECOLORW lpChCol);
761 #define ChooseColor WINELIB_NAME_AW(ChooseColor)
762 DWORD WINAPI CommDlgExtendedError(void);
763 HWND WINAPI FindTextA(LPFINDREPLACEA lpFind);
764 HWND WINAPI FindTextW(LPFINDREPLACEW lpFind);
765 #define FindText WINELIB_NAME_AW(FindText)
766 short WINAPI GetFileTitleA(LPCSTR lpFile, LPSTR lpTitle, WORD cbBuf);
767 short WINAPI GetFileTitleW(LPCWSTR lpFile, LPWSTR lpTitle, WORD cbBuf);
768 #define GetFileTitle WINELIB_NAME_AW(GetFileTitle)
769 BOOL WINAPI GetOpenFileNameA(LPOPENFILENAMEA ofn);
770 BOOL WINAPI GetOpenFileNameW(LPOPENFILENAMEW ofn);
771 #define GetOpenFileName WINELIB_NAME_AW(GetOpenFileName)
772 BOOL WINAPI GetSaveFileNameA(LPOPENFILENAMEA ofn);
773 BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn);
774 #define GetSaveFileName WINELIB_NAME_AW(GetSaveFileName)
775 BOOL WINAPI PageSetupDlgA( LPPAGESETUPDLGA );
776 BOOL WINAPI PageSetupDlgW( LPPAGESETUPDLGW );
777 #define PageSetupDlg WINELIB_NAME_AW(PageSetupDlg)
778 BOOL WINAPI PrintDlgA( LPPRINTDLGA printdlg);
779 BOOL WINAPI PrintDlgW( LPPRINTDLGW printdlg);
780 #define PrintDlg WINELIB_NAME_AW(PrintDlg)
781 HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA);
782 HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW);
783 #define PrintDlgEx WINELIB_NAME_AW(PrintDlgEx)
784 HWND WINAPI ReplaceTextA( LPFINDREPLACEA lpFind);
785 HWND WINAPI ReplaceTextW( LPFINDREPLACEW lpFind);
786 #define ReplaceText WINELIB_NAME_AW(ReplaceText)
787 BOOL WINAPI ChooseFontA(LPCHOOSEFONTA);
788 BOOL WINAPI ChooseFontW(LPCHOOSEFONTW);
789 #define ChooseFont WINELIB_NAME_AW(ChooseFont)
791 void COMDLG32_SetCommDlgExtendedError(DWORD err);
794 #ifndef _WIN64
795 #include <poppack.h>
796 #endif
798 #ifdef __cplusplus
800 #endif
802 #endif /* __WINE_COMMDLG_H */