ntoskrnl.exe: Add stubs for Io{Allocate,Get}DriverObjectExtension.
[wine/multimedia.git] / include / commdlg.h
blob34e6b225a65c681d18ef5d3500ec968f6d39ea15
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 (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 UINT (CALLBACK *LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
154 typedef struct {
155 DWORD lStructSize;
156 HWND hwndOwner;
157 HWND hInstance; /* Should be an HINSTANCE but MS made a typo */
158 DWORD rgbResult;
159 LPDWORD lpCustColors;
160 DWORD Flags;
161 DWORD lCustData;
162 LPCCHOOKPROC lpfnHook;
163 LPCSTR lpTemplateName;
164 } CHOOSECOLORA;
165 typedef CHOOSECOLORA *LPCHOOSECOLORA;
167 typedef struct {
168 DWORD lStructSize;
169 HWND hwndOwner;
170 HWND hInstance; /* Should be an HINSTANCE but MS made a typo */
171 DWORD rgbResult;
172 LPDWORD lpCustColors;
173 DWORD Flags;
174 DWORD lCustData;
175 LPCCHOOKPROC lpfnHook;
176 LPCWSTR lpTemplateName;
177 } CHOOSECOLORW;
178 typedef CHOOSECOLORW *LPCHOOSECOLORW;
180 DECL_WINELIB_TYPE_AW(CHOOSECOLOR)
181 DECL_WINELIB_TYPE_AW(LPCHOOSECOLOR)
184 #define CC_RGBINIT 0x00000001
185 #define CC_FULLOPEN 0x00000002
186 #define CC_PREVENTFULLOPEN 0x00000004
187 #define CC_SHOWHELP 0x00000008
188 #define CC_ENABLEHOOK 0x00000010
189 #define CC_ENABLETEMPLATE 0x00000020
190 #define CC_ENABLETEMPLATEHANDLE 0x00000040
191 #define CC_SOLIDCOLOR 0x00000080
192 #define CC_ANYCOLOR 0x00000100
194 typedef UINT (CALLBACK *LPFRHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
196 typedef struct {
197 DWORD lStructSize;
198 HWND hwndOwner;
199 HINSTANCE hInstance;
200 DWORD Flags;
201 LPSTR lpstrFindWhat;
202 LPSTR lpstrReplaceWith;
203 WORD wFindWhatLen;
204 WORD wReplaceWithLen;
205 LPARAM lCustData;
206 LPFRHOOKPROC lpfnHook;
207 LPCSTR lpTemplateName;
208 } FINDREPLACEA, *LPFINDREPLACEA;
210 typedef struct {
211 DWORD lStructSize;
212 HWND hwndOwner;
213 HINSTANCE hInstance;
214 DWORD Flags;
215 LPWSTR lpstrFindWhat;
216 LPWSTR lpstrReplaceWith;
217 WORD wFindWhatLen;
218 WORD wReplaceWithLen;
219 LPARAM lCustData;
220 LPFRHOOKPROC lpfnHook;
221 LPCWSTR lpTemplateName;
222 } FINDREPLACEW, *LPFINDREPLACEW;
224 DECL_WINELIB_TYPE_AW(FINDREPLACE)
225 DECL_WINELIB_TYPE_AW(LPFINDREPLACE)
227 #define FR_DOWN 0x00000001
228 #define FR_WHOLEWORD 0x00000002
229 #define FR_MATCHCASE 0x00000004
230 #define FR_FINDNEXT 0x00000008
231 #define FR_REPLACE 0x00000010
232 #define FR_REPLACEALL 0x00000020
233 #define FR_DIALOGTERM 0x00000040
234 #define FR_SHOWHELP 0x00000080
235 #define FR_ENABLEHOOK 0x00000100
236 #define FR_ENABLETEMPLATE 0x00000200
237 #define FR_NOUPDOWN 0x00000400
238 #define FR_NOMATCHCASE 0x00000800
239 #define FR_NOWHOLEWORD 0x00001000
240 #define FR_ENABLETEMPLATEHANDLE 0x00002000
241 #define FR_HIDEUPDOWN 0x00004000
242 #define FR_HIDEMATCHCASE 0x00008000
243 #define FR_HIDEWHOLEWORD 0x00010000
244 #define FR_MATCHDIAC 0x20000000
245 #define FR_MATCHKASHIDA 0x40000000
246 #define FR_MATCHALEFHAMZA 0x80000000
248 typedef UINT (CALLBACK *LPCFHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
250 typedef struct tagCHOOSEFONTA
252 UINT lStructSize;
253 HWND hwndOwner;
254 HDC hDC;
255 LPLOGFONTA lpLogFont;
256 INT iPointSize;
257 DWORD Flags;
258 COLORREF rgbColors;
259 LPARAM lCustData;
260 LPCFHOOKPROC lpfnHook;
261 LPCSTR lpTemplateName;
262 HINSTANCE hInstance;
263 LPSTR lpszStyle;
264 WORD nFontType;
265 WORD ___MISSING_ALIGNMENT__;
266 INT nSizeMin;
267 INT nSizeMax;
268 } CHOOSEFONTA, *LPCHOOSEFONTA;
270 typedef struct tagCHOOSEFONTW
272 UINT lStructSize;
273 HWND hwndOwner;
274 HDC hDC;
275 LPLOGFONTW lpLogFont;
276 INT iPointSize;
277 DWORD Flags;
278 COLORREF rgbColors;
279 LPARAM lCustData;
280 LPCFHOOKPROC lpfnHook;
281 LPCWSTR lpTemplateName;
282 HINSTANCE hInstance;
283 LPWSTR lpszStyle;
284 WORD nFontType;
285 WORD ___MISSING_ALIGNMENT__;
286 INT nSizeMin;
287 INT nSizeMax;
288 } CHOOSEFONTW, *LPCHOOSEFONTW;
290 DECL_WINELIB_TYPE_AW(CHOOSEFONT)
291 DECL_WINELIB_TYPE_AW(LPCHOOSEFONT)
293 #define CF_SCREENFONTS 0x00000001
294 #define CF_PRINTERFONTS 0x00000002
295 #define CF_BOTH (CF_SCREENFONTS | CF_PRINTERFONTS)
296 #define CF_SHOWHELP 0x00000004L
297 #define CF_ENABLEHOOK 0x00000008L
298 #define CF_ENABLETEMPLATE 0x00000010L
299 #define CF_ENABLETEMPLATEHANDLE 0x00000020L
300 #define CF_INITTOLOGFONTSTRUCT 0x00000040L
301 #define CF_USESTYLE 0x00000080L
302 #define CF_EFFECTS 0x00000100L
303 #define CF_APPLY 0x00000200L
304 #define CF_ANSIONLY 0x00000400L
305 #define CF_SCRIPTSONLY CF_ANSIONLY
306 #define CF_NOVECTORFONTS 0x00000800L
307 #define CF_NOOEMFONTS CF_NOVECTORFONTS
308 #define CF_NOSIMULATIONS 0x00001000L
309 #define CF_LIMITSIZE 0x00002000L
310 #define CF_FIXEDPITCHONLY 0x00004000L
311 #define CF_WYSIWYG 0x00008000L /* use with CF_SCREENFONTS & CF_PRINTERFONTS */
312 #define CF_FORCEFONTEXIST 0x00010000L
313 #define CF_SCALABLEONLY 0x00020000L
314 #define CF_TTONLY 0x00040000L
315 #define CF_NOFACESEL 0x00080000L
316 #define CF_NOSTYLESEL 0x00100000L
317 #define CF_NOSIZESEL 0x00200000L
318 #define CF_SELECTSCRIPT 0x00400000L
319 #define CF_NOSCRIPTSEL 0x00800000L
320 #define CF_NOVERTFONTS 0x01000000L
322 #define SIMULATED_FONTTYPE 0x8000
323 #define PRINTER_FONTTYPE 0x4000
324 #define SCREEN_FONTTYPE 0x2000
325 #define BOLD_FONTTYPE 0x0100
326 #define ITALIC_FONTTYPE 0x0200
327 #define REGULAR_FONTTYPE 0x0400
329 #define WM_CHOOSEFONT_GETLOGFONT (WM_USER + 1)
330 #define WM_CHOOSEFONT_SETLOGFONT (WM_USER + 101)
331 #define WM_CHOOSEFONT_SETFLAGS (WM_USER + 102)
333 #define LBSELCHSTRINGA "commdlg_LBSelChangedNotify"
334 #if defined(__GNUC__)
335 # define LBSELCHSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
336 'L','B','S','e','l','C','h','a','n','g','e','d','N','o','t','i','f','y',0 }
337 #elif defined(_MSC_VER)
338 # define LBSELCHSTRINGW L"commdlg_LBSelChangedNotify"
339 #else
340 static const WCHAR LBSELCHSTRINGW[] = { 'c','o','m','m','d','l','g','_',
341 'L','B','S','e','l','C','h','a','n','g','e','d','N','o','t','i','f','y',0 };
342 #endif
343 #define LBSELCHSTRING WINELIB_NAME_AW(LBSELCHSTRING)
345 #define SHAREVISTRINGA "commdlg_ShareViolation"
346 #if defined(__GNUC__)
347 # define SHAREVISTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
348 'S','h','a','r','e','V','i','o','l','a','t','i','o','n',0 }
349 #elif defined(_MSC_VER)
350 # define SHAREVISTRINGW L"commdlg_ShareViolation"
351 #else
352 static const WCHAR SHAREVISTRINGW[] = { 'c','o','m','m','d','l','g','_',
353 'S','h','a','r','e','V','i','o','l','a','t','i','o','n',0 };
354 #endif
355 #define SHAREVISTRING WINELIB_NAME_AW(SHAREVISTRING)
357 #define FILEOKSTRINGA "commdlg_FileNameOK"
358 #if defined(__GNUC__)
359 # define FILEOKSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
360 'F','i','l','e','N','a','m','e','O','K',0 }
361 #elif defined(_MSC_VER)
362 # define FILEOKSTRINGW L"commdlg_FileNameOK"
363 #else
364 static const WCHAR FILEOKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
365 'F','i','l','e','N','a','m','e','O','K',0 };
366 #endif
367 #define FILEOKSTRING WINELIB_NAME_AW(FILEOKSTRING)
369 #define COLOROKSTRINGA "commdlg_ColorOK"
370 #if defined(__GNUC__)
371 # define COLOROKSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
372 'C','o','l','o','r','O','K',0 }
373 #elif defined(_MSC_VER)
374 # define COLOROKSTRINGW L"commdlg_ColorOK"
375 #else
376 static const WCHAR COLOROKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
377 'C','o','l','o','r','O','K',0 };
378 #endif
379 #define COLOROKSTRING WINELIB_NAME_AW(COLOROKSTRING)
381 #define SETRGBSTRINGA "commdlg_SetRGBColor"
382 #if defined(__GNUC__)
383 # define SETRGBSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
384 'S','e','t','R','G','B','C','o','l','o','r',0 }
385 #elif defined(_MSC_VER)
386 # define SETRGBSTRINGW L"commdlg_SetRGBColor"
387 #else
388 static const WCHAR SETRGBSTRINGW[] = { 'c','o','m','m','d','l','g','_',
389 'S','e','t','R','G','B','C','o','l','o','r',0 };
390 #endif
391 #define SETRGBSTRING WINELIB_NAME_AW(SETRGBSTRING)
393 #define FINDMSGSTRINGA "commdlg_FindReplace"
394 #if defined(__GNUC__)
395 # define FINDMSGSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
396 'F','i','n','d','R','e','p','l','a','c','e',0 }
397 #elif defined(_MSC_VER)
398 # define FINDMSGSTRINGW L"commdlg_FindReplace"
399 #else
400 static const WCHAR FINDMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
401 'F','i','n','d','R','e','p','l','a','c','e',0 };
402 #endif
403 #define FINDMSGSTRING WINELIB_NAME_AW(FINDMSGSTRING)
405 #define HELPMSGSTRINGA "commdlg_help"
406 #if defined(__GNUC__)
407 # define HELPMSGSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
408 'H','e','l','p',0 }
409 #elif defined(_MSC_VER)
410 # define HELPMSGSTRINGW L"commdlg_help"
411 #else
412 static const WCHAR HELPMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
413 'H','e','l','p',0 };
414 #endif
415 #define HELPMSGSTRING WINELIB_NAME_AW(HELPMSGSTRING)
418 #define CD_LBSELNOITEMS -1
419 #define CD_LBSELCHANGE 0
420 #define CD_LBSELSUB 1
421 #define CD_LBSELADD 2
423 #define CDN_FIRST (0U-601U)
424 #define CDN_LAST (0U-699U)
426 #define CDN_INITDONE (CDN_FIRST - 0x0000)
427 #define CDN_SELCHANGE (CDN_FIRST - 0x0001)
428 #define CDN_FOLDERCHANGE (CDN_FIRST - 0x0002)
429 #define CDN_SHAREVIOLATION (CDN_FIRST - 0x0003)
430 #define CDN_HELP (CDN_FIRST - 0x0004)
431 #define CDN_FILEOK (CDN_FIRST - 0x0005)
432 #define CDN_TYPECHANGE (CDN_FIRST - 0x0006)
434 #define CDM_FIRST (WM_USER + 100)
435 #define CDM_LAST (WM_USER + 200)
437 #define CDM_GETSPEC (CDM_FIRST + 0x0000)
438 #define CDM_GETFILEPATH (CDM_FIRST + 0x0001)
439 #define CDM_GETFOLDERPATH (CDM_FIRST + 0x0002)
440 #define CDM_GETFOLDERIDLIST (CDM_FIRST + 0x0003)
441 #define CDM_SETCONTROLTEXT (CDM_FIRST + 0x0004)
442 #define CDM_HIDECONTROL (CDM_FIRST + 0x0005)
443 #define CDM_SETDEFEXT (CDM_FIRST + 0x0006)
446 /* Messages to query information from the open or save dialogs */
448 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
449 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
450 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
451 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
452 #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
454 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
455 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
456 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
457 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
458 #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
460 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
461 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
462 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
463 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
464 #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
466 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
467 (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
469 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
470 (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
472 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
473 (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
475 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
476 (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
478 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
479 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
480 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
481 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
482 #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
484 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
485 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
486 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
487 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
488 #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
490 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
491 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
492 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
493 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
494 #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
496 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
497 (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
499 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
500 (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
502 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
503 (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
505 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
506 (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
509 typedef UINT (CALLBACK *LPPRINTHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
510 typedef UINT (CALLBACK *LPSETUPHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
512 typedef struct tagPDA
514 DWORD lStructSize;
515 HWND hwndOwner;
516 HGLOBAL hDevMode;
517 HGLOBAL hDevNames;
518 HDC hDC;
519 DWORD Flags;
520 WORD nFromPage;
521 WORD nToPage;
522 WORD nMinPage;
523 WORD nMaxPage;
524 WORD nCopies;
525 HINSTANCE hInstance;
526 LPARAM lCustData;
527 LPPRINTHOOKPROC lpfnPrintHook;
528 LPSETUPHOOKPROC lpfnSetupHook;
529 LPCSTR lpPrintTemplateName;
530 LPCSTR lpSetupTemplateName;
531 HGLOBAL hPrintTemplate;
532 HGLOBAL hSetupTemplate;
533 } PRINTDLGA, *LPPRINTDLGA;
535 typedef struct tagPDW
537 DWORD lStructSize;
538 HWND hwndOwner;
539 HGLOBAL hDevMode;
540 HGLOBAL hDevNames;
541 HDC hDC;
542 DWORD Flags;
543 WORD nFromPage;
544 WORD nToPage;
545 WORD nMinPage;
546 WORD nMaxPage;
547 WORD nCopies;
548 HINSTANCE hInstance;
549 LPARAM lCustData;
550 LPPRINTHOOKPROC lpfnPrintHook;
551 LPSETUPHOOKPROC lpfnSetupHook;
552 LPCWSTR lpPrintTemplateName;
553 LPCWSTR lpSetupTemplateName;
554 HGLOBAL hPrintTemplate;
555 HGLOBAL hSetupTemplate;
556 } PRINTDLGW, *LPPRINTDLGW;
558 DECL_WINELIB_TYPE_AW(PRINTDLG)
559 DECL_WINELIB_TYPE_AW(LPPRINTDLG)
561 #define PD_ALLPAGES 0x00000000
562 #define PD_SELECTION 0x00000001
563 #define PD_PAGENUMS 0x00000002
564 #define PD_NOSELECTION 0x00000004
565 #define PD_NOPAGENUMS 0x00000008
566 #define PD_COLLATE 0x00000010
567 #define PD_PRINTTOFILE 0x00000020
568 #define PD_PRINTSETUP 0x00000040
569 #define PD_NOWARNING 0x00000080
570 #define PD_RETURNDC 0x00000100
571 #define PD_RETURNIC 0x00000200
572 #define PD_RETURNDEFAULT 0x00000400
573 #define PD_SHOWHELP 0x00000800
574 #define PD_ENABLEPRINTHOOK 0x00001000
575 #define PD_ENABLESETUPHOOK 0x00002000
576 #define PD_ENABLEPRINTTEMPLATE 0x00004000
577 #define PD_ENABLESETUPTEMPLATE 0x00008000
578 #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
579 #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
580 #define PD_USEDEVMODECOPIES 0x00040000
581 #define PD_USEDEVMODECOPIESANDCOLLATE 0x00040000
582 #define PD_DISABLEPRINTTOFILE 0x00080000
583 #define PD_HIDEPRINTTOFILE 0x00100000
584 #define PD_NONETWORKBUTTON 0x00200000
585 #define PD_CURRENTPAGE 0x00400000
586 #define PD_NOCURRENTPAGE 0x00800000
587 #define PD_EXCLUSIONFLAGS 0x01000000
588 #define PD_USELARGETEMPLATE 0x10000000
591 #define PD_EXCL_COPIESANDCOLLATE (DM_COPIES | DM_COLLATE)
593 #define START_PAGE_GENERAL 0xffffffff
595 #define PD_RESULT_CANCEL 0
596 #define PD_RESULT_PRINT 1
597 #define PD_RESULT_APPLY 2
599 typedef struct
601 WORD wDriverOffset;
602 WORD wDeviceOffset;
603 WORD wOutputOffset;
604 WORD wDefault;
605 } DEVNAMES;
606 typedef DEVNAMES * LPDEVNAMES;
608 #define DN_DEFAULTPRN 0x0001
610 /* PageSetupDlg stuff ... */
611 #define WM_PSD_PAGESETUPDLG (WM_USER )
612 #define WM_PSD_FULLPAGERECT (WM_USER+1)
613 #define WM_PSD_MINMARGINRECT (WM_USER+2)
614 #define WM_PSD_MARGINRECT (WM_USER+3)
615 #define WM_PSD_GREEKTEXTRECT (WM_USER+4)
616 #define WM_PSD_ENVSTAMPRECT (WM_USER+5)
617 #define WM_PSD_YAFULLPAGERECT (WM_USER+6)
619 typedef UINT (CALLBACK *LPPAGEPAINTHOOK)( HWND, UINT, WPARAM, LPARAM );
620 typedef UINT (CALLBACK *LPPAGESETUPHOOK)( HWND, UINT, WPARAM, LPARAM );
622 typedef struct tagPSDA
624 DWORD lStructSize;
625 HWND hwndOwner;
626 HGLOBAL hDevMode;
627 HGLOBAL hDevNames;
628 DWORD Flags;
629 POINT ptPaperSize;
630 RECT rtMinMargin;
631 RECT rtMargin;
632 HINSTANCE hInstance;
633 LPARAM lCustData;
634 LPPAGESETUPHOOK lpfnPageSetupHook;
635 LPPAGEPAINTHOOK lpfnPagePaintHook;
636 LPCSTR lpPageSetupTemplateName;
637 HGLOBAL hPageSetupTemplate;
638 } PAGESETUPDLGA,*LPPAGESETUPDLGA;
640 typedef struct tagPSDW
642 DWORD lStructSize;
643 HWND hwndOwner;
644 HGLOBAL hDevMode;
645 HGLOBAL hDevNames;
646 DWORD Flags;
647 POINT ptPaperSize;
648 RECT rtMinMargin;
649 RECT rtMargin;
650 HINSTANCE hInstance;
651 LPARAM lCustData;
652 LPPAGESETUPHOOK lpfnPageSetupHook;
653 LPPAGEPAINTHOOK lpfnPagePaintHook;
654 LPCWSTR lpPageSetupTemplateName;
655 HGLOBAL hPageSetupTemplate;
656 } PAGESETUPDLGW,*LPPAGESETUPDLGW;
657 DECL_WINELIB_TYPE_AW(PAGESETUPDLG)
658 DECL_WINELIB_TYPE_AW(LPPAGESETUPDLG)
660 #define PSD_DEFAULTMINMARGINS 0x00000000
661 #define PSD_INWININIINTLMEASURE 0x00000000
663 #define PSD_MINMARGINS 0x00000001
664 #define PSD_MARGINS 0x00000002
665 #define PSD_INTHOUSANDTHSOFINCHES 0x00000004
666 #define PSD_INHUNDREDTHSOFMILLIMETERS 0x00000008
667 #define PSD_DISABLEMARGINS 0x00000010
668 #define PSD_DISABLEPRINTER 0x00000020
669 #define PSD_NOWARNING 0x00000080
670 #define PSD_DISABLEORIENTATION 0x00000100
671 #define PSD_RETURNDEFAULT 0x00000400
672 #define PSD_DISABLEPAPER 0x00000200
673 #define PSD_SHOWHELP 0x00000800
674 #define PSD_ENABLEPAGESETUPHOOK 0x00002000
675 #define PSD_ENABLEPAGESETUPTEMPLATE 0x00008000
676 #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x00020000
677 #define PSD_ENABLEPAGEPAINTHOOK 0x00040000
678 #define PSD_DISABLEPAGEPAINTING 0x00080000
679 #define PSD_NONETWORKBUTTON 0x00200000
681 typedef struct tagPRINTPAGERANGE
683 DWORD nFromPage;
684 DWORD nToPage;
685 } PRINTPAGERANGE, *LPPRINTPAGERANGE;
687 typedef struct tagPDEXA
689 DWORD lStructSize;
690 HWND hwndOwner;
691 HGLOBAL hDevMode;
692 HGLOBAL hDevNames;
693 HDC hDC;
694 DWORD Flags;
695 DWORD Flags2;
696 DWORD ExclusionFlags;
697 DWORD nPageRanges;
698 DWORD nMaxPageRanges;
699 LPPRINTPAGERANGE lpPageRanges;
700 DWORD nMinPage;
701 DWORD nMaxPage;
702 DWORD nCopies;
703 HINSTANCE hInstance;
704 LPCSTR lpPrintTemplateName;
705 void* /*LPUNKNOWN*/ lpCallback;
706 DWORD nPropertyPages;
707 HPROPSHEETPAGE* lphPropertyPages;
708 DWORD nStartPage;
709 DWORD dwResultAction;
710 } PRINTDLGEXA, *LPPRINTDLGEXA;
712 typedef struct tagPDEXW
714 DWORD lStructSize;
715 HWND hwndOwner;
716 HGLOBAL hDevMode;
717 HGLOBAL hDevNames;
718 HDC hDC;
719 DWORD Flags;
720 DWORD Flags2;
721 DWORD ExclusionFlags;
722 DWORD nPageRanges;
723 DWORD nMaxPageRanges;
724 LPPRINTPAGERANGE lpPageRanges;
725 DWORD nMinPage;
726 DWORD nMaxPage;
727 DWORD nCopies;
728 HINSTANCE hInstance;
729 LPCWSTR lpPrintTemplateName;
730 void* /*LPUNKNOWN*/ lpCallback;
731 DWORD nPropertyPages;
732 HPROPSHEETPAGE* lphPropertyPages;
733 DWORD nStartPage;
734 DWORD dwResultAction;
735 } PRINTDLGEXW, *LPPRINTDLGEXW;
737 DECL_WINELIB_TYPE_AW(PRINTDLGEX)
738 DECL_WINELIB_TYPE_AW(LPPRINTDLGEX)
740 BOOL WINAPI ChooseColorA(LPCHOOSECOLORA lpChCol);
741 BOOL WINAPI ChooseColorW(LPCHOOSECOLORW lpChCol);
742 #define ChooseColor WINELIB_NAME_AW(ChooseColor)
743 DWORD WINAPI CommDlgExtendedError(void);
744 HWND WINAPI FindTextA(LPFINDREPLACEA lpFind);
745 HWND WINAPI FindTextW(LPFINDREPLACEW lpFind);
746 #define FindText WINELIB_NAME_AW(FindText)
747 short WINAPI GetFileTitleA(LPCSTR lpFile, LPSTR lpTitle, WORD cbBuf);
748 short WINAPI GetFileTitleW(LPCWSTR lpFile, LPWSTR lpTitle, WORD cbBuf);
749 #define GetFileTitle WINELIB_NAME_AW(GetFileTitle)
750 BOOL WINAPI GetOpenFileNameA(LPOPENFILENAMEA ofn);
751 BOOL WINAPI GetOpenFileNameW(LPOPENFILENAMEW ofn);
752 #define GetOpenFileName WINELIB_NAME_AW(GetOpenFileName)
753 BOOL WINAPI GetSaveFileNameA(LPOPENFILENAMEA ofn);
754 BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn);
755 #define GetSaveFileName WINELIB_NAME_AW(GetSaveFileName)
756 BOOL WINAPI PageSetupDlgA( LPPAGESETUPDLGA );
757 BOOL WINAPI PageSetupDlgW( LPPAGESETUPDLGW );
758 #define PageSetupDlg WINELIB_NAME_AW(PageSetupDlg)
759 BOOL WINAPI PrintDlgA( LPPRINTDLGA printdlg);
760 BOOL WINAPI PrintDlgW( LPPRINTDLGW printdlg);
761 #define PrintDlg WINELIB_NAME_AW(PrintDlg)
762 HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA);
763 HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW);
764 #define PrintDlgEx WINELIB_NAME_AW(PrintDlgEx)
765 HWND WINAPI ReplaceTextA( LPFINDREPLACEA lpFind);
766 HWND WINAPI ReplaceTextW( LPFINDREPLACEW lpFind);
767 #define ReplaceText WINELIB_NAME_AW(ReplaceText)
768 BOOL WINAPI ChooseFontA(LPCHOOSEFONTA);
769 BOOL WINAPI ChooseFontW(LPCHOOSEFONTW);
770 #define ChooseFont WINELIB_NAME_AW(ChooseFont)
772 void COMDLG32_SetCommDlgExtendedError(DWORD err);
775 #ifndef _WIN64
776 #include <poppack.h>
777 #endif
779 #ifdef __cplusplus
781 #endif
783 #endif /* __WINE_COMMDLG_H */