d3dx9/tests: Add tests for using D3DXLoadSurfaceFromSurface() with default render...
[wine.git] / include / commdlg.h
blob214badd08523a998c82c3c120d0efb82bb886217
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(__GNUC__)
362 # define LBSELCHSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
363 'L','B','S','e','l','C','h','a','n','g','e','d','N','o','t','i','f','y',0 }
364 #elif defined(_MSC_VER)
365 # define LBSELCHSTRINGW L"commdlg_LBSelChangedNotify"
366 #else
367 static const WCHAR LBSELCHSTRINGW[] = { 'c','o','m','m','d','l','g','_',
368 'L','B','S','e','l','C','h','a','n','g','e','d','N','o','t','i','f','y',0 };
369 #endif
370 #define LBSELCHSTRING WINELIB_NAME_AW(LBSELCHSTRING)
372 #define SHAREVISTRINGA "commdlg_ShareViolation"
373 #if defined(__GNUC__)
374 # define SHAREVISTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
375 'S','h','a','r','e','V','i','o','l','a','t','i','o','n',0 }
376 #elif defined(_MSC_VER)
377 # define SHAREVISTRINGW L"commdlg_ShareViolation"
378 #else
379 static const WCHAR SHAREVISTRINGW[] = { 'c','o','m','m','d','l','g','_',
380 'S','h','a','r','e','V','i','o','l','a','t','i','o','n',0 };
381 #endif
382 #define SHAREVISTRING WINELIB_NAME_AW(SHAREVISTRING)
384 #define FILEOKSTRINGA "commdlg_FileNameOK"
385 #if defined(__GNUC__)
386 # define FILEOKSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
387 'F','i','l','e','N','a','m','e','O','K',0 }
388 #elif defined(_MSC_VER)
389 # define FILEOKSTRINGW L"commdlg_FileNameOK"
390 #else
391 static const WCHAR FILEOKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
392 'F','i','l','e','N','a','m','e','O','K',0 };
393 #endif
394 #define FILEOKSTRING WINELIB_NAME_AW(FILEOKSTRING)
396 #define COLOROKSTRINGA "commdlg_ColorOK"
397 #if defined(__GNUC__)
398 # define COLOROKSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
399 'C','o','l','o','r','O','K',0 }
400 #elif defined(_MSC_VER)
401 # define COLOROKSTRINGW L"commdlg_ColorOK"
402 #else
403 static const WCHAR COLOROKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
404 'C','o','l','o','r','O','K',0 };
405 #endif
406 #define COLOROKSTRING WINELIB_NAME_AW(COLOROKSTRING)
408 #define SETRGBSTRINGA "commdlg_SetRGBColor"
409 #if defined(__GNUC__)
410 # define SETRGBSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
411 'S','e','t','R','G','B','C','o','l','o','r',0 }
412 #elif defined(_MSC_VER)
413 # define SETRGBSTRINGW L"commdlg_SetRGBColor"
414 #else
415 static const WCHAR SETRGBSTRINGW[] = { 'c','o','m','m','d','l','g','_',
416 'S','e','t','R','G','B','C','o','l','o','r',0 };
417 #endif
418 #define SETRGBSTRING WINELIB_NAME_AW(SETRGBSTRING)
420 #define FINDMSGSTRINGA "commdlg_FindReplace"
421 #if defined(__GNUC__)
422 # define FINDMSGSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
423 'F','i','n','d','R','e','p','l','a','c','e',0 }
424 #elif defined(_MSC_VER)
425 # define FINDMSGSTRINGW L"commdlg_FindReplace"
426 #else
427 static const WCHAR FINDMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
428 'F','i','n','d','R','e','p','l','a','c','e',0 };
429 #endif
430 #define FINDMSGSTRING WINELIB_NAME_AW(FINDMSGSTRING)
432 #define HELPMSGSTRINGA "commdlg_help"
433 #if defined(__GNUC__)
434 # define HELPMSGSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
435 'H','e','l','p',0 }
436 #elif defined(_MSC_VER)
437 # define HELPMSGSTRINGW L"commdlg_help"
438 #else
439 static const WCHAR HELPMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
440 'H','e','l','p',0 };
441 #endif
442 #define HELPMSGSTRING WINELIB_NAME_AW(HELPMSGSTRING)
444 #define CD_LBSELNOITEMS -1
445 #define CD_LBSELCHANGE 0
446 #define CD_LBSELSUB 1
447 #define CD_LBSELADD 2
449 #define CDN_FIRST (0U-601U)
450 #define CDN_LAST (0U-699U)
452 #define CDN_INITDONE (CDN_FIRST - 0x0000)
453 #define CDN_SELCHANGE (CDN_FIRST - 0x0001)
454 #define CDN_FOLDERCHANGE (CDN_FIRST - 0x0002)
455 #define CDN_SHAREVIOLATION (CDN_FIRST - 0x0003)
456 #define CDN_HELP (CDN_FIRST - 0x0004)
457 #define CDN_FILEOK (CDN_FIRST - 0x0005)
458 #define CDN_TYPECHANGE (CDN_FIRST - 0x0006)
459 #define CDN_INCLUDEITEM (CDN_FIRST - 0x0007)
461 #define CDM_FIRST (WM_USER + 100)
462 #define CDM_LAST (WM_USER + 200)
464 #define CDM_GETSPEC (CDM_FIRST + 0x0000)
465 #define CDM_GETFILEPATH (CDM_FIRST + 0x0001)
466 #define CDM_GETFOLDERPATH (CDM_FIRST + 0x0002)
467 #define CDM_GETFOLDERIDLIST (CDM_FIRST + 0x0003)
468 #define CDM_SETCONTROLTEXT (CDM_FIRST + 0x0004)
469 #define CDM_HIDECONTROL (CDM_FIRST + 0x0005)
470 #define CDM_SETDEFEXT (CDM_FIRST + 0x0006)
473 /* Messages to query information from the open or save dialogs */
475 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
476 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
477 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
478 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
479 #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
481 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
482 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
483 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
484 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
485 #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
487 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
488 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
489 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
490 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
491 #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
493 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
494 (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
496 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
497 (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
499 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
500 (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
502 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
503 (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
505 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
506 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
507 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
508 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
509 #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
511 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
512 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
513 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
514 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
515 #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
517 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
518 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
519 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
520 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
521 #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
523 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
524 (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
526 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
527 (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
529 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
530 (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
532 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
533 (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
536 typedef UINT_PTR (CALLBACK *LPPRINTHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
537 typedef UINT_PTR (CALLBACK *LPSETUPHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
539 typedef struct tagPDA
541 DWORD lStructSize;
542 HWND hwndOwner;
543 HGLOBAL hDevMode;
544 HGLOBAL hDevNames;
545 HDC hDC;
546 DWORD Flags;
547 WORD nFromPage;
548 WORD nToPage;
549 WORD nMinPage;
550 WORD nMaxPage;
551 WORD nCopies;
552 HINSTANCE hInstance;
553 LPARAM lCustData;
554 LPPRINTHOOKPROC lpfnPrintHook;
555 LPSETUPHOOKPROC lpfnSetupHook;
556 LPCSTR lpPrintTemplateName;
557 LPCSTR lpSetupTemplateName;
558 HGLOBAL hPrintTemplate;
559 HGLOBAL hSetupTemplate;
560 } PRINTDLGA, *LPPRINTDLGA;
562 typedef struct tagPDW
564 DWORD lStructSize;
565 HWND hwndOwner;
566 HGLOBAL hDevMode;
567 HGLOBAL hDevNames;
568 HDC hDC;
569 DWORD Flags;
570 WORD nFromPage;
571 WORD nToPage;
572 WORD nMinPage;
573 WORD nMaxPage;
574 WORD nCopies;
575 HINSTANCE hInstance;
576 LPARAM lCustData;
577 LPPRINTHOOKPROC lpfnPrintHook;
578 LPSETUPHOOKPROC lpfnSetupHook;
579 LPCWSTR lpPrintTemplateName;
580 LPCWSTR lpSetupTemplateName;
581 HGLOBAL hPrintTemplate;
582 HGLOBAL hSetupTemplate;
583 } PRINTDLGW, *LPPRINTDLGW;
585 DECL_WINELIB_TYPE_AW(PRINTDLG)
586 DECL_WINELIB_TYPE_AW(LPPRINTDLG)
588 #define PD_ALLPAGES 0x00000000
589 #define PD_SELECTION 0x00000001
590 #define PD_PAGENUMS 0x00000002
591 #define PD_NOSELECTION 0x00000004
592 #define PD_NOPAGENUMS 0x00000008
593 #define PD_COLLATE 0x00000010
594 #define PD_PRINTTOFILE 0x00000020
595 #define PD_PRINTSETUP 0x00000040
596 #define PD_NOWARNING 0x00000080
597 #define PD_RETURNDC 0x00000100
598 #define PD_RETURNIC 0x00000200
599 #define PD_RETURNDEFAULT 0x00000400
600 #define PD_SHOWHELP 0x00000800
601 #define PD_ENABLEPRINTHOOK 0x00001000
602 #define PD_ENABLESETUPHOOK 0x00002000
603 #define PD_ENABLEPRINTTEMPLATE 0x00004000
604 #define PD_ENABLESETUPTEMPLATE 0x00008000
605 #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
606 #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
607 #define PD_USEDEVMODECOPIES 0x00040000
608 #define PD_USEDEVMODECOPIESANDCOLLATE 0x00040000
609 #define PD_DISABLEPRINTTOFILE 0x00080000
610 #define PD_HIDEPRINTTOFILE 0x00100000
611 #define PD_NONETWORKBUTTON 0x00200000
612 #define PD_CURRENTPAGE 0x00400000
613 #define PD_NOCURRENTPAGE 0x00800000
614 #define PD_EXCLUSIONFLAGS 0x01000000
615 #define PD_USELARGETEMPLATE 0x10000000
618 #define PD_EXCL_COPIESANDCOLLATE (DM_COPIES | DM_COLLATE)
620 #define START_PAGE_GENERAL 0xffffffff
622 #define PD_RESULT_CANCEL 0
623 #define PD_RESULT_PRINT 1
624 #define PD_RESULT_APPLY 2
626 typedef struct
628 WORD wDriverOffset;
629 WORD wDeviceOffset;
630 WORD wOutputOffset;
631 WORD wDefault;
632 } DEVNAMES;
633 typedef DEVNAMES * LPDEVNAMES;
635 #define DN_DEFAULTPRN 0x0001
637 /* PageSetupDlg stuff ... */
638 #define WM_PSD_PAGESETUPDLG (WM_USER )
639 #define WM_PSD_FULLPAGERECT (WM_USER+1)
640 #define WM_PSD_MINMARGINRECT (WM_USER+2)
641 #define WM_PSD_MARGINRECT (WM_USER+3)
642 #define WM_PSD_GREEKTEXTRECT (WM_USER+4)
643 #define WM_PSD_ENVSTAMPRECT (WM_USER+5)
644 #define WM_PSD_YAFULLPAGERECT (WM_USER+6)
646 typedef UINT (CALLBACK *LPPAGEPAINTHOOK)( HWND, UINT, WPARAM, LPARAM );
647 typedef UINT (CALLBACK *LPPAGESETUPHOOK)( HWND, UINT, WPARAM, LPARAM );
649 typedef struct tagPSDA
651 DWORD lStructSize;
652 HWND hwndOwner;
653 HGLOBAL hDevMode;
654 HGLOBAL hDevNames;
655 DWORD Flags;
656 POINT ptPaperSize;
657 RECT rtMinMargin;
658 RECT rtMargin;
659 HINSTANCE hInstance;
660 LPARAM lCustData;
661 LPPAGESETUPHOOK lpfnPageSetupHook;
662 LPPAGEPAINTHOOK lpfnPagePaintHook;
663 LPCSTR lpPageSetupTemplateName;
664 HGLOBAL hPageSetupTemplate;
665 } PAGESETUPDLGA,*LPPAGESETUPDLGA;
667 typedef struct tagPSDW
669 DWORD lStructSize;
670 HWND hwndOwner;
671 HGLOBAL hDevMode;
672 HGLOBAL hDevNames;
673 DWORD Flags;
674 POINT ptPaperSize;
675 RECT rtMinMargin;
676 RECT rtMargin;
677 HINSTANCE hInstance;
678 LPARAM lCustData;
679 LPPAGESETUPHOOK lpfnPageSetupHook;
680 LPPAGEPAINTHOOK lpfnPagePaintHook;
681 LPCWSTR lpPageSetupTemplateName;
682 HGLOBAL hPageSetupTemplate;
683 } PAGESETUPDLGW,*LPPAGESETUPDLGW;
684 DECL_WINELIB_TYPE_AW(PAGESETUPDLG)
685 DECL_WINELIB_TYPE_AW(LPPAGESETUPDLG)
687 #define PSD_DEFAULTMINMARGINS 0x00000000
688 #define PSD_INWININIINTLMEASURE 0x00000000
690 #define PSD_MINMARGINS 0x00000001
691 #define PSD_MARGINS 0x00000002
692 #define PSD_INTHOUSANDTHSOFINCHES 0x00000004
693 #define PSD_INHUNDREDTHSOFMILLIMETERS 0x00000008
694 #define PSD_DISABLEMARGINS 0x00000010
695 #define PSD_DISABLEPRINTER 0x00000020
696 #define PSD_NOWARNING 0x00000080
697 #define PSD_DISABLEORIENTATION 0x00000100
698 #define PSD_RETURNDEFAULT 0x00000400
699 #define PSD_DISABLEPAPER 0x00000200
700 #define PSD_SHOWHELP 0x00000800
701 #define PSD_ENABLEPAGESETUPHOOK 0x00002000
702 #define PSD_ENABLEPAGESETUPTEMPLATE 0x00008000
703 #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x00020000
704 #define PSD_ENABLEPAGEPAINTHOOK 0x00040000
705 #define PSD_DISABLEPAGEPAINTING 0x00080000
706 #define PSD_NONETWORKBUTTON 0x00200000
708 typedef struct tagPRINTPAGERANGE
710 DWORD nFromPage;
711 DWORD nToPage;
712 } PRINTPAGERANGE, *LPPRINTPAGERANGE;
714 typedef struct tagPDEXA
716 DWORD lStructSize;
717 HWND hwndOwner;
718 HGLOBAL hDevMode;
719 HGLOBAL hDevNames;
720 HDC hDC;
721 DWORD Flags;
722 DWORD Flags2;
723 DWORD ExclusionFlags;
724 DWORD nPageRanges;
725 DWORD nMaxPageRanges;
726 LPPRINTPAGERANGE lpPageRanges;
727 DWORD nMinPage;
728 DWORD nMaxPage;
729 DWORD nCopies;
730 HINSTANCE hInstance;
731 LPCSTR lpPrintTemplateName;
732 void* /*LPUNKNOWN*/ lpCallback;
733 DWORD nPropertyPages;
734 HPROPSHEETPAGE* lphPropertyPages;
735 DWORD nStartPage;
736 DWORD dwResultAction;
737 } PRINTDLGEXA, *LPPRINTDLGEXA;
739 typedef struct tagPDEXW
741 DWORD lStructSize;
742 HWND hwndOwner;
743 HGLOBAL hDevMode;
744 HGLOBAL hDevNames;
745 HDC hDC;
746 DWORD Flags;
747 DWORD Flags2;
748 DWORD ExclusionFlags;
749 DWORD nPageRanges;
750 DWORD nMaxPageRanges;
751 LPPRINTPAGERANGE lpPageRanges;
752 DWORD nMinPage;
753 DWORD nMaxPage;
754 DWORD nCopies;
755 HINSTANCE hInstance;
756 LPCWSTR lpPrintTemplateName;
757 void* /*LPUNKNOWN*/ lpCallback;
758 DWORD nPropertyPages;
759 HPROPSHEETPAGE* lphPropertyPages;
760 DWORD nStartPage;
761 DWORD dwResultAction;
762 } PRINTDLGEXW, *LPPRINTDLGEXW;
764 DECL_WINELIB_TYPE_AW(PRINTDLGEX)
765 DECL_WINELIB_TYPE_AW(LPPRINTDLGEX)
767 #ifdef STDMETHOD
769 DEFINE_GUID(IID_IPrintDialogCallback, 0x5852a2c3,0x6530,0x11d1,0xb6,0xa3,0x00,0x00,0xf8,0x75,0x7b,0xf9);
770 #define INTERFACE IPrintDialogCallback
771 DECLARE_INTERFACE_(IPrintDialogCallback,IUnknown)
773 /*** IUnknown methods ***/
774 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
775 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
776 STDMETHOD_(ULONG,Release)(THIS) PURE;
777 /*** IPrintDialogCallback methods ***/
778 STDMETHOD(InitDone)(THIS) PURE;
779 STDMETHOD(SelectionChange)(THIS) PURE;
780 STDMETHOD(HandleMessage)(THIS_ HWND,UINT,WPARAM,LPARAM,LRESULT *) PURE;
782 #undef INTERFACE
784 DEFINE_GUID(IID_IPrintDialogServices, 0x509aaeda,0x5639,0x11d1,0xb6,0xa1,0x00,0x00,0xf8,0x75,0x7b,0xf9);
785 #define INTERFACE IPrintDialogServices
786 DECLARE_INTERFACE_(IPrintDialogServices,IUnknown)
788 /*** IUnknown methods ***/
789 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
790 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
791 STDMETHOD_(ULONG,Release)(THIS) PURE;
792 /*** IPrintDialogServices methods ***/
793 STDMETHOD(GetCurrentDevMode)(THIS_ LPDEVMODEW,UINT *) PURE;
794 STDMETHOD(GetCurrentPrinterName)(THIS_ LPWSTR,UINT *) PURE;
795 STDMETHOD(GetCurrentPortName)(THIS_ LPWSTR,UINT *) PURE;
797 #undef INTERFACE
799 #endif /* STDMETHOD */
801 BOOL WINAPI ChooseColorA(LPCHOOSECOLORA lpChCol);
802 BOOL WINAPI ChooseColorW(LPCHOOSECOLORW lpChCol);
803 #define ChooseColor WINELIB_NAME_AW(ChooseColor)
804 DWORD WINAPI CommDlgExtendedError(void);
805 HWND WINAPI FindTextA(LPFINDREPLACEA lpFind);
806 HWND WINAPI FindTextW(LPFINDREPLACEW lpFind);
807 #define FindText WINELIB_NAME_AW(FindText)
808 short WINAPI GetFileTitleA(LPCSTR lpFile, LPSTR lpTitle, WORD cbBuf);
809 short WINAPI GetFileTitleW(LPCWSTR lpFile, LPWSTR lpTitle, WORD cbBuf);
810 #define GetFileTitle WINELIB_NAME_AW(GetFileTitle)
811 BOOL WINAPI GetOpenFileNameA(LPOPENFILENAMEA ofn);
812 BOOL WINAPI GetOpenFileNameW(LPOPENFILENAMEW ofn);
813 #define GetOpenFileName WINELIB_NAME_AW(GetOpenFileName)
814 BOOL WINAPI GetSaveFileNameA(LPOPENFILENAMEA ofn);
815 BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn);
816 #define GetSaveFileName WINELIB_NAME_AW(GetSaveFileName)
817 BOOL WINAPI PageSetupDlgA( LPPAGESETUPDLGA );
818 BOOL WINAPI PageSetupDlgW( LPPAGESETUPDLGW );
819 #define PageSetupDlg WINELIB_NAME_AW(PageSetupDlg)
820 BOOL WINAPI PrintDlgA( LPPRINTDLGA printdlg);
821 BOOL WINAPI PrintDlgW( LPPRINTDLGW printdlg);
822 #define PrintDlg WINELIB_NAME_AW(PrintDlg)
823 HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA);
824 HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW);
825 #define PrintDlgEx WINELIB_NAME_AW(PrintDlgEx)
826 HWND WINAPI ReplaceTextA( LPFINDREPLACEA lpFind);
827 HWND WINAPI ReplaceTextW( LPFINDREPLACEW lpFind);
828 #define ReplaceText WINELIB_NAME_AW(ReplaceText)
829 BOOL WINAPI ChooseFontA(LPCHOOSEFONTA);
830 BOOL WINAPI ChooseFontW(LPCHOOSEFONTW);
831 #define ChooseFont WINELIB_NAME_AW(ChooseFont)
833 void COMDLG32_SetCommDlgExtendedError(DWORD err);
836 #ifndef _WIN64
837 #include <poppack.h>
838 #endif
840 #ifdef __cplusplus
842 #endif
844 #endif /* __WINE_COMMDLG_H */