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_EX_NOPLACESBAR 0x00000001
70 #define OFN_SHAREFALLTHROUGH 2
71 #define OFN_SHARENOWARN 1
72 #define OFN_SHAREWARN 0
77 typedef UINT_PTR (CALLBACK
*LPOFNHOOKPROC
)(HWND
,UINT
,WPARAM
,LPARAM
);
79 typedef struct tagOFNA
{
84 LPSTR lpstrCustomFilter
;
91 LPCSTR lpstrInitialDir
;
98 LPOFNHOOKPROC lpfnHook
;
99 LPCSTR lpTemplateName
;
103 } OPENFILENAMEA
,*LPOPENFILENAMEA
;
105 typedef struct tagOFNW
{
110 LPWSTR lpstrCustomFilter
;
111 DWORD nMaxCustFilter
;
115 LPWSTR lpstrFileTitle
;
117 LPCWSTR lpstrInitialDir
;
124 LPOFNHOOKPROC lpfnHook
;
125 LPCWSTR lpTemplateName
;
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))
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)
146 LPOPENFILENAMEA lpOFN
;
148 } OFNOTIFYA
, *LPOFNOTIFYA
;
153 LPOPENFILENAMEW lpOFN
;
155 } OFNOTIFYW
, *LPOFNOTIFYW
;
157 DECL_WINELIB_TYPE_AW(OFNOTIFY
)
158 DECL_WINELIB_TYPE_AW(LPOFNOTIFY
)
160 typedef struct _OFNOTIFYEXA
163 LPOPENFILENAMEA lpOFN
;
166 } OFNOTIFYEXA
, *LPOFNOTIFYEXA
;
168 typedef struct _OFNOTIFYEXW
171 LPOPENFILENAMEW lpOFN
;
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
);
184 HWND hInstance
; /* Should be an HINSTANCE but MS made a typo */
186 COLORREF
*lpCustColors
;
189 LPCCHOOKPROC lpfnHook
;
190 LPCSTR lpTemplateName
;
192 typedef CHOOSECOLORA
*LPCHOOSECOLORA
;
197 HWND hInstance
; /* Should be an HINSTANCE but MS made a typo */
199 COLORREF
*lpCustColors
;
202 LPCCHOOKPROC lpfnHook
;
203 LPCWSTR lpTemplateName
;
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
);
229 LPSTR lpstrReplaceWith
;
231 WORD wReplaceWithLen
;
233 LPFRHOOKPROC lpfnHook
;
234 LPCSTR lpTemplateName
;
235 } FINDREPLACEA
, *LPFINDREPLACEA
;
242 LPWSTR lpstrFindWhat
;
243 LPWSTR lpstrReplaceWith
;
245 WORD wReplaceWithLen
;
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
282 LPLOGFONTA lpLogFont
;
287 LPCFHOOKPROC lpfnHook
;
288 LPCSTR lpTemplateName
;
292 WORD ___MISSING_ALIGNMENT__
;
295 } CHOOSEFONTA
, *LPCHOOSEFONTA
;
297 typedef struct tagCHOOSEFONTW
302 LPLOGFONTW lpLogFont
;
307 LPCFHOOKPROC lpfnHook
;
308 LPCWSTR lpTemplateName
;
312 WORD ___MISSING_ALIGNMENT__
;
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"
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 };
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"
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 };
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"
391 static const WCHAR FILEOKSTRINGW
[] = { 'c','o','m','m','d','l','g','_',
392 'F','i','l','e','N','a','m','e','O','K',0 };
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"
403 static const WCHAR COLOROKSTRINGW
[] = { 'c','o','m','m','d','l','g','_',
404 'C','o','l','o','r','O','K',0 };
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"
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 };
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"
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 };
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','_', \
436 #elif defined(_MSC_VER)
437 # define HELPMSGSTRINGW L"commdlg_help"
439 static const WCHAR HELPMSGSTRINGW
[] = { 'c','o','m','m','d','l','g','_',
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
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
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
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
661 LPPAGESETUPHOOK lpfnPageSetupHook
;
662 LPPAGEPAINTHOOK lpfnPagePaintHook
;
663 LPCSTR lpPageSetupTemplateName
;
664 HGLOBAL hPageSetupTemplate
;
665 } PAGESETUPDLGA
,*LPPAGESETUPDLGA
;
667 typedef struct tagPSDW
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
712 } PRINTPAGERANGE
, *LPPRINTPAGERANGE
;
714 typedef struct tagPDEXA
723 DWORD ExclusionFlags
;
725 DWORD nMaxPageRanges
;
726 LPPRINTPAGERANGE lpPageRanges
;
731 LPCSTR lpPrintTemplateName
;
732 void* /*LPUNKNOWN*/ lpCallback
;
733 DWORD nPropertyPages
;
734 HPROPSHEETPAGE
* lphPropertyPages
;
736 DWORD dwResultAction
;
737 } PRINTDLGEXA
, *LPPRINTDLGEXA
;
739 typedef struct tagPDEXW
748 DWORD ExclusionFlags
;
750 DWORD nMaxPageRanges
;
751 LPPRINTPAGERANGE lpPageRanges
;
756 LPCWSTR lpPrintTemplateName
;
757 void* /*LPUNKNOWN*/ lpCallback
;
758 DWORD nPropertyPages
;
759 HPROPSHEETPAGE
* lphPropertyPages
;
761 DWORD dwResultAction
;
762 } PRINTDLGEXW
, *LPPRINTDLGEXW
;
764 DECL_WINELIB_TYPE_AW(PRINTDLGEX
)
765 DECL_WINELIB_TYPE_AW(LPPRINTDLGEX
)
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
;
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
;
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
);
844 #endif /* __WINE_COMMDLG_H */