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
35 #define SNDMSG ::SendMessage
36 #else /* __cplusplus */
37 #define SNDMSG SendMessage
38 #endif /* __cplusplus */
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
75 typedef UINT (CALLBACK *LPOFNHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
77 typedef struct tagOFNA {
82 LPSTR lpstrCustomFilter;
89 LPCSTR lpstrInitialDir;
96 LPOFNHOOKPROC lpfnHook;
97 LPCSTR lpTemplateName;
98 } OPENFILENAMEA,*LPOPENFILENAMEA;
100 typedef struct tagOFNW {
105 LPWSTR lpstrCustomFilter;
106 DWORD nMaxCustFilter;
110 LPWSTR lpstrFileTitle;
112 LPCWSTR lpstrInitialDir;
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))
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)
138 LPOPENFILENAMEA lpOFN;
140 } OFNOTIFYA, *LPOFNOTIFYA;
145 LPOPENFILENAMEW lpOFN;
147 } OFNOTIFYW, *LPOFNOTIFYW;
149 DECL_WINELIB_TYPE_AW(OFNOTIFY)
150 DECL_WINELIB_TYPE_AW(LPOFNOTIFY)
152 typedef UINT (CALLBACK *LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
157 HWND hInstance; /* Should be an HINSTANCE but MS made a typo */
159 LPDWORD lpCustColors;
162 LPCCHOOKPROC lpfnHook;
163 LPCSTR lpTemplateName;
165 typedef CHOOSECOLORA *LPCHOOSECOLORA;
170 HWND hInstance; /* Should be an HINSTANCE but MS made a typo */
172 LPDWORD lpCustColors;
175 LPCCHOOKPROC lpfnHook;
176 LPCWSTR lpTemplateName;
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);
202 LPSTR lpstrReplaceWith;
204 WORD wReplaceWithLen;
206 LPFRHOOKPROC lpfnHook;
207 LPCSTR lpTemplateName;
208 } FINDREPLACEA, *LPFINDREPLACEA;
215 LPWSTR lpstrFindWhat;
216 LPWSTR lpstrReplaceWith;
218 WORD wReplaceWithLen;
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
255 LPLOGFONTA lpLogFont;
260 LPCFHOOKPROC lpfnHook;
261 LPCSTR lpTemplateName;
265 WORD ___MISSING_ALIGNMENT__;
268 } CHOOSEFONTA, *LPCHOOSEFONTA;
270 typedef struct tagCHOOSEFONTW
275 LPLOGFONTW lpLogFont;
280 LPCFHOOKPROC lpfnHook;
281 LPCWSTR lpTemplateName;
285 WORD ___MISSING_ALIGNMENT__;
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"
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 };
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"
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 };
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"
364 static const WCHAR FILEOKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
365 'F','i','l','e','N','a','m','e','O','K',0 };
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"
376 static const WCHAR COLOROKSTRINGW[] = { 'c','o','m','m','d','l','g','_',
377 'C','o','l','o','r','O','K',0 };
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"
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 };
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"
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 };
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','_', \
409 #elif defined(_MSC_VER)
410 # define HELPMSGSTRINGW L"commdlg_help"
412 static const WCHAR HELPMSGSTRINGW[] = { 'c','o','m','m','d','l','g','_',
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
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
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
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
634 LPPAGESETUPHOOK lpfnPageSetupHook;
635 LPPAGEPAINTHOOK lpfnPagePaintHook;
636 LPCSTR lpPageSetupTemplateName;
637 HGLOBAL hPageSetupTemplate;
638 } PAGESETUPDLGA,*LPPAGESETUPDLGA;
640 typedef struct tagPSDW
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
685 } PRINTPAGERANGE, *LPPRINTPAGERANGE;
687 typedef struct tagPDEXA
696 DWORD ExclusionFlags;
698 DWORD nMaxPageRanges;
699 LPPRINTPAGERANGE lpPageRanges;
704 LPCSTR lpPrintTemplateName;
705 void* /*LPUNKNOWN*/ lpCallback;
706 DWORD nPropertyPages;
707 HPROPSHEETPAGE* lphPropertyPages;
709 DWORD dwResultAction;
710 } PRINTDLGEXA, *LPPRINTDLGEXA;
712 typedef struct tagPDEXW
721 DWORD ExclusionFlags;
723 DWORD nMaxPageRanges;
724 LPPRINTPAGERANGE lpPageRanges;
729 LPCWSTR lpPrintTemplateName;
730 void* /*LPUNKNOWN*/ lpCallback;
731 DWORD nPropertyPages;
732 HPROPSHEETPAGE* lphPropertyPages;
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);
783 #endif /* __WINE_COMMDLG_H */