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
33 #define SNDMSG ::SendMessage
34 #else /* __cplusplus */
35 #define SNDMSG SendMessage
36 #endif /* __cplusplus */
39 #define OFN_READONLY 0x00000001
40 #define OFN_OVERWRITEPROMPT 0x00000002
41 #define OFN_HIDEREADONLY 0x00000004
42 #define OFN_NOCHANGEDIR 0x00000008
43 #define OFN_SHOWHELP 0x00000010
44 #define OFN_ENABLEHOOK 0x00000020
45 #define OFN_ENABLETEMPLATE 0x00000040
46 #define OFN_ENABLETEMPLATEHANDLE 0x00000080
47 #define OFN_NOVALIDATE 0x00000100
48 #define OFN_ALLOWMULTISELECT 0x00000200
49 #define OFN_EXTENSIONDIFFERENT 0x00000400
50 #define OFN_PATHMUSTEXIST 0x00000800
51 #define OFN_FILEMUSTEXIST 0x00001000
52 #define OFN_CREATEPROMPT 0x00002000
53 #define OFN_SHAREAWARE 0x00004000
54 #define OFN_NOREADONLYRETURN 0x00008000
55 #define OFN_NOTESTFILECREATE 0x00010000
56 #define OFN_NONETWORKBUTTON 0x00020000
57 #define OFN_NOLONGNAMES 0x00040000
58 #define OFN_EXPLORER 0x00080000
59 #define OFN_NODEREFERENCELINKS 0x00100000
60 #define OFN_LONGNAMES 0x00200000
61 #define OFN_ENABLEINCLUDENOTIFY 0x00400000
62 #define OFN_ENABLESIZING 0x00800000
63 #define OFN_DONTADDTORECENT 0x02000000
64 #define OFN_FORCESHOWHIDDEN 0x10000000
66 #define OFN_SHAREFALLTHROUGH 2
67 #define OFN_SHARENOWARN 1
68 #define OFN_SHAREWARN 0
73 typedef UINT (CALLBACK *LPOFNHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
75 typedef struct tagOFNA {
80 LPSTR lpstrCustomFilter;
87 LPCSTR lpstrInitialDir;
94 LPOFNHOOKPROC lpfnHook;
95 LPCSTR lpTemplateName;
96 } OPENFILENAMEA,*LPOPENFILENAMEA;
98 typedef struct tagOFNW {
103 LPWSTR lpstrCustomFilter;
104 DWORD nMaxCustFilter;
108 LPWSTR lpstrFileTitle;
110 LPCWSTR lpstrInitialDir;
117 LPOFNHOOKPROC lpfnHook;
118 LPCWSTR lpTemplateName;
119 } OPENFILENAMEW,*LPOPENFILENAMEW;
121 DECL_WINELIB_TYPE_AW(OPENFILENAME)
122 DECL_WINELIB_TYPE_AW(LPOPENFILENAME)
124 #ifndef CDSIZEOF_STRUCT
125 #define CDSIZEOF_STRUCT(type,field) ((int)&(((type *)0)->field) + sizeof(((type*)0)->field))
128 #define OPENFILENAME_SIZE_VERSION_400A CDSIZEOF_STRUCT(OPENFILENAMEA,lpTemplateName)
129 #define OPENFILENAME_SIZE_VERSION_400W CDSIZEOF_STRUCT(OPENFILENAMEW,lpTemplateName)
130 #define OPENFILENAME_SIZE_VERSION_400 WINELIB_NAME_AW(OPENFILENAME_SIZE_VERSION_400)
136 LPOPENFILENAMEA lpOFN;
138 } OFNOTIFYA, *LPOFNOTIFYA;
143 LPOPENFILENAMEW lpOFN;
145 } OFNOTIFYW, *LPOFNOTIFYW;
147 DECL_WINELIB_TYPE_AW(OFNOTIFY)
148 DECL_WINELIB_TYPE_AW(LPOFNOTIFY)
150 typedef UINT (CALLBACK *LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
155 HWND hInstance; /* Should be an HINSTANCE but MS made a typo */
157 LPDWORD lpCustColors;
160 LPCCHOOKPROC lpfnHook;
161 LPCSTR lpTemplateName;
163 typedef CHOOSECOLORA *LPCHOOSECOLORA;
168 HWND hInstance; /* Should be an HINSTANCE but MS made a typo */
170 LPDWORD lpCustColors;
173 LPCCHOOKPROC lpfnHook;
174 LPCWSTR lpTemplateName;
176 typedef CHOOSECOLORW *LPCHOOSECOLORW;
178 DECL_WINELIB_TYPE_AW(CHOOSECOLOR)
179 DECL_WINELIB_TYPE_AW(LPCHOOSECOLOR)
182 #define CC_RGBINIT 0x00000001
183 #define CC_FULLOPEN 0x00000002
184 #define CC_PREVENTFULLOPEN 0x00000004
185 #define CC_SHOWHELP 0x00000008
186 #define CC_ENABLEHOOK 0x00000010
187 #define CC_ENABLETEMPLATE 0x00000020
188 #define CC_ENABLETEMPLATEHANDLE 0x00000040
189 #define CC_SOLIDCOLOR 0x00000080
190 #define CC_ANYCOLOR 0x00000100
192 typedef UINT (CALLBACK *LPFRHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
200 LPSTR lpstrReplaceWith;
202 WORD wReplaceWithLen;
204 LPFRHOOKPROC lpfnHook;
205 LPCSTR lpTemplateName;
206 } FINDREPLACEA, *LPFINDREPLACEA;
213 LPWSTR lpstrFindWhat;
214 LPWSTR lpstrReplaceWith;
216 WORD wReplaceWithLen;
218 LPFRHOOKPROC lpfnHook;
219 LPCWSTR lpTemplateName;
220 } FINDREPLACEW, *LPFINDREPLACEW;
222 DECL_WINELIB_TYPE_AW(FINDREPLACE)
223 DECL_WINELIB_TYPE_AW(LPFINDREPLACE)
225 #define FR_DOWN 0x00000001
226 #define FR_WHOLEWORD 0x00000002
227 #define FR_MATCHCASE 0x00000004
228 #define FR_FINDNEXT 0x00000008
229 #define FR_REPLACE 0x00000010
230 #define FR_REPLACEALL 0x00000020
231 #define FR_DIALOGTERM 0x00000040
232 #define FR_SHOWHELP 0x00000080
233 #define FR_ENABLEHOOK 0x00000100
234 #define FR_ENABLETEMPLATE 0x00000200
235 #define FR_NOUPDOWN 0x00000400
236 #define FR_NOMATCHCASE 0x00000800
237 #define FR_NOWHOLEWORD 0x00001000
238 #define FR_ENABLETEMPLATEHANDLE 0x00002000
239 #define FR_HIDEUPDOWN 0x00004000
240 #define FR_HIDEMATCHCASE 0x00008000
241 #define FR_HIDEWHOLEWORD 0x00010000
242 #define FR_MATCHDIAC 0x20000000
243 #define FR_MATCHKASHIDA 0x40000000
244 #define FR_MATCHALEFHAMZA 0x80000000
246 typedef UINT (CALLBACK *LPCFHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
248 typedef struct tagCHOOSEFONTA
253 LPLOGFONTA lpLogFont;
258 LPCFHOOKPROC lpfnHook;
259 LPCSTR lpTemplateName;
263 WORD ___MISSING_ALIGNMENT__;
266 } CHOOSEFONTA, *LPCHOOSEFONTA;
268 typedef struct tagCHOOSEFONTW
273 LPLOGFONTW lpLogFont;
278 LPCFHOOKPROC lpfnHook;
279 LPCWSTR lpTemplateName;
283 WORD ___MISSING_ALIGNMENT__;
286 } CHOOSEFONTW, *LPCHOOSEFONTW;
288 DECL_WINELIB_TYPE_AW(CHOOSEFONT)
289 DECL_WINELIB_TYPE_AW(LPCHOOSEFONT)
291 #define CF_SCREENFONTS 0x00000001
292 #define CF_PRINTERFONTS 0x00000002
293 #define CF_BOTH (CF_SCREENFONTS | CF_PRINTERFONTS)
294 #define CF_SHOWHELP 0x00000004L
295 #define CF_ENABLEHOOK 0x00000008L
296 #define CF_ENABLETEMPLATE 0x00000010L
297 #define CF_ENABLETEMPLATEHANDLE 0x00000020L
298 #define CF_INITTOLOGFONTSTRUCT 0x00000040L
299 #define CF_USESTYLE 0x00000080L
300 #define CF_EFFECTS 0x00000100L
301 #define CF_APPLY 0x00000200L
302 #define CF_ANSIONLY 0x00000400L
303 #define CF_SCRIPTSONLY CF_ANSIONLY
304 #define CF_NOVECTORFONTS 0x00000800L
305 #define CF_NOOEMFONTS CF_NOVECTORFONTS
306 #define CF_NOSIMULATIONS 0x00001000L
307 #define CF_LIMITSIZE 0x00002000L
308 #define CF_FIXEDPITCHONLY 0x00004000L
309 #define CF_WYSIWYG 0x00008000L /* use with CF_SCREENFONTS & CF_PRINTERFONTS */
310 #define CF_FORCEFONTEXIST 0x00010000L
311 #define CF_SCALABLEONLY 0x00020000L
312 #define CF_TTONLY 0x00040000L
313 #define CF_NOFACESEL 0x00080000L
314 #define CF_NOSTYLESEL 0x00100000L
315 #define CF_NOSIZESEL 0x00200000L
316 #define CF_SELECTSCRIPT 0x00400000L
317 #define CF_NOSCRIPTSEL 0x00800000L
318 #define CF_NOVERTFONTS 0x01000000L
320 #define SIMULATED_FONTTYPE 0x8000
321 #define PRINTER_FONTTYPE 0x4000
322 #define SCREEN_FONTTYPE 0x2000
323 #define BOLD_FONTTYPE 0x0100
324 #define ITALIC_FONTTYPE 0x0200
325 #define REGULAR_FONTTYPE 0x0400
327 #define WM_CHOOSEFONT_GETLOGFONT (WM_USER + 1)
328 #define WM_CHOOSEFONT_SETLOGFONT (WM_USER + 101)
329 #define WM_CHOOSEFONT_SETFLAGS (WM_USER + 102)
331 #define LBSELCHSTRINGA "commdlg_LBSelChangedNotify"
332 #if defined(__GNUC__)
333 # define LBSELCHSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
334 'L','B','S','e','l','C','h','a','n','g','e','d','N','o','t','i','f','y',0 }
335 #elif defined(_MSC_VER)
336 # define LBSELCHSTRINGW L"commdlg_LBSelChangedNotify"
338 static const WCHAR LBSELCHSTRINGW[] = { 'c','o','m','m','d','l','g','_',
339 'L','B','S','e','l','C','h','a','n','g','e','d','N','o','t','i','f','y',0 };
341 #define LBSELCHSTRING WINELIB_NAME_AW(LBSELCHSTRING)
343 #define SHAREVISTRINGA "commdlg_ShareViolation"
344 #if defined(__GNUC__)
345 # define SHAREVISTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
346 'S','h','a','r','e','V','i','o','l','a','t','i','o','n',0 }
347 #elif defined(_MSC_VER)
348 # define SHAREVISTRINGW L"commdlg_ShareViolation"
350 static const WCHAR SHAREVISTRINGW[] = { 'c','o','m','m','d','l','g','_',
351 'S','h','a','r','e','V','i','o','l','a','t','i','o','n',0 };
353 #define SHAREVISTRING WINELIB_NAME_AW(SHAREVISTRING)
355 #define FILEOKSTRINGA "commdlg_FileNameOK"
356 #if defined(__GNUC__)
357 # define FILEOKSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
358 'F','i','l','e','N','a','m','e','O','K',0 }
359 #elif defined(_MSC_VER)
360 # define FILEOKSTRINGW L"commdlg_FileNameOK"
362 static const WCHAR FILEOKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
363 'F','i','l','e','N','a','m','e','O','K',0 };
365 #define FILEOKSTRING WINELIB_NAME_AW(FILEOKSTRING)
367 #define COLOROKSTRINGA "commdlg_ColorOK"
368 #if defined(__GNUC__)
369 # define COLOROKSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
370 'C','o','l','o','r','O','K',0 }
371 #elif defined(_MSC_VER)
372 # define COLOROKSTRINGW L"commdlg_ColorOK"
374 static const WCHAR COLOROKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
375 'C','o','l','o','r','O','K',0 };
377 #define COLOROKSTRING WINELIB_NAME_AW(COLOROKSTRING)
379 #define SETRGBSTRINGA "commdlg_SetRGBColor"
380 #if defined(__GNUC__)
381 # define SETRGBSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
382 'S','e','t','R','G','B','C','o','l','o','r',0 }
383 #elif defined(_MSC_VER)
384 # define SETRGBSTRINGW L"commdlg_SetRGBColor"
386 static const WCHAR SETRGBSTRINGW[] = { 'c','o','m','m','d','l','g','_',
387 'S','e','t','R','G','B','C','o','l','o','r',0 };
389 #define SETRGBSTRING WINELIB_NAME_AW(SETRGBSTRING)
391 #define FINDMSGSTRINGA "commdlg_FindReplace"
392 #if defined(__GNUC__)
393 # define FINDMSGSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
394 'F','i','n','d','R','e','p','l','a','c','e',0 }
395 #elif defined(_MSC_VER)
396 # define FINDMSGSTRINGW L"commdlg_FindReplace"
398 static const WCHAR FINDMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
399 'F','i','n','d','R','e','p','l','a','c','e',0 };
401 #define FINDMSGSTRING WINELIB_NAME_AW(FINDMSGSTRING)
403 #define HELPMSGSTRINGA "commdlg_help"
404 #if defined(__GNUC__)
405 # define HELPMSGSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
407 #elif defined(_MSC_VER)
408 # define HELPMSGSTRINGW L"commdlg_help"
410 static const WCHAR HELPMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
413 #define HELPMSGSTRING WINELIB_NAME_AW(HELPMSGSTRING)
416 #define CD_LBSELNOITEMS -1
417 #define CD_LBSELCHANGE 0
418 #define CD_LBSELSUB 1
419 #define CD_LBSELADD 2
421 #define CDN_FIRST (0U-601U)
422 #define CDN_LAST (0U-699U)
424 #define CDN_INITDONE (CDN_FIRST - 0x0000)
425 #define CDN_SELCHANGE (CDN_FIRST - 0x0001)
426 #define CDN_FOLDERCHANGE (CDN_FIRST - 0x0002)
427 #define CDN_SHAREVIOLATION (CDN_FIRST - 0x0003)
428 #define CDN_HELP (CDN_FIRST - 0x0004)
429 #define CDN_FILEOK (CDN_FIRST - 0x0005)
430 #define CDN_TYPECHANGE (CDN_FIRST - 0x0006)
432 #define CDM_FIRST (WM_USER + 100)
433 #define CDM_LAST (WM_USER + 200)
435 #define CDM_GETSPEC (CDM_FIRST + 0x0000)
436 #define CDM_GETFILEPATH (CDM_FIRST + 0x0001)
437 #define CDM_GETFOLDERPATH (CDM_FIRST + 0x0002)
438 #define CDM_GETFOLDERIDLIST (CDM_FIRST + 0x0003)
439 #define CDM_SETCONTROLTEXT (CDM_FIRST + 0x0004)
440 #define CDM_HIDECONTROL (CDM_FIRST + 0x0005)
441 #define CDM_SETDEFEXT (CDM_FIRST + 0x0006)
444 /* Messages to query information from the open or save dialogs */
446 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
447 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
448 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
449 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
450 #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
452 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
453 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
454 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
455 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
456 #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
458 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
459 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
460 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
461 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
462 #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
464 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
465 (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
467 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
468 (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
470 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
471 (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
473 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
474 (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
476 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
477 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
478 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
479 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
480 #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
482 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
483 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
484 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
485 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
486 #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
488 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
489 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
490 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
491 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
492 #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
494 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
495 (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
497 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
498 (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
500 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
501 (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
503 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
504 (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
507 typedef UINT (CALLBACK *LPPRINTHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
508 typedef UINT (CALLBACK *LPSETUPHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
510 typedef struct tagPDA
525 LPPRINTHOOKPROC lpfnPrintHook;
526 LPSETUPHOOKPROC lpfnSetupHook;
527 LPCSTR lpPrintTemplateName;
528 LPCSTR lpSetupTemplateName;
529 HGLOBAL hPrintTemplate;
530 HGLOBAL hSetupTemplate;
531 } PRINTDLGA, *LPPRINTDLGA;
533 typedef struct tagPDW
548 LPPRINTHOOKPROC lpfnPrintHook;
549 LPSETUPHOOKPROC lpfnSetupHook;
550 LPCWSTR lpPrintTemplateName;
551 LPCWSTR lpSetupTemplateName;
552 HGLOBAL hPrintTemplate;
553 HGLOBAL hSetupTemplate;
554 } PRINTDLGW, *LPPRINTDLGW;
556 DECL_WINELIB_TYPE_AW(PRINTDLG)
557 DECL_WINELIB_TYPE_AW(LPPRINTDLG)
559 #define PD_ALLPAGES 0x00000000
560 #define PD_SELECTION 0x00000001
561 #define PD_PAGENUMS 0x00000002
562 #define PD_NOSELECTION 0x00000004
563 #define PD_NOPAGENUMS 0x00000008
564 #define PD_COLLATE 0x00000010
565 #define PD_PRINTTOFILE 0x00000020
566 #define PD_PRINTSETUP 0x00000040
567 #define PD_NOWARNING 0x00000080
568 #define PD_RETURNDC 0x00000100
569 #define PD_RETURNIC 0x00000200
570 #define PD_RETURNDEFAULT 0x00000400
571 #define PD_SHOWHELP 0x00000800
572 #define PD_ENABLEPRINTHOOK 0x00001000
573 #define PD_ENABLESETUPHOOK 0x00002000
574 #define PD_ENABLEPRINTTEMPLATE 0x00004000
575 #define PD_ENABLESETUPTEMPLATE 0x00008000
576 #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
577 #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
578 #define PD_USEDEVMODECOPIES 0x00040000
579 #define PD_USEDEVMODECOPIESANDCOLLATE 0x00040000
580 #define PD_DISABLEPRINTTOFILE 0x00080000
581 #define PD_HIDEPRINTTOFILE 0x00100000
582 #define PD_NONETWORKBUTTON 0x00200000
583 #define PD_CURRENTPAGE 0x00400000
584 #define PD_NOCURRENTPAGE 0x00800000
585 #define PD_EXCLUSIONFLAGS 0x01000000
586 #define PD_USELARGETEMPLATE 0x10000000
589 #define PD_EXCL_COPIESANDCOLLATE (DM_COPIES | DM_COLLATE)
591 #define START_PAGE_GENERAL 0xffffffff
593 #define PD_RESULT_CANCEL 0
594 #define PD_RESULT_PRINT 1
595 #define PD_RESULT_APPLY 2
604 typedef DEVNAMES * LPDEVNAMES;
606 #define DN_DEFAULTPRN 0x0001
608 /* PageSetupDlg stuff ... */
609 #define WM_PSD_PAGESETUPDLG (WM_USER )
610 #define WM_PSD_FULLPAGERECT (WM_USER+1)
611 #define WM_PSD_MINMARGINRECT (WM_USER+2)
612 #define WM_PSD_MARGINRECT (WM_USER+3)
613 #define WM_PSD_GREEKTEXTRECT (WM_USER+4)
614 #define WM_PSD_ENVSTAMPRECT (WM_USER+5)
615 #define WM_PSD_YAFULLPAGERECT (WM_USER+6)
617 typedef UINT (CALLBACK *LPPAGEPAINTHOOK)( HWND, UINT, WPARAM, LPARAM );
618 typedef UINT (CALLBACK *LPPAGESETUPHOOK)( HWND, UINT, WPARAM, LPARAM );
620 typedef struct tagPSDA
632 LPPAGESETUPHOOK lpfnPageSetupHook;
633 LPPAGEPAINTHOOK lpfnPagePaintHook;
634 LPCSTR lpPageSetupTemplateName;
635 HGLOBAL hPageSetupTemplate;
636 } PAGESETUPDLGA,*LPPAGESETUPDLGA;
638 typedef struct tagPSDW
650 LPPAGESETUPHOOK lpfnPageSetupHook;
651 LPPAGEPAINTHOOK lpfnPagePaintHook;
652 LPCWSTR lpPageSetupTemplateName;
653 HGLOBAL hPageSetupTemplate;
654 } PAGESETUPDLGW,*LPPAGESETUPDLGW;
655 DECL_WINELIB_TYPE_AW(PAGESETUPDLG)
656 DECL_WINELIB_TYPE_AW(LPPAGESETUPDLG)
658 #define PSD_DEFAULTMINMARGINS 0x00000000
659 #define PSD_INWININIINTLMEASURE 0x00000000
661 #define PSD_MINMARGINS 0x00000001
662 #define PSD_MARGINS 0x00000002
663 #define PSD_INTHOUSANDTHSOFINCHES 0x00000004
664 #define PSD_INHUNDREDTHSOFMILLIMETERS 0x00000008
665 #define PSD_DISABLEMARGINS 0x00000010
666 #define PSD_DISABLEPRINTER 0x00000020
667 #define PSD_NOWARNING 0x00000080
668 #define PSD_DISABLEORIENTATION 0x00000100
669 #define PSD_RETURNDEFAULT 0x00000400
670 #define PSD_DISABLEPAPER 0x00000200
671 #define PSD_SHOWHELP 0x00000800
672 #define PSD_ENABLEPAGESETUPHOOK 0x00002000
673 #define PSD_ENABLEPAGESETUPTEMPLATE 0x00008000
674 #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x00020000
675 #define PSD_ENABLEPAGEPAINTHOOK 0x00040000
676 #define PSD_DISABLEPAGEPAINTING 0x00080000
677 #define PSD_NONETWORKBUTTON 0x00200000
679 typedef struct tagPRINTPAGERANGE
683 } PRINTPAGERANGE, *LPPRINTPAGERANGE;
685 typedef struct tagPDEXA
694 DWORD ExclusionFlags;
696 DWORD nMaxPageRanges;
697 LPPRINTPAGERANGE lpPageRanges;
702 LPCSTR lpPrintTemplateName;
703 void* /*LPUNKNOWN*/ lpCallback;
704 DWORD nPropertyPages;
705 HPROPSHEETPAGE* lphPropertyPages;
707 DWORD dwResultAction;
708 } PRINTDLGEXA, *LPPRINTDLGEXA;
710 typedef struct tagPDEXW
719 DWORD ExclusionFlags;
721 DWORD nMaxPageRanges;
722 LPPRINTPAGERANGE lpPageRanges;
727 LPCWSTR lpPrintTemplateName;
728 void* /*LPUNKNOWN*/ lpCallback;
729 DWORD nPropertyPages;
730 HPROPSHEETPAGE* lphPropertyPages;
732 DWORD dwResultAction;
733 } PRINTDLGEXW, *LPPRINTDLGEXW;
735 DECL_WINELIB_TYPE_AW(PRINTDLGEX)
736 DECL_WINELIB_TYPE_AW(LPPRINTDLGEX)
738 BOOL WINAPI ChooseColorA(LPCHOOSECOLORA lpChCol);
739 BOOL WINAPI ChooseColorW(LPCHOOSECOLORW lpChCol);
740 #define ChooseColor WINELIB_NAME_AW(ChooseColor)
741 DWORD WINAPI CommDlgExtendedError(void);
742 HWND WINAPI FindTextA(LPFINDREPLACEA lpFind);
743 HWND WINAPI FindTextW(LPFINDREPLACEW lpFind);
744 #define FindText WINELIB_NAME_AW(FindText)
745 short WINAPI GetFileTitleA(LPCSTR lpFile, LPSTR lpTitle, WORD cbBuf);
746 short WINAPI GetFileTitleW(LPCWSTR lpFile, LPWSTR lpTitle, WORD cbBuf);
747 #define GetFileTitle WINELIB_NAME_AW(GetFileTitle)
748 BOOL WINAPI GetOpenFileNameA(LPOPENFILENAMEA ofn);
749 BOOL WINAPI GetOpenFileNameW(LPOPENFILENAMEW ofn);
750 #define GetOpenFileName WINELIB_NAME_AW(GetOpenFileName)
751 BOOL WINAPI GetSaveFileNameA(LPOPENFILENAMEA ofn);
752 BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn);
753 #define GetSaveFileName WINELIB_NAME_AW(GetSaveFileName)
754 BOOL WINAPI PageSetupDlgA( LPPAGESETUPDLGA );
755 BOOL WINAPI PageSetupDlgW( LPPAGESETUPDLGW );
756 #define PageSetupDlg WINELIB_NAME_AW(PageSetupDlg)
757 BOOL WINAPI PrintDlgA( LPPRINTDLGA printdlg);
758 BOOL WINAPI PrintDlgW( LPPRINTDLGW printdlg);
759 #define PrintDlg WINELIB_NAME_AW(PrintDlg)
760 HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA);
761 HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW);
762 #define PrintDlgEx WINELIB_NAME_AW(PrintDlgEx)
763 HWND WINAPI ReplaceTextA( LPFINDREPLACEA lpFind);
764 HWND WINAPI ReplaceTextW( LPFINDREPLACEW lpFind);
765 #define ReplaceText WINELIB_NAME_AW(ReplaceText)
766 BOOL WINAPI ChooseFontA(LPCHOOSEFONTA);
767 BOOL WINAPI ChooseFontW(LPCHOOSEFONTW);
768 #define ChooseFont WINELIB_NAME_AW(ChooseFont)
770 void COMDLG32_SetCommDlgExtendedError(DWORD err);
779 #endif /* __WINE_COMMDLG_H */