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