1 #ifndef _COMMDLG_H 2 #define _COMMDLG_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 #ifndef _WIN64 9 #pragma pack(push,1) 10 #endif 11 12 #define SAVE_DIALOG 1 13 #define OPEN_DIALOG 2 14 15 #define LBSELCHSTRINGA "commdlg_LBSelChangedNotify" 16 #define SHAREVISTRINGA "commdlg_ShareViolation" 17 #define FILEOKSTRINGA "commdlg_FileNameOK" 18 #define COLOROKSTRINGA "commdlg_ColorOK" 19 #define SETRGBSTRINGA "commdlg_SetRGBColor" 20 #define HELPMSGSTRINGA "commdlg_help" 21 #define FINDMSGSTRINGA "commdlg_FindReplace" 22 #define LBSELCHSTRINGW L"commdlg_LBSelChangedNotify" 23 #define SHAREVISTRINGW L"commdlg_ShareViolation" 24 #define FILEOKSTRINGW L"commdlg_FileNameOK" 25 #define COLOROKSTRINGW L"commdlg_ColorOK" 26 #define SETRGBSTRINGW L"commdlg_SetRGBColor" 27 #define HELPMSGSTRINGW L"commdlg_help" 28 #define FINDMSGSTRINGW L"commdlg_FindReplace" 29 #ifndef CDN_FIRST 30 #define CDN_FIRST ((UINT)-601) /* also in commctrl.h */ 31 #define CDN_LAST ((UINT)-699) 32 #endif 33 #define CDN_INITDONE CDN_FIRST 34 #define CDN_SELCHANGE (CDN_FIRST-1U) 35 #define CDN_FOLDERCHANGE (CDN_FIRST-2U) 36 #define CDN_SHAREVIOLATION (CDN_FIRST-3U) 37 #define CDN_HELP (CDN_FIRST-4U) 38 #define CDN_FILEOK (CDN_FIRST-5U) 39 #define CDN_TYPECHANGE (CDN_FIRST-6U) 40 #define CDN_INCLUDEITEM (CDN_FIRST-7U) 41 #define CDM_FIRST (WM_USER+100) 42 #define CDM_LAST (WM_USER+200) 43 #define CDM_GETSPEC CDM_FIRST 44 #define CDM_GETFILEPATH (CDM_FIRST+1) 45 #define CDM_GETFOLDERPATH (CDM_FIRST+2) 46 #define CDM_GETFOLDERIDLIST (CDM_FIRST+3) 47 #define CDM_SETCONTROLTEXT (CDM_FIRST+4) 48 #define CDM_HIDECONTROL (CDM_FIRST+5) 49 #define CDM_SETDEFEXT (CDM_FIRST+6) 50 #define CC_RGBINIT 1 51 #define CC_FULLOPEN 2 52 #define CC_PREVENTFULLOPEN 4 53 #define CC_SHOWHELP 8 54 #define CC_ENABLEHOOK 16 55 #define CC_ENABLETEMPLATE 32 56 #define CC_ENABLETEMPLATEHANDLE 64 57 #define CC_SOLIDCOLOR 128 58 #define CC_ANYCOLOR 256 59 #define CF_SCREENFONTS 1 60 #define CF_PRINTERFONTS 2 61 #define CF_BOTH 3 62 #define CF_SHOWHELP 4 63 #define CF_ENABLEHOOK 8 64 #define CF_ENABLETEMPLATE 16 65 #define CF_ENABLETEMPLATEHANDLE 32 66 #define CF_INITTOLOGFONTSTRUCT 64 67 #define CF_USESTYLE 128 68 #define CF_EFFECTS 256 69 #define CF_APPLY 512 70 #define CF_ANSIONLY 1024 71 #define CF_SCRIPTSONLY CF_ANSIONLY 72 #define CF_NOVECTORFONTS 2048 73 #define CF_NOOEMFONTS 2048 74 #define CF_NOSIMULATIONS 4096 75 #define CF_LIMITSIZE 8192 76 #define CF_FIXEDPITCHONLY 16384 77 #define CF_WYSIWYG 32768 78 #define CF_FORCEFONTEXIST 65536 79 #define CF_SCALABLEONLY 131072 80 #define CF_TTONLY 262144 81 #define CF_NOFACESEL 524288 82 #define CF_NOSTYLESEL 1048576 83 #define CF_NOSIZESEL 2097152 84 #define CF_SELECTSCRIPT 4194304 85 #define CF_NOSCRIPTSEL 8388608 86 #define CF_NOVERTFONTS 0x1000000 87 #define SIMULATED_FONTTYPE 0x8000 88 #define PRINTER_FONTTYPE 0x4000 89 #define SCREEN_FONTTYPE 0x2000 90 #define BOLD_FONTTYPE 0x100 91 #define ITALIC_FONTTYPE 0x0200 92 #define REGULAR_FONTTYPE 0x0400 93 #define WM_CHOOSEFONT_GETLOGFONT (WM_USER+1) 94 #define WM_CHOOSEFONT_SETLOGFONT (WM_USER+101) 95 #define WM_CHOOSEFONT_SETFLAGS (WM_USER+102) 96 #define OFN_ALLOWMULTISELECT 512 97 #define OFN_CREATEPROMPT 0x2000 98 #define OFN_DONTADDTORECENT 0x2000000 99 #define OFN_ENABLEHOOK 32 100 #define OFN_ENABLEINCLUDENOTIFY 0x400000 101 #define OFN_ENABLESIZING 0x800000 102 #define OFN_ENABLETEMPLATE 64 103 #define OFN_ENABLETEMPLATEHANDLE 128 104 #define OFN_EXPLORER 0x80000 105 #define OFN_EXTENSIONDIFFERENT 0x400 106 #define OFN_FILEMUSTEXIST 0x1000 107 #define OFN_HIDEREADONLY 4 108 #define OFN_LONGNAMES 0x200000 109 #define OFN_NOCHANGEDIR 8 110 #define OFN_NODEREFERENCELINKS 0x100000 111 #define OFN_NOLONGNAMES 0x40000 112 #define OFN_NONETWORKBUTTON 0x20000 113 #define OFN_NOREADONLYRETURN 0x8000 114 #define OFN_NOTESTFILECREATE 0x10000 115 #define OFN_NOVALIDATE 256 116 #define OFN_OVERWRITEPROMPT 2 117 #define OFN_PATHMUSTEXIST 0x800 118 #define OFN_READONLY 1 119 #define OFN_SHAREAWARE 0x4000 120 #define OFN_SHOWHELP 16 121 #define OFN_SHAREFALLTHROUGH 2 122 #define OFN_SHARENOWARN 1 123 #define OFN_SHAREWARN 0 124 #define OFN_NODEREFERENCELINKS 0x100000 125 #define FR_DIALOGTERM 64 126 #define FR_DOWN 1 127 #define FR_ENABLEHOOK 256 128 #define FR_ENABLETEMPLATE 512 129 #define FR_ENABLETEMPLATEHANDLE 0x2000 130 #define FR_FINDNEXT 8 131 #define FR_HIDEUPDOWN 0x4000 132 #define FR_HIDEMATCHCASE 0x8000 133 #define FR_HIDEWHOLEWORD 0x10000 134 #define FR_MATCHALEFHAMZA 0x80000000 135 #define FR_MATCHCASE 4 136 #define FR_MATCHDIAC 0x20000000 137 #define FR_MATCHKASHIDA 0x40000000 138 #define FR_NOMATCHCASE 0x800 139 #define FR_NOUPDOWN 0x400 140 #define FR_NOWHOLEWORD 4096 141 #define FR_REPLACE 16 142 #define FR_REPLACEALL 32 143 #define FR_SHOWHELP 128 144 #define FR_WHOLEWORD 2 145 #define PD_ALLPAGES 0 146 #define PD_SELECTION 1 147 #define PD_PAGENUMS 2 148 #define PD_NOSELECTION 4 149 #define PD_NOPAGENUMS 8 150 #define PD_COLLATE 16 151 #define PD_PRINTTOFILE 32 152 #define PD_PRINTSETUP 64 153 #define PD_NOWARNING 128 154 #define PD_RETURNDC 256 155 #define PD_RETURNIC 512 156 #define PD_RETURNDEFAULT 1024 157 #define PD_SHOWHELP 2048 158 #define PD_ENABLEPRINTHOOK 4096 159 #define PD_ENABLESETUPHOOK 8192 160 #define PD_ENABLEPRINTTEMPLATE 16384 161 #define PD_ENABLESETUPTEMPLATE 32768 162 #define PD_ENABLEPRINTTEMPLATEHANDLE 65536 163 #define PD_ENABLESETUPTEMPLATEHANDLE 0x20000 164 #define PD_USEDEVMODECOPIES 0x40000 165 #define PD_USEDEVMODECOPIESANDCOLLATE 0x40000 166 #define PD_DISABLEPRINTTOFILE 0x80000 167 #define PD_HIDEPRINTTOFILE 0x100000 168 #define PD_NONETWORKBUTTON 0x200000 169 #define PSD_DEFAULTMINMARGINS 0 170 #define PSD_INWININIINTLMEASURE 0 171 #define PSD_MINMARGINS 1 172 #define PSD_MARGINS 2 173 #define PSD_INTHOUSANDTHSOFINCHES 4 174 #define PSD_INHUNDREDTHSOFMILLIMETERS 8 175 #define PSD_DISABLEMARGINS 16 176 #define PSD_DISABLEPRINTER 32 177 #define PSD_NOWARNING 128 178 #define PSD_DISABLEORIENTATION 256 179 #define PSD_DISABLEPAPER 512 180 #define PSD_RETURNDEFAULT 1024 181 #define PSD_SHOWHELP 2048 182 #define PSD_ENABLEPAGESETUPHOOK 8192 183 #define PSD_ENABLEPAGESETUPTEMPLATE 0x8000 184 #define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x20000 185 #define PSD_ENABLEPAGEPAINTHOOK 0x40000 186 #define PSD_DISABLEPAGEPAINTING 0x80000 187 #define WM_PSD_PAGESETUPDLG WM_USER 188 #define WM_PSD_FULLPAGERECT (WM_USER+1) 189 #define WM_PSD_MINMARGINRECT (WM_USER+2) 190 #define WM_PSD_MARGINRECT (WM_USER+3) 191 #define WM_PSD_GREEKTEXTRECT (WM_USER+4) 192 #define WM_PSD_ENVSTAMPRECT (WM_USER+5) 193 #define WM_PSD_YAFULLPAGERECT (WM_USER+6) 194 #define CD_LBSELNOITEMS (-1) 195 #define CD_LBSELCHANGE 0 196 #define CD_LBSELSUB 1 197 #define CD_LBSELADD 2 198 #define DN_DEFAULTPRN 1 199 200 #define PD_RESULT_CANCEL 0 201 #define PD_RESULT_PRINT 1 202 #define PD_RESULT_APPLY 2 203 204 #define START_PAGE_GENERAL 0xffffffff 205 206 #ifndef SNDMSG 207 #ifdef __cplusplus 208 #define SNDMSG ::SendMessage 209 #else 210 #define SNDMSG SendMessage 211 #endif 212 #endif /* ifndef SNDMSG */ 213 214 #define CommDlg_OpenSave_GetSpec(d,s,m) ((int)SNDMSG((d),CDM_GETSPEC,(m),(LPARAM)(s))) 215 #define CommDlg_OpenSave_GetSpecA CommDlg_OpenSave_GetSpec 216 #define CommDlg_OpenSave_GetSpecW CommDlg_OpenSave_GetSpec 217 #define CommDlg_OpenSave_GetFilePath(d,s,m) ((int)SNDMSG((d),CDM_GETFILEPATH,(m),(LPARAM)(s))) 218 #define CommDlg_OpenSave_GetFilePathA CommDlg_OpenSave_GetFilePath 219 #define CommDlg_OpenSave_GetFilePathW CommDlg_OpenSave_GetFilePath 220 #define CommDlg_OpenSave_GetFolderPath(d,s,m) ((int)SNDMSG((d),CDM_GETFOLDERPATH,(m),(LPARAM)(LPSTR)(s))) 221 #define CommDlg_OpenSave_GetFolderPathA CommDlg_OpenSave_GetFolderPath 222 #define CommDlg_OpenSave_GetFolderPathW CommDlg_OpenSave_GetFolderPath 223 #define CommDlg_OpenSave_GetFolderIDList(d,i,m) ((int)SNDMSG((d),CDM_GETFOLDERIDLIST,(m),(LPARAM)(i))) 224 #define CommDlg_OpenSave_SetControlText(d,i,t) ((void)SNDMSG((d),CDM_SETCONTROLTEXT,(i),(LPARAM)(t))) 225 #define CommDlg_OpenSave_HideControl(d,i) ((void)SNDMSG((d),CDM_HIDECONTROL,(i),0)) 226 #define CommDlg_OpenSave_SetDefExt(d,e) ((void)SNDMSG((d),CDM_SETDEFEXT,0,(LPARAM)(e))) 227 228 typedef UINT_PTR (APIENTRY *__CDHOOKPROC)(HWND,UINT,WPARAM,LPARAM); 229 typedef __CDHOOKPROC LPCCHOOKPROC; 230 typedef __CDHOOKPROC LPCFHOOKPROC; 231 typedef __CDHOOKPROC LPFRHOOKPROC; 232 typedef __CDHOOKPROC LPOFNHOOKPROC; 233 typedef __CDHOOKPROC LPPAGEPAINTHOOK; 234 typedef __CDHOOKPROC LPPAGESETUPHOOK; 235 typedef __CDHOOKPROC LPSETUPHOOKPROC; 236 typedef __CDHOOKPROC LPPRINTHOOKPROC; 237 typedef struct tagCHOOSECOLORA { 238 DWORD lStructSize; 239 HWND hwndOwner; 240 HWND hInstance; 241 COLORREF rgbResult; 242 COLORREF* lpCustColors; 243 DWORD Flags; 244 LPARAM lCustData; 245 LPCCHOOKPROC lpfnHook; 246 LPCSTR lpTemplateName; 247 } CHOOSECOLORA,*LPCHOOSECOLORA; 248 typedef struct tagCHOOSECOLORW { 249 DWORD lStructSize; 250 HWND hwndOwner; 251 HWND hInstance; 252 COLORREF rgbResult; 253 COLORREF* lpCustColors; 254 DWORD Flags; 255 LPARAM lCustData; 256 LPCCHOOKPROC lpfnHook; 257 LPCWSTR lpTemplateName; 258 } CHOOSECOLORW,*LPCHOOSECOLORW; 259 typedef struct tagCHOOSEFONTA { 260 DWORD lStructSize; 261 HWND hwndOwner; 262 HDC hDC; 263 LPLOGFONTA lpLogFont; 264 INT iPointSize; 265 DWORD Flags; 266 DWORD rgbColors; 267 LPARAM lCustData; 268 LPCFHOOKPROC lpfnHook; 269 LPCSTR lpTemplateName; 270 HINSTANCE hInstance; 271 LPSTR lpszStyle; 272 WORD nFontType; 273 WORD ___MISSING_ALIGNMENT__; 274 INT nSizeMin; 275 INT nSizeMax; 276 } CHOOSEFONTA,*LPCHOOSEFONTA; 277 typedef struct tagCHOOSEFONTW { 278 DWORD lStructSize; 279 HWND hwndOwner; 280 HDC hDC; 281 LPLOGFONTW lpLogFont; 282 INT iPointSize; 283 DWORD Flags; 284 DWORD rgbColors; 285 LPARAM lCustData; 286 LPCFHOOKPROC lpfnHook; 287 LPCWSTR lpTemplateName; 288 HINSTANCE hInstance; 289 LPWSTR lpszStyle; 290 WORD nFontType; 291 WORD ___MISSING_ALIGNMENT__; 292 INT nSizeMin; 293 INT nSizeMax; 294 } CHOOSEFONTW,*LPCHOOSEFONTW; 295 typedef struct tagDEVNAMES { 296 WORD wDriverOffset; 297 WORD wDeviceOffset; 298 WORD wOutputOffset; 299 WORD wDefault; 300 } DEVNAMES,*LPDEVNAMES; 301 typedef struct { 302 DWORD lStructSize; 303 HWND hwndOwner; 304 HINSTANCE hInstance; 305 DWORD Flags; 306 LPSTR lpstrFindWhat; 307 LPSTR lpstrReplaceWith; 308 WORD wFindWhatLen; 309 WORD wReplaceWithLen; 310 LPARAM lCustData; 311 LPFRHOOKPROC lpfnHook; 312 LPCSTR lpTemplateName; 313 } FINDREPLACEA,*LPFINDREPLACEA; 314 typedef struct { 315 DWORD lStructSize; 316 HWND hwndOwner; 317 HINSTANCE hInstance; 318 DWORD Flags; 319 LPWSTR lpstrFindWhat; 320 LPWSTR lpstrReplaceWith; 321 WORD wFindWhatLen; 322 WORD wReplaceWithLen; 323 LPARAM lCustData; 324 LPFRHOOKPROC lpfnHook; 325 LPCWSTR lpTemplateName; 326 } FINDREPLACEW,*LPFINDREPLACEW; 327 typedef struct tagOFNA { 328 DWORD lStructSize; 329 HWND hwndOwner; 330 HINSTANCE hInstance; 331 LPCSTR lpstrFilter; 332 LPSTR lpstrCustomFilter; 333 DWORD nMaxCustFilter; 334 DWORD nFilterIndex; 335 LPSTR lpstrFile; 336 DWORD nMaxFile; 337 LPSTR lpstrFileTitle; 338 DWORD nMaxFileTitle; 339 LPCSTR lpstrInitialDir; 340 LPCSTR lpstrTitle; 341 DWORD Flags; 342 WORD nFileOffset; 343 WORD nFileExtension; 344 LPCSTR lpstrDefExt; 345 LPARAM lCustData; 346 LPOFNHOOKPROC lpfnHook; 347 LPCSTR lpTemplateName; 348 #ifdef _MAC 349 LPEDITMENU lpEditInfo; 350 LPCSTR lpstrPrompt; 351 #endif 352 #if (_WIN32_WINNT >= 0x0500) 353 void *pvReserved; 354 DWORD dwReserved; 355 DWORD FlagsEx; 356 #endif 357 } OPENFILENAMEA,*LPOPENFILENAMEA; 358 typedef struct tagOFNW { 359 DWORD lStructSize; 360 HWND hwndOwner; 361 HINSTANCE hInstance; 362 LPCWSTR lpstrFilter; 363 LPWSTR lpstrCustomFilter; 364 DWORD nMaxCustFilter; 365 DWORD nFilterIndex; 366 LPWSTR lpstrFile; 367 DWORD nMaxFile; 368 LPWSTR lpstrFileTitle; 369 DWORD nMaxFileTitle; 370 LPCWSTR lpstrInitialDir; 371 LPCWSTR lpstrTitle; 372 DWORD Flags; 373 WORD nFileOffset; 374 WORD nFileExtension; 375 LPCWSTR lpstrDefExt; 376 LPARAM lCustData; 377 LPOFNHOOKPROC lpfnHook; 378 LPCWSTR lpTemplateName; 379 #ifdef _MAC 380 LPEDITMENU lpEditInfo; 381 LPCSTR lpstrPrompt; 382 #endif 383 #if (_WIN32_WINNT >= 0x0500) 384 void *pvReserved; 385 DWORD dwReserved; 386 DWORD FlagsEx; 387 #endif 388 } OPENFILENAMEW,*LPOPENFILENAMEW; 389 390 391 #ifndef CDSIZEOF_STRUCT 392 #define CDSIZEOF_STRUCT(type,field) ((INT_PTR)&(((type *)0)->field) + sizeof(((type*)0)->field)) 393 #endif 394 395 #define OPENFILENAME_SIZE_VERSION_400A CDSIZEOF_STRUCT(OPENFILENAMEA,lpTemplateName) 396 #define OPENFILENAME_SIZE_VERSION_400W CDSIZEOF_STRUCT(OPENFILENAMEW,lpTemplateName) 397 398 #ifdef UNICODE 399 #define OPENFILENAME_SIZE_VERSION_400 OPENFILENAME_SIZE_VERSION_400W 400 #else 401 #define OPENFILENAME_SIZE_VERSION_400 OPENFILENAME_SIZE_VERSION_400A 402 #endif 403 404 typedef struct _OFNOTIFYA { 405 NMHDR hdr; 406 LPOPENFILENAMEA lpOFN; 407 LPSTR pszFile; 408 } OFNOTIFYA,*LPOFNOTIFYA; 409 typedef struct _OFNOTIFYW { 410 NMHDR hdr; 411 LPOPENFILENAMEW lpOFN; 412 LPWSTR pszFile; 413 } OFNOTIFYW,*LPOFNOTIFYW; 414 415 typedef struct _OFNOTIFYEXA 416 { 417 NMHDR hdr; 418 LPOPENFILENAMEA lpOFN; 419 LPVOID psf; 420 LPVOID pidl; 421 } OFNOTIFYEXA, *LPOFNOTIFYEXA; 422 423 typedef struct _OFNOTIFYEXW 424 { 425 NMHDR hdr; 426 LPOPENFILENAMEW lpOFN; 427 LPVOID psf; 428 LPVOID pidl; 429 } OFNOTIFYEXW, *LPOFNOTIFYEXW; 430 431 typedef struct tagPSDA { 432 DWORD lStructSize; 433 HWND hwndOwner; 434 HGLOBAL hDevMode; 435 HGLOBAL hDevNames; 436 DWORD Flags; 437 POINT ptPaperSize; 438 RECT rtMinMargin; 439 RECT rtMargin; 440 HINSTANCE hInstance; 441 LPARAM lCustData; 442 LPPAGESETUPHOOK lpfnPageSetupHook; 443 LPPAGEPAINTHOOK lpfnPagePaintHook; 444 LPCSTR lpPageSetupTemplateName; 445 HGLOBAL hPageSetupTemplate; 446 } PAGESETUPDLGA,*LPPAGESETUPDLGA; 447 typedef struct tagPSDW { 448 DWORD lStructSize; 449 HWND hwndOwner; 450 HGLOBAL hDevMode; 451 HGLOBAL hDevNames; 452 DWORD Flags; 453 POINT ptPaperSize; 454 RECT rtMinMargin; 455 RECT rtMargin; 456 HINSTANCE hInstance; 457 LPARAM lCustData; 458 LPPAGESETUPHOOK lpfnPageSetupHook; 459 LPPAGEPAINTHOOK lpfnPagePaintHook; 460 LPCWSTR lpPageSetupTemplateName; 461 HGLOBAL hPageSetupTemplate; 462 } PAGESETUPDLGW,*LPPAGESETUPDLGW; 463 typedef struct tagPDA { 464 DWORD lStructSize; 465 HWND hwndOwner; 466 HANDLE hDevMode; 467 HANDLE hDevNames; 468 HDC hDC; 469 DWORD Flags; 470 WORD nFromPage; 471 WORD nToPage; 472 WORD nMinPage; 473 WORD nMaxPage; 474 WORD nCopies; 475 HINSTANCE hInstance; 476 DWORD lCustData; 477 LPPRINTHOOKPROC lpfnPrintHook; 478 LPSETUPHOOKPROC lpfnSetupHook; 479 LPCSTR lpPrintTemplateName; 480 LPCSTR lpSetupTemplateName; 481 HANDLE hPrintTemplate; 482 HANDLE hSetupTemplate; 483 } PRINTDLGA,*LPPRINTDLGA; 484 typedef struct tagPDW { 485 DWORD lStructSize; 486 HWND hwndOwner; 487 HANDLE hDevMode; 488 HANDLE hDevNames; 489 HDC hDC; 490 DWORD Flags; 491 WORD nFromPage; 492 WORD nToPage; 493 WORD nMinPage; 494 WORD nMaxPage; 495 WORD nCopies; 496 HINSTANCE hInstance; 497 DWORD lCustData; 498 LPPRINTHOOKPROC lpfnPrintHook; 499 LPSETUPHOOKPROC lpfnSetupHook; 500 LPCWSTR lpPrintTemplateName; 501 LPCWSTR lpSetupTemplateName; 502 HANDLE hPrintTemplate; 503 HANDLE hSetupTemplate; 504 } PRINTDLGW,*LPPRINTDLGW; 505 #if (WINVER >= 0x0500) && !defined (__OBJC__) 506 #include <prsht.h> /* for HPROPSHEETPAGE */ 507 typedef struct tagPRINTPAGERANGE { 508 DWORD nFromPage; 509 DWORD nToPage; 510 } PRINTPAGERANGE, *LPPRINTPAGERANGE; 511 typedef struct tagPDEXA { 512 DWORD lStructSize; 513 HWND hwndOwner; 514 HGLOBAL hDevMode; 515 HGLOBAL hDevNames; 516 HDC hDC; 517 DWORD Flags; 518 DWORD Flags2; 519 DWORD ExclusionFlags; 520 DWORD nPageRanges; 521 DWORD nMaxPageRanges; 522 LPPRINTPAGERANGE lpPageRanges; 523 DWORD nMinPage; 524 DWORD nMaxPage; 525 DWORD nCopies; 526 HINSTANCE hInstance; 527 LPCSTR lpPrintTemplateName; 528 void* /*LPUNKNOWN*/ lpCallback; 529 DWORD nPropertyPages; 530 HPROPSHEETPAGE *lphPropertyPages; 531 DWORD nStartPage; 532 DWORD dwResultAction; 533 } PRINTDLGEXA, *LPPRINTDLGEXA; 534 typedef struct tagPDEXW { 535 DWORD lStructSize; 536 HWND hwndOwner; 537 HGLOBAL hDevMode; 538 HGLOBAL hDevNames; 539 HDC hDC; 540 DWORD Flags; 541 DWORD Flags2; 542 DWORD ExclusionFlags; 543 DWORD nPageRanges; 544 DWORD nMaxPageRanges; 545 LPPRINTPAGERANGE lpPageRanges; 546 DWORD nMinPage; 547 DWORD nMaxPage; 548 DWORD nCopies; 549 HINSTANCE hInstance; 550 LPCWSTR lpPrintTemplateName; 551 void* /*LPUNKNOWN*/ lpCallback; 552 DWORD nPropertyPages; 553 HPROPSHEETPAGE *lphPropertyPages; 554 DWORD nStartPage; 555 DWORD dwResultAction; 556 } PRINTDLGEXW, *LPPRINTDLGEXW; 557 #endif /* WINVER >= 0x0500 */ 558 559 #ifdef STDMETHOD 560 561 DEFINE_GUID(IID_IPrintDialogCallback, 0x5852a2c3,0x6530,0x11d1,0xb6,0xa3,0x00,0x00,0xf8,0x75,0x7b,0xf9); 562 #define INTERFACE IPrintDialogCallback 563 DECLARE_INTERFACE_(IPrintDialogCallback,IUnknown) 564 { 565 /*** IUnknown methods ***/ 566 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE; 567 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 568 STDMETHOD_(ULONG,Release)(THIS) PURE; 569 /*** IPrintDialogCallback methods ***/ 570 STDMETHOD(InitDone)(THIS) PURE; 571 STDMETHOD(SelectionChange)(THIS) PURE; 572 STDMETHOD(HandleMessage)(THIS_ HWND,UINT,WPARAM,LPARAM,LRESULT *) PURE; 573 }; 574 #undef INTERFACE 575 576 DEFINE_GUID(IID_IPrintDialogServices, 0x509aaeda,0x5639,0x11d1,0xb6,0xa1,0x00,0x00,0xf8,0x75,0x7b,0xf9); 577 #define INTERFACE IPrintDialogServices 578 DECLARE_INTERFACE_(IPrintDialogServices,IUnknown) 579 { 580 /*** IUnknown methods ***/ 581 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE; 582 STDMETHOD_(ULONG,AddRef)(THIS) PURE; 583 STDMETHOD_(ULONG,Release)(THIS) PURE; 584 /*** IPrintDialogServices methods ***/ 585 STDMETHOD(GetCurrentDevMode)(THIS_ LPDEVMODEW,UINT *) PURE; 586 STDMETHOD(GetCurrentPrinterName)(THIS_ LPWSTR,UINT *) PURE; 587 STDMETHOD(GetCurrentPortName)(THIS_ LPWSTR,UINT *) PURE; 588 }; 589 #undef INTERFACE 590 591 #endif /* STDMETHOD */ 592 593 BOOL WINAPI ChooseColorA(LPCHOOSECOLORA); 594 BOOL WINAPI ChooseColorW(LPCHOOSECOLORW); 595 BOOL WINAPI ChooseFontA(LPCHOOSEFONTA); 596 BOOL WINAPI ChooseFontW(LPCHOOSEFONTW); 597 DWORD WINAPI CommDlgExtendedError(void); 598 HWND WINAPI FindTextA(LPFINDREPLACEA); 599 HWND WINAPI FindTextW(LPFINDREPLACEW); 600 short WINAPI GetFileTitleA(LPCSTR,LPSTR,WORD); 601 short WINAPI GetFileTitleW(LPCWSTR,LPWSTR,WORD); 602 BOOL WINAPI GetOpenFileNameA(LPOPENFILENAMEA); 603 BOOL WINAPI GetOpenFileNameW(LPOPENFILENAMEW); 604 BOOL WINAPI GetSaveFileNameA(LPOPENFILENAMEA); 605 BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW); 606 BOOL WINAPI PageSetupDlgA(LPPAGESETUPDLGA); 607 BOOL WINAPI PageSetupDlgW(LPPAGESETUPDLGW); 608 BOOL WINAPI PrintDlgA(LPPRINTDLGA); 609 BOOL WINAPI PrintDlgW(LPPRINTDLGW); 610 HWND WINAPI ReplaceTextA(LPFINDREPLACEA); 611 HWND WINAPI ReplaceTextW(LPFINDREPLACEW); 612 #if (WINVER >= 0x0500) && !defined (__OBJC__) 613 HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA); 614 HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW); 615 #endif /* WINVER >= 0x0500 */ 616 617 #ifdef UNICODE 618 #define LBSELCHSTRING LBSELCHSTRINGW 619 #define SHAREVISTRING SHAREVISTRINGW 620 #define FILEOKSTRING FILEOKSTRINGW 621 #define COLOROKSTRING COLOROKSTRINGW 622 #define SETRGBSTRING SETRGBSTRINGW 623 #define HELPMSGSTRING HELPMSGSTRINGW 624 #define FINDMSGSTRING FINDMSGSTRINGW 625 typedef CHOOSECOLORW CHOOSECOLOR,*LPCHOOSECOLOR; 626 typedef CHOOSEFONTW CHOOSEFONT,*LPCHOOSEFONT; 627 typedef FINDREPLACEW FINDREPLACE,*LPFINDREPLACE; 628 typedef OPENFILENAMEW OPENFILENAME,*LPOPENFILENAME; 629 typedef OFNOTIFYW OFNOTIFY,*LPOFNOTIFY; 630 typedef PAGESETUPDLGW PAGESETUPDLG,*LPPAGESETUPDLG; 631 typedef PRINTDLGW PRINTDLG,*LPPRINTDLG; 632 #define ChooseColor ChooseColorW 633 #define ChooseFont ChooseFontW 634 #define FindText FindTextW 635 #define GetFileTitle GetFileTitleW 636 #define GetOpenFileName GetOpenFileNameW 637 #define GetSaveFileName GetSaveFileNameW 638 #define PageSetupDlg PageSetupDlgW 639 #define PrintDlg PrintDlgW 640 #define ReplaceText ReplaceTextW 641 #if (WINVER >= 0x0500) && !defined (__OBJC__) 642 typedef PRINTDLGEXW PRINTDLGEX, *LPPRINTDLGEX; 643 #define PrintDlgEx PrintDlgExW 644 #endif /* WINVER >= 0x0500 */ 645 #else /* UNICODE */ 646 #define LBSELCHSTRING LBSELCHSTRINGA 647 #define SHAREVISTRING SHAREVISTRINGA 648 #define FILEOKSTRING FILEOKSTRINGA 649 #define COLOROKSTRING COLOROKSTRINGA 650 #define SETRGBSTRING SETRGBSTRINGA 651 #define HELPMSGSTRING HELPMSGSTRINGA 652 #define FINDMSGSTRING FINDMSGSTRINGA 653 typedef CHOOSECOLORA CHOOSECOLOR,*LPCHOOSECOLOR; 654 typedef CHOOSEFONTA CHOOSEFONT,*LPCHOOSEFONT; 655 typedef FINDREPLACEA FINDREPLACE,*LPFINDREPLACE; 656 typedef OPENFILENAMEA OPENFILENAME,*LPOPENFILENAME; 657 typedef OFNOTIFYA OFNOTIFY,*LPOFNOTIFY; 658 typedef PAGESETUPDLGA PAGESETUPDLG,*LPPAGESETUPDLG; 659 typedef PRINTDLGA PRINTDLG,*LPPRINTDLG; 660 #define ChooseColor ChooseColorA 661 #define ChooseFont ChooseFontA 662 #define FindText FindTextA 663 #define GetFileTitle GetFileTitleA 664 #define GetOpenFileName GetOpenFileNameA 665 #define GetSaveFileName GetSaveFileNameA 666 #define PageSetupDlg PageSetupDlgA 667 #define PrintDlg PrintDlgA 668 #define ReplaceText ReplaceTextA 669 #if (WINVER >= 0x0500) && !defined (__OBJC__) 670 typedef PRINTDLGEXA PRINTDLGEX, *LPPRINTDLGEX; 671 #define PrintDlgEx PrintDlgExA 672 #endif /* WINVER >= 0x0500 */ 673 #endif /* UNICODE */ 674 #ifndef _WIN64 675 #pragma pack(pop) 676 #endif 677 #ifdef __cplusplus 678 } 679 #endif 680 #endif 681