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