mountmgr: Avoid calling RtlInitUnicodeString on a static constant.
[wine.git] / include / commdlg.h
blobcd06a8c75a6d1654015435bfc94f02655f678a03
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 WINCOMMDLGAPI
34 #ifdef _COMDLG32_
35 # define WINCOMMDLGAPI
36 #else
37 # define WINCOMMDLGAPI DECLSPEC_IMPORT
38 #endif
39 #endif
41 #ifndef SNDMSG
42 #ifdef __cplusplus
43 #define SNDMSG ::SendMessage
44 #else /* __cplusplus */
45 #define SNDMSG SendMessage
46 #endif /* __cplusplus */
47 #endif /* SNDMSG */
49 #define OFN_READONLY 0x00000001
50 #define OFN_OVERWRITEPROMPT 0x00000002
51 #define OFN_HIDEREADONLY 0x00000004
52 #define OFN_NOCHANGEDIR 0x00000008
53 #define OFN_SHOWHELP 0x00000010
54 #define OFN_ENABLEHOOK 0x00000020
55 #define OFN_ENABLETEMPLATE 0x00000040
56 #define OFN_ENABLETEMPLATEHANDLE 0x00000080
57 #define OFN_NOVALIDATE 0x00000100
58 #define OFN_ALLOWMULTISELECT 0x00000200
59 #define OFN_EXTENSIONDIFFERENT 0x00000400
60 #define OFN_PATHMUSTEXIST 0x00000800
61 #define OFN_FILEMUSTEXIST 0x00001000
62 #define OFN_CREATEPROMPT 0x00002000
63 #define OFN_SHAREAWARE 0x00004000
64 #define OFN_NOREADONLYRETURN 0x00008000
65 #define OFN_NOTESTFILECREATE 0x00010000
66 #define OFN_NONETWORKBUTTON 0x00020000
67 #define OFN_NOLONGNAMES 0x00040000
68 #define OFN_EXPLORER 0x00080000
69 #define OFN_NODEREFERENCELINKS 0x00100000
70 #define OFN_LONGNAMES 0x00200000
71 #define OFN_ENABLEINCLUDENOTIFY 0x00400000
72 #define OFN_ENABLESIZING 0x00800000
73 #define OFN_DONTADDTORECENT 0x02000000
74 #define OFN_FORCESHOWHIDDEN 0x10000000
76 #define OFN_EX_NOPLACESBAR 0x00000001
78 #define OFN_SHAREFALLTHROUGH 2
79 #define OFN_SHARENOWARN 1
80 #define OFN_SHAREWARN 0
82 #define SAVE_DIALOG 1
83 #define OPEN_DIALOG 2
85 typedef UINT_PTR (CALLBACK *LPOFNHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
87 typedef struct tagOFNA {
88 DWORD lStructSize;
89 HWND hwndOwner;
90 HINSTANCE hInstance;
91 LPCSTR lpstrFilter;
92 LPSTR lpstrCustomFilter;
93 DWORD nMaxCustFilter;
94 DWORD nFilterIndex;
95 LPSTR lpstrFile;
96 DWORD nMaxFile;
97 LPSTR lpstrFileTitle;
98 DWORD nMaxFileTitle;
99 LPCSTR lpstrInitialDir;
100 LPCSTR lpstrTitle;
101 DWORD Flags;
102 WORD nFileOffset;
103 WORD nFileExtension;
104 LPCSTR lpstrDefExt;
105 LPARAM lCustData;
106 LPOFNHOOKPROC lpfnHook;
107 LPCSTR lpTemplateName;
108 void *pvReserved;
109 DWORD dwReserved;
110 DWORD FlagsEx;
111 } OPENFILENAMEA,*LPOPENFILENAMEA;
113 typedef struct tagOFNW {
114 DWORD lStructSize;
115 HWND hwndOwner;
116 HINSTANCE hInstance;
117 LPCWSTR lpstrFilter;
118 LPWSTR lpstrCustomFilter;
119 DWORD nMaxCustFilter;
120 DWORD nFilterIndex;
121 LPWSTR lpstrFile;
122 DWORD nMaxFile;
123 LPWSTR lpstrFileTitle;
124 DWORD nMaxFileTitle;
125 LPCWSTR lpstrInitialDir;
126 LPCWSTR lpstrTitle;
127 DWORD Flags;
128 WORD nFileOffset;
129 WORD nFileExtension;
130 LPCWSTR lpstrDefExt;
131 LPARAM lCustData;
132 LPOFNHOOKPROC lpfnHook;
133 LPCWSTR lpTemplateName;
134 void *pvReserved;
135 DWORD dwReserved;
136 DWORD FlagsEx;
137 } OPENFILENAMEW,*LPOPENFILENAMEW;
139 DECL_WINELIB_TYPE_AW(OPENFILENAME)
140 DECL_WINELIB_TYPE_AW(LPOPENFILENAME)
142 #ifndef CDSIZEOF_STRUCT
143 #define CDSIZEOF_STRUCT(type,field) ((INT_PTR)&(((type *)0)->field) + sizeof(((type*)0)->field))
144 #endif
146 #define OPENFILENAME_SIZE_VERSION_400A CDSIZEOF_STRUCT(OPENFILENAMEA,lpTemplateName)
147 #define OPENFILENAME_SIZE_VERSION_400W CDSIZEOF_STRUCT(OPENFILENAMEW,lpTemplateName)
148 #define OPENFILENAME_SIZE_VERSION_400 WINELIB_NAME_AW(OPENFILENAME_SIZE_VERSION_400)
151 typedef struct
153 NMHDR hdr;
154 LPOPENFILENAMEA lpOFN;
155 LPSTR pszFile;
156 } OFNOTIFYA, *LPOFNOTIFYA;
158 typedef struct
160 NMHDR hdr;
161 LPOPENFILENAMEW lpOFN;
162 LPWSTR pszFile;
163 } OFNOTIFYW, *LPOFNOTIFYW;
165 DECL_WINELIB_TYPE_AW(OFNOTIFY)
166 DECL_WINELIB_TYPE_AW(LPOFNOTIFY)
168 typedef struct _OFNOTIFYEXA
170 NMHDR hdr;
171 LPOPENFILENAMEA lpOFN;
172 LPVOID psf;
173 LPVOID pidl;
174 } OFNOTIFYEXA, *LPOFNOTIFYEXA;
176 typedef struct _OFNOTIFYEXW
178 NMHDR hdr;
179 LPOPENFILENAMEW lpOFN;
180 LPVOID psf;
181 LPVOID pidl;
182 } OFNOTIFYEXW, *LPOFNOTIFYEXW;
184 DECL_WINELIB_TYPE_AW(OFNOTIFYEX)
185 DECL_WINELIB_TYPE_AW(LPOFNOTIFYEX)
187 typedef UINT_PTR (CALLBACK *LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
189 typedef struct {
190 DWORD lStructSize;
191 HWND hwndOwner;
192 HWND hInstance; /* Should be an HINSTANCE but MS made a typo */
193 COLORREF rgbResult;
194 COLORREF *lpCustColors;
195 DWORD Flags;
196 LPARAM lCustData;
197 LPCCHOOKPROC lpfnHook;
198 LPCSTR lpTemplateName;
199 } CHOOSECOLORA;
200 typedef CHOOSECOLORA *LPCHOOSECOLORA;
202 typedef struct {
203 DWORD lStructSize;
204 HWND hwndOwner;
205 HWND hInstance; /* Should be an HINSTANCE but MS made a typo */
206 COLORREF rgbResult;
207 COLORREF *lpCustColors;
208 DWORD Flags;
209 LPARAM lCustData;
210 LPCCHOOKPROC lpfnHook;
211 LPCWSTR lpTemplateName;
212 } CHOOSECOLORW;
213 typedef CHOOSECOLORW *LPCHOOSECOLORW;
215 DECL_WINELIB_TYPE_AW(CHOOSECOLOR)
216 DECL_WINELIB_TYPE_AW(LPCHOOSECOLOR)
219 #define CC_RGBINIT 0x00000001
220 #define CC_FULLOPEN 0x00000002
221 #define CC_PREVENTFULLOPEN 0x00000004
222 #define CC_SHOWHELP 0x00000008
223 #define CC_ENABLEHOOK 0x00000010
224 #define CC_ENABLETEMPLATE 0x00000020
225 #define CC_ENABLETEMPLATEHANDLE 0x00000040
226 #define CC_SOLIDCOLOR 0x00000080
227 #define CC_ANYCOLOR 0x00000100
229 typedef UINT_PTR (CALLBACK *LPFRHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
231 typedef struct {
232 DWORD lStructSize;
233 HWND hwndOwner;
234 HINSTANCE hInstance;
235 DWORD Flags;
236 LPSTR lpstrFindWhat;
237 LPSTR lpstrReplaceWith;
238 WORD wFindWhatLen;
239 WORD wReplaceWithLen;
240 LPARAM lCustData;
241 LPFRHOOKPROC lpfnHook;
242 LPCSTR lpTemplateName;
243 } FINDREPLACEA, *LPFINDREPLACEA;
245 typedef struct {
246 DWORD lStructSize;
247 HWND hwndOwner;
248 HINSTANCE hInstance;
249 DWORD Flags;
250 LPWSTR lpstrFindWhat;
251 LPWSTR lpstrReplaceWith;
252 WORD wFindWhatLen;
253 WORD wReplaceWithLen;
254 LPARAM lCustData;
255 LPFRHOOKPROC lpfnHook;
256 LPCWSTR lpTemplateName;
257 } FINDREPLACEW, *LPFINDREPLACEW;
259 DECL_WINELIB_TYPE_AW(FINDREPLACE)
260 DECL_WINELIB_TYPE_AW(LPFINDREPLACE)
262 #define FR_DOWN 0x00000001
263 #define FR_WHOLEWORD 0x00000002
264 #define FR_MATCHCASE 0x00000004
265 #define FR_FINDNEXT 0x00000008
266 #define FR_REPLACE 0x00000010
267 #define FR_REPLACEALL 0x00000020
268 #define FR_DIALOGTERM 0x00000040
269 #define FR_SHOWHELP 0x00000080
270 #define FR_ENABLEHOOK 0x00000100
271 #define FR_ENABLETEMPLATE 0x00000200
272 #define FR_NOUPDOWN 0x00000400
273 #define FR_NOMATCHCASE 0x00000800
274 #define FR_NOWHOLEWORD 0x00001000
275 #define FR_ENABLETEMPLATEHANDLE 0x00002000
276 #define FR_HIDEUPDOWN 0x00004000
277 #define FR_HIDEMATCHCASE 0x00008000
278 #define FR_HIDEWHOLEWORD 0x00010000
279 #define FR_MATCHDIAC 0x20000000
280 #define FR_MATCHKASHIDA 0x40000000
281 #define FR_MATCHALEFHAMZA 0x80000000
283 typedef UINT_PTR (CALLBACK *LPCFHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
285 typedef struct tagCHOOSEFONTA
287 UINT lStructSize;
288 HWND hwndOwner;
289 HDC hDC;
290 LPLOGFONTA lpLogFont;
291 INT iPointSize;
292 DWORD Flags;
293 COLORREF rgbColors;
294 LPARAM lCustData;
295 LPCFHOOKPROC lpfnHook;
296 LPCSTR lpTemplateName;
297 HINSTANCE hInstance;
298 LPSTR lpszStyle;
299 WORD nFontType;
300 WORD ___MISSING_ALIGNMENT__;
301 INT nSizeMin;
302 INT nSizeMax;
303 } CHOOSEFONTA, *LPCHOOSEFONTA;
305 typedef struct tagCHOOSEFONTW
307 UINT lStructSize;
308 HWND hwndOwner;
309 HDC hDC;
310 LPLOGFONTW lpLogFont;
311 INT iPointSize;
312 DWORD Flags;
313 COLORREF rgbColors;
314 LPARAM lCustData;
315 LPCFHOOKPROC lpfnHook;
316 LPCWSTR lpTemplateName;
317 HINSTANCE hInstance;
318 LPWSTR lpszStyle;
319 WORD nFontType;
320 WORD ___MISSING_ALIGNMENT__;
321 INT nSizeMin;
322 INT nSizeMax;
323 } CHOOSEFONTW, *LPCHOOSEFONTW;
325 DECL_WINELIB_TYPE_AW(CHOOSEFONT)
326 DECL_WINELIB_TYPE_AW(LPCHOOSEFONT)
328 #define CF_SCREENFONTS 0x00000001
329 #define CF_PRINTERFONTS 0x00000002
330 #define CF_BOTH (CF_SCREENFONTS | CF_PRINTERFONTS)
331 #define CF_SHOWHELP __MSABI_LONG(0x00000004)
332 #define CF_ENABLEHOOK __MSABI_LONG(0x00000008)
333 #define CF_ENABLETEMPLATE __MSABI_LONG(0x00000010)
334 #define CF_ENABLETEMPLATEHANDLE __MSABI_LONG(0x00000020)
335 #define CF_INITTOLOGFONTSTRUCT __MSABI_LONG(0x00000040)
336 #define CF_USESTYLE __MSABI_LONG(0x00000080)
337 #define CF_EFFECTS __MSABI_LONG(0x00000100)
338 #define CF_APPLY __MSABI_LONG(0x00000200)
339 #define CF_ANSIONLY __MSABI_LONG(0x00000400)
340 #define CF_SCRIPTSONLY CF_ANSIONLY
341 #define CF_NOVECTORFONTS __MSABI_LONG(0x00000800)
342 #define CF_NOOEMFONTS CF_NOVECTORFONTS
343 #define CF_NOSIMULATIONS __MSABI_LONG(0x00001000)
344 #define CF_LIMITSIZE __MSABI_LONG(0x00002000)
345 #define CF_FIXEDPITCHONLY __MSABI_LONG(0x00004000)
346 #define CF_WYSIWYG __MSABI_LONG(0x00008000) /* use with CF_SCREENFONTS & CF_PRINTERFONTS */
347 #define CF_FORCEFONTEXIST __MSABI_LONG(0x00010000)
348 #define CF_SCALABLEONLY __MSABI_LONG(0x00020000)
349 #define CF_TTONLY __MSABI_LONG(0x00040000)
350 #define CF_NOFACESEL __MSABI_LONG(0x00080000)
351 #define CF_NOSTYLESEL __MSABI_LONG(0x00100000)
352 #define CF_NOSIZESEL __MSABI_LONG(0x00200000)
353 #define CF_SELECTSCRIPT __MSABI_LONG(0x00400000)
354 #define CF_NOSCRIPTSEL __MSABI_LONG(0x00800000)
355 #define CF_NOVERTFONTS __MSABI_LONG(0x01000000)
357 #define SIMULATED_FONTTYPE 0x8000
358 #define PRINTER_FONTTYPE 0x4000
359 #define SCREEN_FONTTYPE 0x2000
360 #define BOLD_FONTTYPE 0x0100
361 #define ITALIC_FONTTYPE 0x0200
362 #define REGULAR_FONTTYPE 0x0400
364 #define WM_CHOOSEFONT_GETLOGFONT (WM_USER + 1)
365 #define WM_CHOOSEFONT_SETLOGFONT (WM_USER + 101)
366 #define WM_CHOOSEFONT_SETFLAGS (WM_USER + 102)
368 #define LBSELCHSTRINGA "commdlg_LBSelChangedNotify"
369 #if defined(_MSC_VER) || defined(__MINGW32__)
370 # define LBSELCHSTRINGW L"commdlg_LBSelChangedNotify"
371 #else
372 static const WCHAR LBSELCHSTRINGW[] = { 'c','o','m','m','d','l','g','_',
373 'L','B','S','e','l','C','h','a','n','g','e','d','N','o','t','i','f','y',0 };
374 #endif
375 #define LBSELCHSTRING WINELIB_NAME_AW(LBSELCHSTRING)
377 #define SHAREVISTRINGA "commdlg_ShareViolation"
378 #if defined(_MSC_VER) || defined(__MINGW32__)
379 # define SHAREVISTRINGW L"commdlg_ShareViolation"
380 #else
381 static const WCHAR SHAREVISTRINGW[] = { 'c','o','m','m','d','l','g','_',
382 'S','h','a','r','e','V','i','o','l','a','t','i','o','n',0 };
383 #endif
384 #define SHAREVISTRING WINELIB_NAME_AW(SHAREVISTRING)
386 #define FILEOKSTRINGA "commdlg_FileNameOK"
387 #if defined(_MSC_VER) || defined(__MINGW32__)
388 # define FILEOKSTRINGW L"commdlg_FileNameOK"
389 #else
390 static const WCHAR FILEOKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
391 'F','i','l','e','N','a','m','e','O','K',0 };
392 #endif
393 #define FILEOKSTRING WINELIB_NAME_AW(FILEOKSTRING)
395 #define COLOROKSTRINGA "commdlg_ColorOK"
396 #if defined(_MSC_VER) || defined(__MINGW32__)
397 # define COLOROKSTRINGW L"commdlg_ColorOK"
398 #else
399 static const WCHAR COLOROKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
400 'C','o','l','o','r','O','K',0 };
401 #endif
402 #define COLOROKSTRING WINELIB_NAME_AW(COLOROKSTRING)
404 #define SETRGBSTRINGA "commdlg_SetRGBColor"
405 #if defined(_MSC_VER) || defined(__MINGW32__)
406 # define SETRGBSTRINGW L"commdlg_SetRGBColor"
407 #else
408 static const WCHAR SETRGBSTRINGW[] = { 'c','o','m','m','d','l','g','_',
409 'S','e','t','R','G','B','C','o','l','o','r',0 };
410 #endif
411 #define SETRGBSTRING WINELIB_NAME_AW(SETRGBSTRING)
413 #define FINDMSGSTRINGA "commdlg_FindReplace"
414 #if defined(_MSC_VER) || defined(__MINGW32__)
415 # define FINDMSGSTRINGW L"commdlg_FindReplace"
416 #else
417 static const WCHAR FINDMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
418 'F','i','n','d','R','e','p','l','a','c','e',0 };
419 #endif
420 #define FINDMSGSTRING WINELIB_NAME_AW(FINDMSGSTRING)
422 #define HELPMSGSTRINGA "commdlg_help"
423 #if defined(_MSC_VER) || defined(__MINGW32__)
424 # define HELPMSGSTRINGW L"commdlg_help"
425 #else
426 static const WCHAR HELPMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
427 'H','e','l','p',0 };
428 #endif
429 #define HELPMSGSTRING WINELIB_NAME_AW(HELPMSGSTRING)
431 #define CD_LBSELNOITEMS -1
432 #define CD_LBSELCHANGE 0
433 #define CD_LBSELSUB 1
434 #define CD_LBSELADD 2
436 #define CDN_FIRST (0U-601U)
437 #define CDN_LAST (0U-699U)
439 #define CDN_INITDONE (CDN_FIRST - 0x0000)
440 #define CDN_SELCHANGE (CDN_FIRST - 0x0001)
441 #define CDN_FOLDERCHANGE (CDN_FIRST - 0x0002)
442 #define CDN_SHAREVIOLATION (CDN_FIRST - 0x0003)
443 #define CDN_HELP (CDN_FIRST - 0x0004)
444 #define CDN_FILEOK (CDN_FIRST - 0x0005)
445 #define CDN_TYPECHANGE (CDN_FIRST - 0x0006)
446 #define CDN_INCLUDEITEM (CDN_FIRST - 0x0007)
448 #define CDM_FIRST (WM_USER + 100)
449 #define CDM_LAST (WM_USER + 200)
451 #define CDM_GETSPEC (CDM_FIRST + 0x0000)
452 #define CDM_GETFILEPATH (CDM_FIRST + 0x0001)
453 #define CDM_GETFOLDERPATH (CDM_FIRST + 0x0002)
454 #define CDM_GETFOLDERIDLIST (CDM_FIRST + 0x0003)
455 #define CDM_SETCONTROLTEXT (CDM_FIRST + 0x0004)
456 #define CDM_HIDECONTROL (CDM_FIRST + 0x0005)
457 #define CDM_SETDEFEXT (CDM_FIRST + 0x0006)
460 /* Messages to query information from the open or save dialogs */
462 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
463 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
464 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
465 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
466 #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
468 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
469 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
470 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
471 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
472 #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
474 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
475 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
476 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
477 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
478 #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
480 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
481 (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
483 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
484 (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
486 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
487 (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
489 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
490 (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
492 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
493 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
494 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
495 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
496 #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
498 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
499 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
500 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
501 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
502 #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
504 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
505 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
506 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
507 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
508 #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
510 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
511 (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
513 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
514 (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
516 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
517 (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
519 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
520 (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
523 typedef UINT_PTR (CALLBACK *LPPRINTHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
524 typedef UINT_PTR (CALLBACK *LPSETUPHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
526 typedef struct tagPDA
528 DWORD lStructSize;
529 HWND hwndOwner;
530 HGLOBAL hDevMode;
531 HGLOBAL hDevNames;
532 HDC hDC;
533 DWORD Flags;
534 WORD nFromPage;
535 WORD nToPage;
536 WORD nMinPage;
537 WORD nMaxPage;
538 WORD nCopies;
539 HINSTANCE hInstance;
540 LPARAM lCustData;
541 LPPRINTHOOKPROC lpfnPrintHook;
542 LPSETUPHOOKPROC lpfnSetupHook;
543 LPCSTR lpPrintTemplateName;
544 LPCSTR lpSetupTemplateName;
545 HGLOBAL hPrintTemplate;
546 HGLOBAL hSetupTemplate;
547 } PRINTDLGA, *LPPRINTDLGA;
549 typedef struct tagPDW
551 DWORD lStructSize;
552 HWND hwndOwner;
553 HGLOBAL hDevMode;
554 HGLOBAL hDevNames;
555 HDC hDC;
556 DWORD Flags;
557 WORD nFromPage;
558 WORD nToPage;
559 WORD nMinPage;
560 WORD nMaxPage;
561 WORD nCopies;
562 HINSTANCE hInstance;
563 LPARAM lCustData;
564 LPPRINTHOOKPROC lpfnPrintHook;
565 LPSETUPHOOKPROC lpfnSetupHook;
566 LPCWSTR lpPrintTemplateName;
567 LPCWSTR lpSetupTemplateName;
568 HGLOBAL hPrintTemplate;
569 HGLOBAL hSetupTemplate;
570 } PRINTDLGW, *LPPRINTDLGW;
572 DECL_WINELIB_TYPE_AW(PRINTDLG)
573 DECL_WINELIB_TYPE_AW(LPPRINTDLG)
575 #define PD_ALLPAGES 0x00000000
576 #define PD_SELECTION 0x00000001
577 #define PD_PAGENUMS 0x00000002
578 #define PD_NOSELECTION 0x00000004
579 #define PD_NOPAGENUMS 0x00000008
580 #define PD_COLLATE 0x00000010
581 #define PD_PRINTTOFILE 0x00000020
582 #define PD_PRINTSETUP 0x00000040
583 #define PD_NOWARNING 0x00000080
584 #define PD_RETURNDC 0x00000100
585 #define PD_RETURNIC 0x00000200
586 #define PD_RETURNDEFAULT 0x00000400
587 #define PD_SHOWHELP 0x00000800
588 #define PD_ENABLEPRINTHOOK 0x00001000
589 #define PD_ENABLESETUPHOOK 0x00002000
590 #define PD_ENABLEPRINTTEMPLATE 0x00004000
591 #define PD_ENABLESETUPTEMPLATE 0x00008000
592 #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
593 #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
594 #define PD_USEDEVMODECOPIES 0x00040000
595 #define PD_USEDEVMODECOPIESANDCOLLATE 0x00040000
596 #define PD_DISABLEPRINTTOFILE 0x00080000
597 #define PD_HIDEPRINTTOFILE 0x00100000
598 #define PD_NONETWORKBUTTON 0x00200000
599 #define PD_CURRENTPAGE 0x00400000
600 #define PD_NOCURRENTPAGE 0x00800000
601 #define PD_EXCLUSIONFLAGS 0x01000000
602 #define PD_USELARGETEMPLATE 0x10000000
605 #define PD_EXCL_COPIESANDCOLLATE (DM_COPIES | DM_COLLATE)
607 #define START_PAGE_GENERAL 0xffffffff
609 #define PD_RESULT_CANCEL 0
610 #define PD_RESULT_PRINT 1
611 #define PD_RESULT_APPLY 2
613 typedef struct
615 WORD wDriverOffset;
616 WORD wDeviceOffset;
617 WORD wOutputOffset;
618 WORD wDefault;
619 } DEVNAMES;
620 typedef DEVNAMES * LPDEVNAMES;
622 #define DN_DEFAULTPRN 0x0001
624 /* PageSetupDlg stuff ... */
625 #define WM_PSD_PAGESETUPDLG (WM_USER )
626 #define WM_PSD_FULLPAGERECT (WM_USER+1)
627 #define WM_PSD_MINMARGINRECT (WM_USER+2)
628 #define WM_PSD_MARGINRECT (WM_USER+3)
629 #define WM_PSD_GREEKTEXTRECT (WM_USER+4)
630 #define WM_PSD_ENVSTAMPRECT (WM_USER+5)
631 #define WM_PSD_YAFULLPAGERECT (WM_USER+6)
633 typedef UINT (CALLBACK *LPPAGEPAINTHOOK)( HWND, UINT, WPARAM, LPARAM );
634 typedef UINT (CALLBACK *LPPAGESETUPHOOK)( HWND, UINT, WPARAM, LPARAM );
636 typedef struct tagPSDA
638 DWORD lStructSize;
639 HWND hwndOwner;
640 HGLOBAL hDevMode;
641 HGLOBAL hDevNames;
642 DWORD Flags;
643 POINT ptPaperSize;
644 RECT rtMinMargin;
645 RECT rtMargin;
646 HINSTANCE hInstance;
647 LPARAM lCustData;
648 LPPAGESETUPHOOK lpfnPageSetupHook;
649 LPPAGEPAINTHOOK lpfnPagePaintHook;
650 LPCSTR lpPageSetupTemplateName;
651 HGLOBAL hPageSetupTemplate;
652 } PAGESETUPDLGA,*LPPAGESETUPDLGA;
654 typedef struct tagPSDW
656 DWORD lStructSize;
657 HWND hwndOwner;
658 HGLOBAL hDevMode;
659 HGLOBAL hDevNames;
660 DWORD Flags;
661 POINT ptPaperSize;
662 RECT rtMinMargin;
663 RECT rtMargin;
664 HINSTANCE hInstance;
665 LPARAM lCustData;
666 LPPAGESETUPHOOK lpfnPageSetupHook;
667 LPPAGEPAINTHOOK lpfnPagePaintHook;
668 LPCWSTR lpPageSetupTemplateName;
669 HGLOBAL hPageSetupTemplate;
670 } PAGESETUPDLGW,*LPPAGESETUPDLGW;
671 DECL_WINELIB_TYPE_AW(PAGESETUPDLG)
672 DECL_WINELIB_TYPE_AW(LPPAGESETUPDLG)
674 #define PSD_DEFAULTMINMARGINS 0x00000000
675 #define PSD_INWININIINTLMEASURE 0x00000000
677 #define PSD_MINMARGINS 0x00000001
678 #define PSD_MARGINS 0x00000002
679 #define PSD_INTHOUSANDTHSOFINCHES 0x00000004
680 #define PSD_INHUNDREDTHSOFMILLIMETERS 0x00000008
681 #define PSD_DISABLEMARGINS 0x00000010
682 #define PSD_DISABLEPRINTER 0x00000020
683 #define PSD_NOWARNING 0x00000080
684 #define PSD_DISABLEORIENTATION 0x00000100
685 #define PSD_RETURNDEFAULT 0x00000400
686 #define PSD_DISABLEPAPER 0x00000200
687 #define PSD_SHOWHELP 0x00000800
688 #define PSD_ENABLEPAGESETUPHOOK 0x00002000
689 #define PSD_ENABLEPAGESETUPTEMPLATE 0x00008000
690 #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x00020000
691 #define PSD_ENABLEPAGEPAINTHOOK 0x00040000
692 #define PSD_DISABLEPAGEPAINTING 0x00080000
693 #define PSD_NONETWORKBUTTON 0x00200000
695 typedef struct tagPRINTPAGERANGE
697 DWORD nFromPage;
698 DWORD nToPage;
699 } PRINTPAGERANGE, *LPPRINTPAGERANGE;
701 typedef struct tagPDEXA
703 DWORD lStructSize;
704 HWND hwndOwner;
705 HGLOBAL hDevMode;
706 HGLOBAL hDevNames;
707 HDC hDC;
708 DWORD Flags;
709 DWORD Flags2;
710 DWORD ExclusionFlags;
711 DWORD nPageRanges;
712 DWORD nMaxPageRanges;
713 LPPRINTPAGERANGE lpPageRanges;
714 DWORD nMinPage;
715 DWORD nMaxPage;
716 DWORD nCopies;
717 HINSTANCE hInstance;
718 LPCSTR lpPrintTemplateName;
719 void* /*LPUNKNOWN*/ lpCallback;
720 DWORD nPropertyPages;
721 HPROPSHEETPAGE* lphPropertyPages;
722 DWORD nStartPage;
723 DWORD dwResultAction;
724 } PRINTDLGEXA, *LPPRINTDLGEXA;
726 typedef struct tagPDEXW
728 DWORD lStructSize;
729 HWND hwndOwner;
730 HGLOBAL hDevMode;
731 HGLOBAL hDevNames;
732 HDC hDC;
733 DWORD Flags;
734 DWORD Flags2;
735 DWORD ExclusionFlags;
736 DWORD nPageRanges;
737 DWORD nMaxPageRanges;
738 LPPRINTPAGERANGE lpPageRanges;
739 DWORD nMinPage;
740 DWORD nMaxPage;
741 DWORD nCopies;
742 HINSTANCE hInstance;
743 LPCWSTR lpPrintTemplateName;
744 void* /*LPUNKNOWN*/ lpCallback;
745 DWORD nPropertyPages;
746 HPROPSHEETPAGE* lphPropertyPages;
747 DWORD nStartPage;
748 DWORD dwResultAction;
749 } PRINTDLGEXW, *LPPRINTDLGEXW;
751 DECL_WINELIB_TYPE_AW(PRINTDLGEX)
752 DECL_WINELIB_TYPE_AW(LPPRINTDLGEX)
754 #ifdef STDMETHOD
756 DEFINE_GUID(IID_IPrintDialogCallback, 0x5852a2c3,0x6530,0x11d1,0xb6,0xa3,0x00,0x00,0xf8,0x75,0x7b,0xf9);
757 #define INTERFACE IPrintDialogCallback
758 DECLARE_INTERFACE_(IPrintDialogCallback,IUnknown)
760 /*** IUnknown methods ***/
761 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
762 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
763 STDMETHOD_(ULONG,Release)(THIS) PURE;
764 /*** IPrintDialogCallback methods ***/
765 STDMETHOD(InitDone)(THIS) PURE;
766 STDMETHOD(SelectionChange)(THIS) PURE;
767 STDMETHOD(HandleMessage)(THIS_ HWND,UINT,WPARAM,LPARAM,LRESULT *) PURE;
769 #undef INTERFACE
771 DEFINE_GUID(IID_IPrintDialogServices, 0x509aaeda,0x5639,0x11d1,0xb6,0xa1,0x00,0x00,0xf8,0x75,0x7b,0xf9);
772 #define INTERFACE IPrintDialogServices
773 DECLARE_INTERFACE_(IPrintDialogServices,IUnknown)
775 /*** IUnknown methods ***/
776 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
777 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
778 STDMETHOD_(ULONG,Release)(THIS) PURE;
779 /*** IPrintDialogServices methods ***/
780 STDMETHOD(GetCurrentDevMode)(THIS_ LPDEVMODEW,UINT *) PURE;
781 STDMETHOD(GetCurrentPrinterName)(THIS_ LPWSTR,UINT *) PURE;
782 STDMETHOD(GetCurrentPortName)(THIS_ LPWSTR,UINT *) PURE;
784 #undef INTERFACE
786 #endif /* STDMETHOD */
788 WINCOMMDLGAPI BOOL WINAPI ChooseColorA(LPCHOOSECOLORA lpChCol);
789 WINCOMMDLGAPI BOOL WINAPI ChooseColorW(LPCHOOSECOLORW lpChCol);
790 #define ChooseColor WINELIB_NAME_AW(ChooseColor)
791 WINCOMMDLGAPI DWORD WINAPI CommDlgExtendedError(void);
792 WINCOMMDLGAPI HWND WINAPI FindTextA(LPFINDREPLACEA lpFind);
793 WINCOMMDLGAPI HWND WINAPI FindTextW(LPFINDREPLACEW lpFind);
794 #define FindText WINELIB_NAME_AW(FindText)
795 WINCOMMDLGAPI short WINAPI GetFileTitleA(LPCSTR lpFile, LPSTR lpTitle, WORD cbBuf);
796 WINCOMMDLGAPI short WINAPI GetFileTitleW(LPCWSTR lpFile, LPWSTR lpTitle, WORD cbBuf);
797 #define GetFileTitle WINELIB_NAME_AW(GetFileTitle)
798 WINCOMMDLGAPI BOOL WINAPI GetOpenFileNameA(LPOPENFILENAMEA ofn);
799 WINCOMMDLGAPI BOOL WINAPI GetOpenFileNameW(LPOPENFILENAMEW ofn);
800 #define GetOpenFileName WINELIB_NAME_AW(GetOpenFileName)
801 WINCOMMDLGAPI BOOL WINAPI GetSaveFileNameA(LPOPENFILENAMEA ofn);
802 WINCOMMDLGAPI BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn);
803 #define GetSaveFileName WINELIB_NAME_AW(GetSaveFileName)
804 WINCOMMDLGAPI BOOL WINAPI PageSetupDlgA( LPPAGESETUPDLGA );
805 WINCOMMDLGAPI BOOL WINAPI PageSetupDlgW( LPPAGESETUPDLGW );
806 #define PageSetupDlg WINELIB_NAME_AW(PageSetupDlg)
807 WINCOMMDLGAPI BOOL WINAPI PrintDlgA( LPPRINTDLGA printdlg);
808 WINCOMMDLGAPI BOOL WINAPI PrintDlgW( LPPRINTDLGW printdlg);
809 #define PrintDlg WINELIB_NAME_AW(PrintDlg)
810 WINCOMMDLGAPI HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA);
811 WINCOMMDLGAPI HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW);
812 #define PrintDlgEx WINELIB_NAME_AW(PrintDlgEx)
813 WINCOMMDLGAPI HWND WINAPI ReplaceTextA( LPFINDREPLACEA lpFind);
814 WINCOMMDLGAPI HWND WINAPI ReplaceTextW( LPFINDREPLACEW lpFind);
815 #define ReplaceText WINELIB_NAME_AW(ReplaceText)
816 WINCOMMDLGAPI BOOL WINAPI ChooseFontA(LPCHOOSEFONTA);
817 WINCOMMDLGAPI BOOL WINAPI ChooseFontW(LPCHOOSEFONTW);
818 #define ChooseFont WINELIB_NAME_AW(ChooseFont)
820 #ifndef _WIN64
821 #include <poppack.h>
822 #endif
824 #ifdef __cplusplus
826 #endif
828 #endif /* __WINE_COMMDLG_H */