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