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_PTR (CALLBACK
*LPOFNHOOKPROC
)(HWND
,UINT
,WPARAM
,LPARAM
);
77 typedef struct tagOFNA
{
82 LPSTR lpstrCustomFilter
;
89 LPCSTR lpstrInitialDir
;
96 LPOFNHOOKPROC lpfnHook
;
97 LPCSTR lpTemplateName
;
101 } OPENFILENAMEA
,*LPOPENFILENAMEA
;
103 typedef struct tagOFNW
{
108 LPWSTR lpstrCustomFilter
;
109 DWORD nMaxCustFilter
;
113 LPWSTR lpstrFileTitle
;
115 LPCWSTR lpstrInitialDir
;
122 LPOFNHOOKPROC lpfnHook
;
123 LPCWSTR lpTemplateName
;
127 } OPENFILENAMEW
,*LPOPENFILENAMEW
;
129 DECL_WINELIB_TYPE_AW(OPENFILENAME
)
130 DECL_WINELIB_TYPE_AW(LPOPENFILENAME
)
132 #ifndef CDSIZEOF_STRUCT
133 #define CDSIZEOF_STRUCT(type,field) ((INT_PTR)&(((type *)0)->field) + sizeof(((type*)0)->field))
136 #define OPENFILENAME_SIZE_VERSION_400A CDSIZEOF_STRUCT(OPENFILENAMEA,lpTemplateName)
137 #define OPENFILENAME_SIZE_VERSION_400W CDSIZEOF_STRUCT(OPENFILENAMEW,lpTemplateName)
138 #define OPENFILENAME_SIZE_VERSION_400 WINELIB_NAME_AW(OPENFILENAME_SIZE_VERSION_400)
144 LPOPENFILENAMEA lpOFN
;
146 } OFNOTIFYA
, *LPOFNOTIFYA
;
151 LPOPENFILENAMEW lpOFN
;
153 } OFNOTIFYW
, *LPOFNOTIFYW
;
155 DECL_WINELIB_TYPE_AW(OFNOTIFY
)
156 DECL_WINELIB_TYPE_AW(LPOFNOTIFY
)
158 typedef struct _OFNOTIFYEXA
161 LPOPENFILENAMEA lpOFN
;
164 } OFNOTIFYEXA
, *LPOFNOTIFYEXA
;
166 typedef struct _OFNOTIFYEXW
169 LPOPENFILENAMEW lpOFN
;
172 } OFNOTIFYEXW
, *LPOFNOTIFYEXW
;
174 DECL_WINELIB_TYPE_AW(OFNOTIFYEX
)
175 DECL_WINELIB_TYPE_AW(LPOFNOTIFYEX
)
177 typedef UINT_PTR (CALLBACK
*LPCCHOOKPROC
) (HWND
, UINT
, WPARAM
, LPARAM
);
182 HWND hInstance
; /* Should be an HINSTANCE but MS made a typo */
184 LPDWORD lpCustColors
;
187 LPCCHOOKPROC lpfnHook
;
188 LPCSTR lpTemplateName
;
190 typedef CHOOSECOLORA
*LPCHOOSECOLORA
;
195 HWND hInstance
; /* Should be an HINSTANCE but MS made a typo */
197 LPDWORD lpCustColors
;
200 LPCCHOOKPROC lpfnHook
;
201 LPCWSTR lpTemplateName
;
203 typedef CHOOSECOLORW
*LPCHOOSECOLORW
;
205 DECL_WINELIB_TYPE_AW(CHOOSECOLOR
)
206 DECL_WINELIB_TYPE_AW(LPCHOOSECOLOR
)
209 #define CC_RGBINIT 0x00000001
210 #define CC_FULLOPEN 0x00000002
211 #define CC_PREVENTFULLOPEN 0x00000004
212 #define CC_SHOWHELP 0x00000008
213 #define CC_ENABLEHOOK 0x00000010
214 #define CC_ENABLETEMPLATE 0x00000020
215 #define CC_ENABLETEMPLATEHANDLE 0x00000040
216 #define CC_SOLIDCOLOR 0x00000080
217 #define CC_ANYCOLOR 0x00000100
219 typedef UINT_PTR (CALLBACK
*LPFRHOOKPROC
)(HWND
,UINT
,WPARAM
,LPARAM
);
227 LPSTR lpstrReplaceWith
;
229 WORD wReplaceWithLen
;
231 LPFRHOOKPROC lpfnHook
;
232 LPCSTR lpTemplateName
;
233 } FINDREPLACEA
, *LPFINDREPLACEA
;
240 LPWSTR lpstrFindWhat
;
241 LPWSTR lpstrReplaceWith
;
243 WORD wReplaceWithLen
;
245 LPFRHOOKPROC lpfnHook
;
246 LPCWSTR lpTemplateName
;
247 } FINDREPLACEW
, *LPFINDREPLACEW
;
249 DECL_WINELIB_TYPE_AW(FINDREPLACE
)
250 DECL_WINELIB_TYPE_AW(LPFINDREPLACE
)
252 #define FR_DOWN 0x00000001
253 #define FR_WHOLEWORD 0x00000002
254 #define FR_MATCHCASE 0x00000004
255 #define FR_FINDNEXT 0x00000008
256 #define FR_REPLACE 0x00000010
257 #define FR_REPLACEALL 0x00000020
258 #define FR_DIALOGTERM 0x00000040
259 #define FR_SHOWHELP 0x00000080
260 #define FR_ENABLEHOOK 0x00000100
261 #define FR_ENABLETEMPLATE 0x00000200
262 #define FR_NOUPDOWN 0x00000400
263 #define FR_NOMATCHCASE 0x00000800
264 #define FR_NOWHOLEWORD 0x00001000
265 #define FR_ENABLETEMPLATEHANDLE 0x00002000
266 #define FR_HIDEUPDOWN 0x00004000
267 #define FR_HIDEMATCHCASE 0x00008000
268 #define FR_HIDEWHOLEWORD 0x00010000
269 #define FR_MATCHDIAC 0x20000000
270 #define FR_MATCHKASHIDA 0x40000000
271 #define FR_MATCHALEFHAMZA 0x80000000
273 typedef UINT_PTR (CALLBACK
*LPCFHOOKPROC
)(HWND
,UINT
,WPARAM
,LPARAM
);
275 typedef struct tagCHOOSEFONTA
280 LPLOGFONTA lpLogFont
;
285 LPCFHOOKPROC lpfnHook
;
286 LPCSTR lpTemplateName
;
290 WORD ___MISSING_ALIGNMENT__
;
293 } CHOOSEFONTA
, *LPCHOOSEFONTA
;
295 typedef struct tagCHOOSEFONTW
300 LPLOGFONTW lpLogFont
;
305 LPCFHOOKPROC lpfnHook
;
306 LPCWSTR lpTemplateName
;
310 WORD ___MISSING_ALIGNMENT__
;
313 } CHOOSEFONTW
, *LPCHOOSEFONTW
;
315 DECL_WINELIB_TYPE_AW(CHOOSEFONT
)
316 DECL_WINELIB_TYPE_AW(LPCHOOSEFONT
)
318 #define CF_SCREENFONTS 0x00000001
319 #define CF_PRINTERFONTS 0x00000002
320 #define CF_BOTH (CF_SCREENFONTS | CF_PRINTERFONTS)
321 #define CF_SHOWHELP __MSABI_LONG(0x00000004)
322 #define CF_ENABLEHOOK __MSABI_LONG(0x00000008)
323 #define CF_ENABLETEMPLATE __MSABI_LONG(0x00000010)
324 #define CF_ENABLETEMPLATEHANDLE __MSABI_LONG(0x00000020)
325 #define CF_INITTOLOGFONTSTRUCT __MSABI_LONG(0x00000040)
326 #define CF_USESTYLE __MSABI_LONG(0x00000080)
327 #define CF_EFFECTS __MSABI_LONG(0x00000100)
328 #define CF_APPLY __MSABI_LONG(0x00000200)
329 #define CF_ANSIONLY __MSABI_LONG(0x00000400)
330 #define CF_SCRIPTSONLY CF_ANSIONLY
331 #define CF_NOVECTORFONTS __MSABI_LONG(0x00000800)
332 #define CF_NOOEMFONTS CF_NOVECTORFONTS
333 #define CF_NOSIMULATIONS __MSABI_LONG(0x00001000)
334 #define CF_LIMITSIZE __MSABI_LONG(0x00002000)
335 #define CF_FIXEDPITCHONLY __MSABI_LONG(0x00004000)
336 #define CF_WYSIWYG __MSABI_LONG(0x00008000) /* use with CF_SCREENFONTS & CF_PRINTERFONTS */
337 #define CF_FORCEFONTEXIST __MSABI_LONG(0x00010000)
338 #define CF_SCALABLEONLY __MSABI_LONG(0x00020000)
339 #define CF_TTONLY __MSABI_LONG(0x00040000)
340 #define CF_NOFACESEL __MSABI_LONG(0x00080000)
341 #define CF_NOSTYLESEL __MSABI_LONG(0x00100000)
342 #define CF_NOSIZESEL __MSABI_LONG(0x00200000)
343 #define CF_SELECTSCRIPT __MSABI_LONG(0x00400000)
344 #define CF_NOSCRIPTSEL __MSABI_LONG(0x00800000)
345 #define CF_NOVERTFONTS __MSABI_LONG(0x01000000)
347 #define SIMULATED_FONTTYPE 0x8000
348 #define PRINTER_FONTTYPE 0x4000
349 #define SCREEN_FONTTYPE 0x2000
350 #define BOLD_FONTTYPE 0x0100
351 #define ITALIC_FONTTYPE 0x0200
352 #define REGULAR_FONTTYPE 0x0400
354 #define WM_CHOOSEFONT_GETLOGFONT (WM_USER + 1)
355 #define WM_CHOOSEFONT_SETLOGFONT (WM_USER + 101)
356 #define WM_CHOOSEFONT_SETFLAGS (WM_USER + 102)
358 #define LBSELCHSTRINGA "commdlg_LBSelChangedNotify"
359 #if defined(__GNUC__)
360 # define LBSELCHSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
361 'L','B','S','e','l','C','h','a','n','g','e','d','N','o','t','i','f','y',0 }
362 #elif defined(_MSC_VER)
363 # define LBSELCHSTRINGW L"commdlg_LBSelChangedNotify"
365 static const WCHAR LBSELCHSTRINGW
[] = { 'c','o','m','m','d','l','g','_',
366 'L','B','S','e','l','C','h','a','n','g','e','d','N','o','t','i','f','y',0 };
368 #define LBSELCHSTRING WINELIB_NAME_AW(LBSELCHSTRING)
370 #define SHAREVISTRINGA "commdlg_ShareViolation"
371 #if defined(__GNUC__)
372 # define SHAREVISTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
373 'S','h','a','r','e','V','i','o','l','a','t','i','o','n',0 }
374 #elif defined(_MSC_VER)
375 # define SHAREVISTRINGW L"commdlg_ShareViolation"
377 static const WCHAR SHAREVISTRINGW
[] = { 'c','o','m','m','d','l','g','_',
378 'S','h','a','r','e','V','i','o','l','a','t','i','o','n',0 };
380 #define SHAREVISTRING WINELIB_NAME_AW(SHAREVISTRING)
382 #define FILEOKSTRINGA "commdlg_FileNameOK"
383 #if defined(__GNUC__)
384 # define FILEOKSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
385 'F','i','l','e','N','a','m','e','O','K',0 }
386 #elif defined(_MSC_VER)
387 # define FILEOKSTRINGW L"commdlg_FileNameOK"
389 static const WCHAR FILEOKSTRINGW
[] = { 'c','o','m','m','d','l','g','_',
390 'F','i','l','e','N','a','m','e','O','K',0 };
392 #define FILEOKSTRING WINELIB_NAME_AW(FILEOKSTRING)
394 #define COLOROKSTRINGA "commdlg_ColorOK"
395 #if defined(__GNUC__)
396 # define COLOROKSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
397 'C','o','l','o','r','O','K',0 }
398 #elif defined(_MSC_VER)
399 # define COLOROKSTRINGW L"commdlg_ColorOK"
401 static const WCHAR COLOROKSTRINGW
[] = { 'c','o','m','m','d','l','g','_',
402 'C','o','l','o','r','O','K',0 };
404 #define COLOROKSTRING WINELIB_NAME_AW(COLOROKSTRING)
406 #define SETRGBSTRINGA "commdlg_SetRGBColor"
407 #if defined(__GNUC__)
408 # define SETRGBSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
409 'S','e','t','R','G','B','C','o','l','o','r',0 }
410 #elif defined(_MSC_VER)
411 # define SETRGBSTRINGW L"commdlg_SetRGBColor"
413 static const WCHAR SETRGBSTRINGW
[] = { 'c','o','m','m','d','l','g','_',
414 'S','e','t','R','G','B','C','o','l','o','r',0 };
416 #define SETRGBSTRING WINELIB_NAME_AW(SETRGBSTRING)
418 #define FINDMSGSTRINGA "commdlg_FindReplace"
419 #if defined(__GNUC__)
420 # define FINDMSGSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
421 'F','i','n','d','R','e','p','l','a','c','e',0 }
422 #elif defined(_MSC_VER)
423 # define FINDMSGSTRINGW L"commdlg_FindReplace"
425 static const WCHAR FINDMSGSTRINGW
[] = { 'c','o','m','m','d','l','g','_',
426 'F','i','n','d','R','e','p','l','a','c','e',0 };
428 #define FINDMSGSTRING WINELIB_NAME_AW(FINDMSGSTRING)
430 #define HELPMSGSTRINGA "commdlg_help"
431 #if defined(__GNUC__)
432 # define HELPMSGSTRINGW (const WCHAR []){ 'c','o','m','m','d','l','g','_', \
434 #elif defined(_MSC_VER)
435 # define HELPMSGSTRINGW L"commdlg_help"
437 static const WCHAR HELPMSGSTRINGW
[] = { 'c','o','m','m','d','l','g','_',
440 #define HELPMSGSTRING WINELIB_NAME_AW(HELPMSGSTRING)
442 #define CD_LBSELNOITEMS -1
443 #define CD_LBSELCHANGE 0
444 #define CD_LBSELSUB 1
445 #define CD_LBSELADD 2
447 #define CDN_FIRST (0U-601U)
448 #define CDN_LAST (0U-699U)
450 #define CDN_INITDONE (CDN_FIRST - 0x0000)
451 #define CDN_SELCHANGE (CDN_FIRST - 0x0001)
452 #define CDN_FOLDERCHANGE (CDN_FIRST - 0x0002)
453 #define CDN_SHAREVIOLATION (CDN_FIRST - 0x0003)
454 #define CDN_HELP (CDN_FIRST - 0x0004)
455 #define CDN_FILEOK (CDN_FIRST - 0x0005)
456 #define CDN_TYPECHANGE (CDN_FIRST - 0x0006)
457 #define CDN_INCLUDEITEM (CDN_FIRST - 0x0007)
459 #define CDM_FIRST (WM_USER + 100)
460 #define CDM_LAST (WM_USER + 200)
462 #define CDM_GETSPEC (CDM_FIRST + 0x0000)
463 #define CDM_GETFILEPATH (CDM_FIRST + 0x0001)
464 #define CDM_GETFOLDERPATH (CDM_FIRST + 0x0002)
465 #define CDM_GETFOLDERIDLIST (CDM_FIRST + 0x0003)
466 #define CDM_SETCONTROLTEXT (CDM_FIRST + 0x0004)
467 #define CDM_HIDECONTROL (CDM_FIRST + 0x0005)
468 #define CDM_SETDEFEXT (CDM_FIRST + 0x0006)
471 /* Messages to query information from the open or save dialogs */
473 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
474 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
475 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
476 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
477 #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
479 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
480 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
481 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
482 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
483 #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
485 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
486 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
487 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
488 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
489 #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
491 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
492 (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
494 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
495 (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
497 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
498 (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
500 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
501 (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
503 #define CommDlg_OpenSave_GetSpecA(_hdlg, _psz, _cbmax) \
504 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
505 #define CommDlg_OpenSave_GetSpecW(_hdlg, _psz, _cbmax) \
506 (int)SNDMSG(_hdlg, CDM_GETSPEC, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
507 #define CommDlg_OpenSave_GetSpec WINELIB_NAME_AW(CommDlg_OpenSave_GetSpec)
509 #define CommDlg_OpenSave_GetFilePathA(_hdlg, _psz, _cbmax) \
510 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
511 #define CommDlg_OpenSave_GetFilePathW(_hdlg, _psz, _cbmax) \
512 (int)SNDMSG(_hdlg, CDM_GETFILEPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
513 #define CommDlg_OpenSave_GetFilePath WINELIB_NAME_AW(CommDlg_OpenSave_GetFilePath)
515 #define CommDlg_OpenSave_GetFolderPathA(_hdlg, _psz, _cbmax) \
516 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPSTR)_psz)
517 #define CommDlg_OpenSave_GetFolderPathW(_hdlg, _psz, _cbmax) \
518 (int)SNDMSG(_hdlg, CDM_GETFOLDERPATH, (WPARAM)_cbmax, (LPARAM)(LPWSTR)_psz)
519 #define CommDlg_OpenSave_GetFolderPath WINELIB_NAME_AW(CommDlg_OpenSave_GetFolderPath)
521 #define CommDlg_OpenSave_GetFolderIDList(_hdlg, _pidl, _cbmax) \
522 (int)SNDMSG(_hdlg, CDM_GETFOLDERIDLIST, (WPARAM)_cbmax, (LPARAM)(LPVOID)_pidl)
524 #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
525 (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
527 #define CommDlg_OpenSave_HideControl(_hdlg, _id) \
528 (void)SNDMSG(_hdlg, CDM_HIDECONTROL, (WPARAM)_id, 0)
530 #define CommDlg_OpenSave_SetDefExt(_hdlg, _pszext) \
531 (void)SNDMSG(_hdlg, CDM_SETDEFEXT, 0, (LPARAM)(LPSTR)_pszext)
534 typedef UINT_PTR (CALLBACK
*LPPRINTHOOKPROC
) (HWND
, UINT
, WPARAM
, LPARAM
);
535 typedef UINT_PTR (CALLBACK
*LPSETUPHOOKPROC
) (HWND
, UINT
, WPARAM
, LPARAM
);
537 typedef struct tagPDA
552 LPPRINTHOOKPROC lpfnPrintHook
;
553 LPSETUPHOOKPROC lpfnSetupHook
;
554 LPCSTR lpPrintTemplateName
;
555 LPCSTR lpSetupTemplateName
;
556 HGLOBAL hPrintTemplate
;
557 HGLOBAL hSetupTemplate
;
558 } PRINTDLGA
, *LPPRINTDLGA
;
560 typedef struct tagPDW
575 LPPRINTHOOKPROC lpfnPrintHook
;
576 LPSETUPHOOKPROC lpfnSetupHook
;
577 LPCWSTR lpPrintTemplateName
;
578 LPCWSTR lpSetupTemplateName
;
579 HGLOBAL hPrintTemplate
;
580 HGLOBAL hSetupTemplate
;
581 } PRINTDLGW
, *LPPRINTDLGW
;
583 DECL_WINELIB_TYPE_AW(PRINTDLG
)
584 DECL_WINELIB_TYPE_AW(LPPRINTDLG
)
586 #define PD_ALLPAGES 0x00000000
587 #define PD_SELECTION 0x00000001
588 #define PD_PAGENUMS 0x00000002
589 #define PD_NOSELECTION 0x00000004
590 #define PD_NOPAGENUMS 0x00000008
591 #define PD_COLLATE 0x00000010
592 #define PD_PRINTTOFILE 0x00000020
593 #define PD_PRINTSETUP 0x00000040
594 #define PD_NOWARNING 0x00000080
595 #define PD_RETURNDC 0x00000100
596 #define PD_RETURNIC 0x00000200
597 #define PD_RETURNDEFAULT 0x00000400
598 #define PD_SHOWHELP 0x00000800
599 #define PD_ENABLEPRINTHOOK 0x00001000
600 #define PD_ENABLESETUPHOOK 0x00002000
601 #define PD_ENABLEPRINTTEMPLATE 0x00004000
602 #define PD_ENABLESETUPTEMPLATE 0x00008000
603 #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
604 #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
605 #define PD_USEDEVMODECOPIES 0x00040000
606 #define PD_USEDEVMODECOPIESANDCOLLATE 0x00040000
607 #define PD_DISABLEPRINTTOFILE 0x00080000
608 #define PD_HIDEPRINTTOFILE 0x00100000
609 #define PD_NONETWORKBUTTON 0x00200000
610 #define PD_CURRENTPAGE 0x00400000
611 #define PD_NOCURRENTPAGE 0x00800000
612 #define PD_EXCLUSIONFLAGS 0x01000000
613 #define PD_USELARGETEMPLATE 0x10000000
616 #define PD_EXCL_COPIESANDCOLLATE (DM_COPIES | DM_COLLATE)
618 #define START_PAGE_GENERAL 0xffffffff
620 #define PD_RESULT_CANCEL 0
621 #define PD_RESULT_PRINT 1
622 #define PD_RESULT_APPLY 2
631 typedef DEVNAMES
* LPDEVNAMES
;
633 #define DN_DEFAULTPRN 0x0001
635 /* PageSetupDlg stuff ... */
636 #define WM_PSD_PAGESETUPDLG (WM_USER )
637 #define WM_PSD_FULLPAGERECT (WM_USER+1)
638 #define WM_PSD_MINMARGINRECT (WM_USER+2)
639 #define WM_PSD_MARGINRECT (WM_USER+3)
640 #define WM_PSD_GREEKTEXTRECT (WM_USER+4)
641 #define WM_PSD_ENVSTAMPRECT (WM_USER+5)
642 #define WM_PSD_YAFULLPAGERECT (WM_USER+6)
644 typedef UINT (CALLBACK
*LPPAGEPAINTHOOK
)( HWND
, UINT
, WPARAM
, LPARAM
);
645 typedef UINT (CALLBACK
*LPPAGESETUPHOOK
)( HWND
, UINT
, WPARAM
, LPARAM
);
647 typedef struct tagPSDA
659 LPPAGESETUPHOOK lpfnPageSetupHook
;
660 LPPAGEPAINTHOOK lpfnPagePaintHook
;
661 LPCSTR lpPageSetupTemplateName
;
662 HGLOBAL hPageSetupTemplate
;
663 } PAGESETUPDLGA
,*LPPAGESETUPDLGA
;
665 typedef struct tagPSDW
677 LPPAGESETUPHOOK lpfnPageSetupHook
;
678 LPPAGEPAINTHOOK lpfnPagePaintHook
;
679 LPCWSTR lpPageSetupTemplateName
;
680 HGLOBAL hPageSetupTemplate
;
681 } PAGESETUPDLGW
,*LPPAGESETUPDLGW
;
682 DECL_WINELIB_TYPE_AW(PAGESETUPDLG
)
683 DECL_WINELIB_TYPE_AW(LPPAGESETUPDLG
)
685 #define PSD_DEFAULTMINMARGINS 0x00000000
686 #define PSD_INWININIINTLMEASURE 0x00000000
688 #define PSD_MINMARGINS 0x00000001
689 #define PSD_MARGINS 0x00000002
690 #define PSD_INTHOUSANDTHSOFINCHES 0x00000004
691 #define PSD_INHUNDREDTHSOFMILLIMETERS 0x00000008
692 #define PSD_DISABLEMARGINS 0x00000010
693 #define PSD_DISABLEPRINTER 0x00000020
694 #define PSD_NOWARNING 0x00000080
695 #define PSD_DISABLEORIENTATION 0x00000100
696 #define PSD_RETURNDEFAULT 0x00000400
697 #define PSD_DISABLEPAPER 0x00000200
698 #define PSD_SHOWHELP 0x00000800
699 #define PSD_ENABLEPAGESETUPHOOK 0x00002000
700 #define PSD_ENABLEPAGESETUPTEMPLATE 0x00008000
701 #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x00020000
702 #define PSD_ENABLEPAGEPAINTHOOK 0x00040000
703 #define PSD_DISABLEPAGEPAINTING 0x00080000
704 #define PSD_NONETWORKBUTTON 0x00200000
706 typedef struct tagPRINTPAGERANGE
710 } PRINTPAGERANGE
, *LPPRINTPAGERANGE
;
712 typedef struct tagPDEXA
721 DWORD ExclusionFlags
;
723 DWORD nMaxPageRanges
;
724 LPPRINTPAGERANGE lpPageRanges
;
729 LPCSTR lpPrintTemplateName
;
730 void* /*LPUNKNOWN*/ lpCallback
;
731 DWORD nPropertyPages
;
732 HPROPSHEETPAGE
* lphPropertyPages
;
734 DWORD dwResultAction
;
735 } PRINTDLGEXA
, *LPPRINTDLGEXA
;
737 typedef struct tagPDEXW
746 DWORD ExclusionFlags
;
748 DWORD nMaxPageRanges
;
749 LPPRINTPAGERANGE lpPageRanges
;
754 LPCWSTR lpPrintTemplateName
;
755 void* /*LPUNKNOWN*/ lpCallback
;
756 DWORD nPropertyPages
;
757 HPROPSHEETPAGE
* lphPropertyPages
;
759 DWORD dwResultAction
;
760 } PRINTDLGEXW
, *LPPRINTDLGEXW
;
762 DECL_WINELIB_TYPE_AW(PRINTDLGEX
)
763 DECL_WINELIB_TYPE_AW(LPPRINTDLGEX
)
767 DEFINE_GUID(IID_IPrintDialogCallback
, 0x5852a2c3,0x6530,0x11d1,0xb6,0xa3,0x00,0x00,0xf8,0x75,0x7b,0xf9);
768 #define INTERFACE IPrintDialogCallback
769 DECLARE_INTERFACE_(IPrintDialogCallback
,IUnknown
)
771 /*** IUnknown methods ***/
772 STDMETHOD_(HRESULT
,QueryInterface
)(THIS_ REFIID
,void **) PURE
;
773 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
774 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
775 /*** IPrintDialogCallback methods ***/
776 STDMETHOD(InitDone
)(THIS
) PURE
;
777 STDMETHOD(SelectionChange
)(THIS
) PURE
;
778 STDMETHOD(HandleMessage
)(THIS_ HWND
,UINT
,WPARAM
,LPARAM
,LRESULT
*) PURE
;
782 DEFINE_GUID(IID_IPrintDialogServices
, 0x509aaeda,0x5639,0x11d1,0xb6,0xa1,0x00,0x00,0xf8,0x75,0x7b,0xf9);
783 #define INTERFACE IPrintDialogServices
784 DECLARE_INTERFACE_(IPrintDialogServices
,IUnknown
)
786 /*** IUnknown methods ***/
787 STDMETHOD_(HRESULT
,QueryInterface
)(THIS_ REFIID
,void **) PURE
;
788 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
789 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
790 /*** IPrintDialogServices methods ***/
791 STDMETHOD(GetCurrentDevMode
)(THIS_ LPDEVMODEW
,UINT
*) PURE
;
792 STDMETHOD(GetCurrentPrinterName
)(THIS_ LPWSTR
,UINT
*) PURE
;
793 STDMETHOD(GetCurrentPortName
)(THIS_ LPWSTR
,UINT
*) PURE
;
797 #endif /* STDMETHOD */
799 BOOL WINAPI
ChooseColorA(LPCHOOSECOLORA lpChCol
);
800 BOOL WINAPI
ChooseColorW(LPCHOOSECOLORW lpChCol
);
801 #define ChooseColor WINELIB_NAME_AW(ChooseColor)
802 DWORD WINAPI
CommDlgExtendedError(void);
803 HWND WINAPI
FindTextA(LPFINDREPLACEA lpFind
);
804 HWND WINAPI
FindTextW(LPFINDREPLACEW lpFind
);
805 #define FindText WINELIB_NAME_AW(FindText)
806 short WINAPI
GetFileTitleA(LPCSTR lpFile
, LPSTR lpTitle
, WORD cbBuf
);
807 short WINAPI
GetFileTitleW(LPCWSTR lpFile
, LPWSTR lpTitle
, WORD cbBuf
);
808 #define GetFileTitle WINELIB_NAME_AW(GetFileTitle)
809 BOOL WINAPI
GetOpenFileNameA(LPOPENFILENAMEA ofn
);
810 BOOL WINAPI
GetOpenFileNameW(LPOPENFILENAMEW ofn
);
811 #define GetOpenFileName WINELIB_NAME_AW(GetOpenFileName)
812 BOOL WINAPI
GetSaveFileNameA(LPOPENFILENAMEA ofn
);
813 BOOL WINAPI
GetSaveFileNameW(LPOPENFILENAMEW ofn
);
814 #define GetSaveFileName WINELIB_NAME_AW(GetSaveFileName)
815 BOOL WINAPI
PageSetupDlgA( LPPAGESETUPDLGA
);
816 BOOL WINAPI
PageSetupDlgW( LPPAGESETUPDLGW
);
817 #define PageSetupDlg WINELIB_NAME_AW(PageSetupDlg)
818 BOOL WINAPI
PrintDlgA( LPPRINTDLGA printdlg
);
819 BOOL WINAPI
PrintDlgW( LPPRINTDLGW printdlg
);
820 #define PrintDlg WINELIB_NAME_AW(PrintDlg)
821 HRESULT WINAPI
PrintDlgExA(LPPRINTDLGEXA
);
822 HRESULT WINAPI
PrintDlgExW(LPPRINTDLGEXW
);
823 #define PrintDlgEx WINELIB_NAME_AW(PrintDlgEx)
824 HWND WINAPI
ReplaceTextA( LPFINDREPLACEA lpFind
);
825 HWND WINAPI
ReplaceTextW( LPFINDREPLACEW lpFind
);
826 #define ReplaceText WINELIB_NAME_AW(ReplaceText)
827 BOOL WINAPI
ChooseFontA(LPCHOOSEFONTA
);
828 BOOL WINAPI
ChooseFontW(LPCHOOSEFONTW
);
829 #define ChooseFont WINELIB_NAME_AW(ChooseFont)
831 void COMDLG32_SetCommDlgExtendedError(DWORD err
);
842 #endif /* __WINE_COMMDLG_H */