Merge branch 'master' of http://www-dev.cockos.com/wdl/WDL into updatewdl
[wdl/wdl-ol.git] / WDL / win7filedialog.h
blob636916c40599b33864f12973580ad31c85039eab
1 #ifndef _WIN7FILEDIALOG_H
2 #define _WIN7FILEDIALOG_H
4 #ifdef _WIN32
6 #include <comdef.h>
7 #include "wdlstring.h"
9 #ifndef __RPC__in_opt
10 //defines for msvc6
11 #define __RPC__in_opt
12 #define __RPC__in
13 #define __RPC__out
14 #define __RPC__deref_out_opt
15 #define __RPC__deref_out_opt_string
16 #define __RPC__in_ecount_full(x)
17 #define __RPC__out_ecount_part(x,y)
18 #ifndef __in
19 #define __in
20 #endif
22 typedef ULONG SFGAOF;
24 typedef /* [v1_enum] */
25 enum tagFDE_OVERWRITE_RESPONSE
26 { FDEOR_DEFAULT = 0,
27 FDEOR_ACCEPT = 0x1,
28 FDEOR_REFUSE = 0x2
29 } FDE_OVERWRITE_RESPONSE;
31 typedef /* [v1_enum] */
32 enum tagFDE_SHAREVIOLATION_RESPONSE
33 { FDESVR_DEFAULT = 0,
34 FDESVR_ACCEPT = 0x1,
35 FDESVR_REFUSE = 0x2
36 } FDE_SHAREVIOLATION_RESPONSE;
38 typedef /* [v1_enum] */
39 enum tagFDAP
40 { FDAP_BOTTOM = 0,
41 FDAP_TOP = 0x1
42 } FDAP;
44 typedef struct _COMDLG_FILTERSPEC
46 LPCWSTR pszName;
47 LPCWSTR pszSpec;
48 } COMDLG_FILTERSPEC;
50 typedef
51 enum tagSHCONTF
52 { SHCONTF_FOLDERS = 0x20,
53 SHCONTF_NONFOLDERS = 0x40,
54 SHCONTF_INCLUDEHIDDEN = 0x80,
55 SHCONTF_INIT_ON_FIRST_NEXT = 0x100,
56 SHCONTF_NETPRINTERSRCH = 0x200,
57 SHCONTF_SHAREABLE = 0x400,
58 SHCONTF_STORAGE = 0x800,
59 SHCONTF_FASTITEMS = 0x2000,
60 SHCONTF_FLATLIST = 0x4000,
61 SHCONTF_ENABLE_ASYNC = 0x8000
62 } SHCONT;
64 typedef DWORD SHCONTF;
66 enum tagGETPROPERTYSTOREFLAGS
67 { GPS_DEFAULT = 0,
68 GPS_HANDLERPROPERTIESONLY = 0x1,
69 GPS_READWRITE = 0x2,
70 GPS_TEMPORARY = 0x4,
71 GPS_FASTPROPERTIESONLY = 0x8,
72 GPS_OPENSLOWITEM = 0x10,
73 GPS_DELAYCREATION = 0x20,
74 GPS_BESTEFFORT = 0x40,
75 GPS_MASK_VALID = 0x7f
76 } ;
77 typedef int GETPROPERTYSTOREFLAGS;
79 typedef /* [v1_enum] */
80 enum tagCDCONTROLSTATE
81 { CDCS_INACTIVE = 0,
82 CDCS_ENABLED = 0x1,
83 CDCS_VISIBLE = 0x2
84 } CDCONTROLSTATE;
86 typedef DWORD CDCONTROLSTATEF;
88 typedef void *REFPROPERTYKEY;
90 class IPropertyStore;
91 class IPropertyDescriptionList;
92 class IFileOperationProgressSink;
93 //msvc6
94 #else
95 #if defined(_MSC_VER) && _MSC_VER >= 1600
96 #include <shobjidl.h>
97 #endif
98 #endif
100 #ifndef __IFileDialog_FWD_DEFINED__
101 #define __IFileDialog_FWD_DEFINED__
102 typedef interface IFileDialog IFileDialog;
103 #endif /* __IFileDialog_FWD_DEFINED__ */
108 #ifndef __IShellItem_INTERFACE_DEFINED__
109 #define __IShellItem_INTERFACE_DEFINED__
111 /* interface IShellItem */
112 /* [unique][object][uuid][helpstring] */
114 typedef /* [v1_enum] */
115 enum tagSIGDN
116 { SIGDN_NORMALDISPLAY = 0,
117 SIGDN_PARENTRELATIVEPARSING = ( int )0x80018001,
118 SIGDN_DESKTOPABSOLUTEPARSING = ( int )0x80028000,
119 SIGDN_PARENTRELATIVEEDITING = ( int )0x80031001,
120 SIGDN_DESKTOPABSOLUTEEDITING = ( int )0x8004c000,
121 SIGDN_FILESYSPATH = ( int )0x80058000,
122 SIGDN_URL = ( int )0x80068000,
123 SIGDN_PARENTRELATIVEFORADDRESSBAR = ( int )0x8007c001,
124 SIGDN_PARENTRELATIVE = ( int )0x80080001
125 } SIGDN;
127 /* [v1_enum] */
128 enum tagSHELLITEMCOMPAREHINTF
129 { SICHINT_DISPLAY = 0,
130 SICHINT_ALLFIELDS = ( int )0x80000000,
131 SICHINT_CANONICAL = 0x10000000
133 typedef DWORD SICHINTF;
136 EXTERN_C const IID IID_IShellItem;
138 #if defined(__cplusplus) && !defined(CINTERFACE)
140 MIDL_INTERFACE("43826d1e-e718-42ee-bc55-a1e261c37bfe")
141 IShellItem : public IUnknown
143 public:
144 virtual HRESULT STDMETHODCALLTYPE BindToHandler(
145 /* [unique][in] */ __RPC__in_opt IBindCtx *pbc,
146 /* [in] */ __RPC__in REFGUID bhid,
147 /* [in] */ __RPC__in REFIID riid,
148 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
150 virtual HRESULT STDMETHODCALLTYPE GetParent(
151 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi) = 0;
153 virtual HRESULT STDMETHODCALLTYPE GetDisplayName(
154 /* [in] */ SIGDN sigdnName,
155 /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName) = 0;
157 virtual HRESULT STDMETHODCALLTYPE GetAttributes(
158 /* [in] */ SFGAOF sfgaoMask,
159 /* [out] */ __RPC__out SFGAOF *psfgaoAttribs) = 0;
161 virtual HRESULT STDMETHODCALLTYPE Compare(
162 /* [in] */ __RPC__in_opt IShellItem *psi,
163 /* [in] */ SICHINTF hint,
164 /* [out] */ __RPC__out int *piOrder) = 0;
168 #else /* C style interface */
170 typedef struct IShellItemVtbl
172 BEGIN_INTERFACE
174 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
175 IShellItem * This,
176 /* [in] */ __RPC__in REFIID riid,
177 /* [iid_is][out] */
178 __RPC__deref_out void **ppvObject);
180 ULONG ( STDMETHODCALLTYPE *AddRef )(
181 IShellItem * This);
183 ULONG ( STDMETHODCALLTYPE *Release )(
184 IShellItem * This);
186 HRESULT ( STDMETHODCALLTYPE *BindToHandler )(
187 IShellItem * This,
188 /* [unique][in] */ __RPC__in_opt IBindCtx *pbc,
189 /* [in] */ __RPC__in REFGUID bhid,
190 /* [in] */ __RPC__in REFIID riid,
191 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
193 HRESULT ( STDMETHODCALLTYPE *GetParent )(
194 IShellItem * This,
195 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi);
197 HRESULT ( STDMETHODCALLTYPE *GetDisplayName )(
198 IShellItem * This,
199 /* [in] */ SIGDN sigdnName,
200 /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
202 HRESULT ( STDMETHODCALLTYPE *GetAttributes )(
203 IShellItem * This,
204 /* [in] */ SFGAOF sfgaoMask,
205 /* [out] */ __RPC__out SFGAOF *psfgaoAttribs);
207 HRESULT ( STDMETHODCALLTYPE *Compare )(
208 IShellItem * This,
209 /* [in] */ __RPC__in_opt IShellItem *psi,
210 /* [in] */ SICHINTF hint,
211 /* [out] */ __RPC__out int *piOrder);
213 END_INTERFACE
214 } IShellItemVtbl;
216 interface IShellItem
218 CONST_VTBL struct IShellItemVtbl *lpVtbl;
223 #ifdef COBJMACROS
226 #define IShellItem_QueryInterface(This,riid,ppvObject) \
227 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
229 #define IShellItem_AddRef(This) \
230 ( (This)->lpVtbl -> AddRef(This) )
232 #define IShellItem_Release(This) \
233 ( (This)->lpVtbl -> Release(This) )
236 #define IShellItem_BindToHandler(This,pbc,bhid,riid,ppv) \
237 ( (This)->lpVtbl -> BindToHandler(This,pbc,bhid,riid,ppv) )
239 #define IShellItem_GetParent(This,ppsi) \
240 ( (This)->lpVtbl -> GetParent(This,ppsi) )
242 #define IShellItem_GetDisplayName(This,sigdnName,ppszName) \
243 ( (This)->lpVtbl -> GetDisplayName(This,sigdnName,ppszName) )
245 #define IShellItem_GetAttributes(This,sfgaoMask,psfgaoAttribs) \
246 ( (This)->lpVtbl -> GetAttributes(This,sfgaoMask,psfgaoAttribs) )
248 #define IShellItem_Compare(This,psi,hint,piOrder) \
249 ( (This)->lpVtbl -> Compare(This,psi,hint,piOrder) )
251 #endif /* COBJMACROS */
254 #endif /* C style interface */
259 #endif /* __IShellItem_INTERFACE_DEFINED__ */
261 #ifndef __IFileDialogEvents_INTERFACE_DEFINED__
262 #define __IFileDialogEvents_INTERFACE_DEFINED__
264 /* interface IFileDialogEvents */
265 /* [unique][object][uuid] */
267 EXTERN_C const IID IID_IFileDialogEvents;
269 #if defined(__cplusplus) && !defined(CINTERFACE)
271 MIDL_INTERFACE("973510db-7d7f-452b-8975-74a85828d354")
272 IFileDialogEvents : public IUnknown
274 public:
275 virtual HRESULT STDMETHODCALLTYPE OnFileOk(
276 /* [in] */ __RPC__in_opt IFileDialog *pfd) = 0;
278 virtual HRESULT STDMETHODCALLTYPE OnFolderChanging(
279 /* [in] */ __RPC__in_opt IFileDialog *pfd,
280 /* [in] */ __RPC__in_opt IShellItem *psiFolder) = 0;
282 virtual HRESULT STDMETHODCALLTYPE OnFolderChange(
283 /* [in] */ __RPC__in_opt IFileDialog *pfd) = 0;
285 virtual HRESULT STDMETHODCALLTYPE OnSelectionChange(
286 /* [in] */ __RPC__in_opt IFileDialog *pfd) = 0;
288 virtual HRESULT STDMETHODCALLTYPE OnShareViolation(
289 /* [in] */ __RPC__in_opt IFileDialog *pfd,
290 /* [in] */ __RPC__in_opt IShellItem *psi,
291 /* [out] */ __RPC__out FDE_SHAREVIOLATION_RESPONSE *pResponse) = 0;
293 virtual HRESULT STDMETHODCALLTYPE OnTypeChange(
294 /* [in] */ __RPC__in_opt IFileDialog *pfd) = 0;
296 virtual HRESULT STDMETHODCALLTYPE OnOverwrite(
297 /* [in] */ __RPC__in_opt IFileDialog *pfd,
298 /* [in] */ __RPC__in_opt IShellItem *psi,
299 /* [out] */ __RPC__out FDE_OVERWRITE_RESPONSE *pResponse) = 0;
303 #else /* C style interface */
305 typedef struct IFileDialogEventsVtbl
307 BEGIN_INTERFACE
309 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
310 IFileDialogEvents * This,
311 /* [in] */ __RPC__in REFIID riid,
312 /* [iid_is][out] */
313 __RPC__deref_out void **ppvObject);
315 ULONG ( STDMETHODCALLTYPE *AddRef )(
316 IFileDialogEvents * This);
318 ULONG ( STDMETHODCALLTYPE *Release )(
319 IFileDialogEvents * This);
321 HRESULT ( STDMETHODCALLTYPE *OnFileOk )(
322 IFileDialogEvents * This,
323 /* [in] */ __RPC__in_opt IFileDialog *pfd);
325 HRESULT ( STDMETHODCALLTYPE *OnFolderChanging )(
326 IFileDialogEvents * This,
327 /* [in] */ __RPC__in_opt IFileDialog *pfd,
328 /* [in] */ __RPC__in_opt IShellItem *psiFolder);
330 HRESULT ( STDMETHODCALLTYPE *OnFolderChange )(
331 IFileDialogEvents * This,
332 /* [in] */ __RPC__in_opt IFileDialog *pfd);
334 HRESULT ( STDMETHODCALLTYPE *OnSelectionChange )(
335 IFileDialogEvents * This,
336 /* [in] */ __RPC__in_opt IFileDialog *pfd);
338 HRESULT ( STDMETHODCALLTYPE *OnShareViolation )(
339 IFileDialogEvents * This,
340 /* [in] */ __RPC__in_opt IFileDialog *pfd,
341 /* [in] */ __RPC__in_opt IShellItem *psi,
342 /* [out] */ __RPC__out FDE_SHAREVIOLATION_RESPONSE *pResponse);
344 HRESULT ( STDMETHODCALLTYPE *OnTypeChange )(
345 IFileDialogEvents * This,
346 /* [in] */ __RPC__in_opt IFileDialog *pfd);
348 HRESULT ( STDMETHODCALLTYPE *OnOverwrite )(
349 IFileDialogEvents * This,
350 /* [in] */ __RPC__in_opt IFileDialog *pfd,
351 /* [in] */ __RPC__in_opt IShellItem *psi,
352 /* [out] */ __RPC__out FDE_OVERWRITE_RESPONSE *pResponse);
354 END_INTERFACE
355 } IFileDialogEventsVtbl;
357 interface IFileDialogEvents
359 CONST_VTBL struct IFileDialogEventsVtbl *lpVtbl;
364 #ifdef COBJMACROS
367 #define IFileDialogEvents_QueryInterface(This,riid,ppvObject) \
368 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
370 #define IFileDialogEvents_AddRef(This) \
371 ( (This)->lpVtbl -> AddRef(This) )
373 #define IFileDialogEvents_Release(This) \
374 ( (This)->lpVtbl -> Release(This) )
377 #define IFileDialogEvents_OnFileOk(This,pfd) \
378 ( (This)->lpVtbl -> OnFileOk(This,pfd) )
380 #define IFileDialogEvents_OnFolderChanging(This,pfd,psiFolder) \
381 ( (This)->lpVtbl -> OnFolderChanging(This,pfd,psiFolder) )
383 #define IFileDialogEvents_OnFolderChange(This,pfd) \
384 ( (This)->lpVtbl -> OnFolderChange(This,pfd) )
386 #define IFileDialogEvents_OnSelectionChange(This,pfd) \
387 ( (This)->lpVtbl -> OnSelectionChange(This,pfd) )
389 #define IFileDialogEvents_OnShareViolation(This,pfd,psi,pResponse) \
390 ( (This)->lpVtbl -> OnShareViolation(This,pfd,psi,pResponse) )
392 #define IFileDialogEvents_OnTypeChange(This,pfd) \
393 ( (This)->lpVtbl -> OnTypeChange(This,pfd) )
395 #define IFileDialogEvents_OnOverwrite(This,pfd,psi,pResponse) \
396 ( (This)->lpVtbl -> OnOverwrite(This,pfd,psi,pResponse) )
398 #endif /* COBJMACROS */
401 #endif /* C style interface */
406 #endif /* __IFileDialogEvents_INTERFACE_DEFINED__ */
409 #ifndef __IModalWindow_INTERFACE_DEFINED__
410 #define __IModalWindow_INTERFACE_DEFINED__
412 /* interface IModalWindow */
413 /* [unique][object][uuid][helpstring] */
416 EXTERN_C const IID IID_IModalWindow;
418 #if defined(__cplusplus) && !defined(CINTERFACE)
420 MIDL_INTERFACE("b4db1657-70d7-485e-8e3e-6fcb5a5c1802")
421 IModalWindow : public IUnknown
423 public:
424 virtual /* [local] */ HRESULT STDMETHODCALLTYPE Show(
425 /* [in] */
426 __in HWND hwndParent) = 0;
430 #else /* C style interface */
432 typedef struct IModalWindowVtbl
434 BEGIN_INTERFACE
436 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
437 IModalWindow * This,
438 /* [in] */ __RPC__in REFIID riid,
439 /* [iid_is][out] */
440 __RPC__deref_out void **ppvObject);
442 ULONG ( STDMETHODCALLTYPE *AddRef )(
443 IModalWindow * This);
445 ULONG ( STDMETHODCALLTYPE *Release )(
446 IModalWindow * This);
448 /* [local] */ HRESULT ( STDMETHODCALLTYPE *Show )(
449 IModalWindow * This,
450 /* [in] */
451 __in HWND hwndParent);
453 END_INTERFACE
454 } IModalWindowVtbl;
456 interface IModalWindow
458 CONST_VTBL struct IModalWindowVtbl *lpVtbl;
463 #ifdef COBJMACROS
466 #define IModalWindow_QueryInterface(This,riid,ppvObject) \
467 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
469 #define IModalWindow_AddRef(This) \
470 ( (This)->lpVtbl -> AddRef(This) )
472 #define IModalWindow_Release(This) \
473 ( (This)->lpVtbl -> Release(This) )
476 #define IModalWindow_Show(This,hwndParent) \
477 ( (This)->lpVtbl -> Show(This,hwndParent) )
479 #endif /* COBJMACROS */
482 #endif /* C style interface */
486 /* [call_as] */ HRESULT STDMETHODCALLTYPE IModalWindow_RemoteShow_Proxy(
487 IModalWindow * This,
488 /* [in] */ __RPC__in HWND hwndParent);
491 void __RPC_STUB IModalWindow_RemoteShow_Stub(
492 IRpcStubBuffer *This,
493 IRpcChannelBuffer *_pRpcChannelBuffer,
494 PRPC_MESSAGE _pRpcMessage,
495 DWORD *_pdwStubPhase);
499 #endif /* __IModalWindow_INTERFACE_DEFINED__ */
501 #ifndef __IShellItemFilter_INTERFACE_DEFINED__
502 #define __IShellItemFilter_INTERFACE_DEFINED__
504 /* interface IShellItemFilter */
505 /* [unique][uuid][object] */
508 EXTERN_C const IID IID_IShellItemFilter;
510 #if defined(__cplusplus) && !defined(CINTERFACE)
512 MIDL_INTERFACE("2659B475-EEB8-48b7-8F07-B378810F48CF")
513 IShellItemFilter : public IUnknown
515 public:
516 virtual HRESULT STDMETHODCALLTYPE IncludeItem(
517 /* [in] */ __RPC__in_opt IShellItem *psi) = 0;
519 virtual HRESULT STDMETHODCALLTYPE GetEnumFlagsForItem(
520 /* [in] */ __RPC__in_opt IShellItem *psi,
521 /* [out] */ __RPC__out SHCONTF *pgrfFlags) = 0;
525 #else /* C style interface */
527 typedef struct IShellItemFilterVtbl
529 BEGIN_INTERFACE
531 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
532 IShellItemFilter * This,
533 /* [in] */ __RPC__in REFIID riid,
534 /* [iid_is][out] */
535 __RPC__deref_out void **ppvObject);
537 ULONG ( STDMETHODCALLTYPE *AddRef )(
538 IShellItemFilter * This);
540 ULONG ( STDMETHODCALLTYPE *Release )(
541 IShellItemFilter * This);
543 HRESULT ( STDMETHODCALLTYPE *IncludeItem )(
544 IShellItemFilter * This,
545 /* [in] */ __RPC__in_opt IShellItem *psi);
547 HRESULT ( STDMETHODCALLTYPE *GetEnumFlagsForItem )(
548 IShellItemFilter * This,
549 /* [in] */ __RPC__in_opt IShellItem *psi,
550 /* [out] */ __RPC__out SHCONTF *pgrfFlags);
552 END_INTERFACE
553 } IShellItemFilterVtbl;
555 interface IShellItemFilter
557 CONST_VTBL struct IShellItemFilterVtbl *lpVtbl;
562 #ifdef COBJMACROS
565 #define IShellItemFilter_QueryInterface(This,riid,ppvObject) \
566 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
568 #define IShellItemFilter_AddRef(This) \
569 ( (This)->lpVtbl -> AddRef(This) )
571 #define IShellItemFilter_Release(This) \
572 ( (This)->lpVtbl -> Release(This) )
575 #define IShellItemFilter_IncludeItem(This,psi) \
576 ( (This)->lpVtbl -> IncludeItem(This,psi) )
578 #define IShellItemFilter_GetEnumFlagsForItem(This,psi,pgrfFlags) \
579 ( (This)->lpVtbl -> GetEnumFlagsForItem(This,psi,pgrfFlags) )
581 #endif /* COBJMACROS */
584 #endif /* C style interface */
589 #endif /* __IShellItemFilter_INTERFACE_DEFINED__ */
594 #ifndef __IFileDialog_INTERFACE_DEFINED__
595 #define __IFileDialog_INTERFACE_DEFINED__
597 /* interface IFileDialog */
598 /* [unique][object][uuid] */
601 enum tagFILEOPENDIALOGOPTIONS
602 { FOS_OVERWRITEPROMPT = 0x2,
603 FOS_STRICTFILETYPES = 0x4,
604 FOS_NOCHANGEDIR = 0x8,
605 FOS_PICKFOLDERS = 0x20,
606 FOS_FORCEFILESYSTEM = 0x40,
607 FOS_ALLNONSTORAGEITEMS = 0x80,
608 FOS_NOVALIDATE = 0x100,
609 FOS_ALLOWMULTISELECT = 0x200,
610 FOS_PATHMUSTEXIST = 0x800,
611 FOS_FILEMUSTEXIST = 0x1000,
612 FOS_CREATEPROMPT = 0x2000,
613 FOS_SHAREAWARE = 0x4000,
614 FOS_NOREADONLYRETURN = 0x8000,
615 FOS_NOTESTFILECREATE = 0x10000,
616 FOS_HIDEMRUPLACES = 0x20000,
617 FOS_HIDEPINNEDPLACES = 0x40000,
618 FOS_NODEREFERENCELINKS = 0x100000,
619 FOS_DONTADDTORECENT = 0x2000000,
620 FOS_FORCESHOWHIDDEN = 0x10000000,
621 FOS_DEFAULTNOMINIMODE = 0x20000000,
622 FOS_FORCEPREVIEWPANEON = 0x40000000
625 EXTERN_C const IID IID_IFileDialog;
627 #if defined(__cplusplus) && !defined(CINTERFACE)
629 MIDL_INTERFACE("42f85136-db7e-439c-85f1-e4075d135fc8")
630 IFileDialog : public IModalWindow
632 public:
633 virtual HRESULT STDMETHODCALLTYPE SetFileTypes(
634 /* [in] */ UINT cFileTypes,
635 /* [size_is][in] */ __RPC__in_ecount_full(cFileTypes) const COMDLG_FILTERSPEC *rgFilterSpec) = 0;
637 virtual HRESULT STDMETHODCALLTYPE SetFileTypeIndex(
638 /* [in] */ UINT iFileType) = 0;
640 virtual HRESULT STDMETHODCALLTYPE GetFileTypeIndex(
641 /* [out] */ __RPC__out UINT *piFileType) = 0;
643 virtual HRESULT STDMETHODCALLTYPE Advise(
644 /* [in] */ __RPC__in_opt IFileDialogEvents *pfde,
645 /* [out] */ __RPC__out DWORD *pdwCookie) = 0;
647 virtual HRESULT STDMETHODCALLTYPE Unadvise(
648 /* [in] */ DWORD dwCookie) = 0;
650 virtual HRESULT STDMETHODCALLTYPE SetOptions(
651 /* [in] */ DWORD fos) = 0;
653 virtual HRESULT STDMETHODCALLTYPE GetOptions(
654 /* [out] */ __RPC__out DWORD *pfos) = 0;
656 virtual HRESULT STDMETHODCALLTYPE SetDefaultFolder(
657 /* [in] */ __RPC__in_opt IShellItem *psi) = 0;
659 virtual HRESULT STDMETHODCALLTYPE SetFolder(
660 /* [in] */ __RPC__in_opt IShellItem *psi) = 0;
662 virtual HRESULT STDMETHODCALLTYPE GetFolder(
663 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi) = 0;
665 virtual HRESULT STDMETHODCALLTYPE GetCurrentSelection(
666 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi) = 0;
668 virtual HRESULT STDMETHODCALLTYPE SetFileName(
669 /* [string][in] */ __RPC__in LPCWSTR pszName) = 0;
671 virtual HRESULT STDMETHODCALLTYPE GetFileName(
672 /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *pszName) = 0;
674 virtual HRESULT STDMETHODCALLTYPE SetTitle(
675 /* [string][in] */ __RPC__in LPCWSTR pszTitle) = 0;
677 virtual HRESULT STDMETHODCALLTYPE SetOkButtonLabel(
678 /* [string][in] */ __RPC__in LPCWSTR pszText) = 0;
680 virtual HRESULT STDMETHODCALLTYPE SetFileNameLabel(
681 /* [string][in] */ __RPC__in LPCWSTR pszLabel) = 0;
683 virtual HRESULT STDMETHODCALLTYPE GetResult(
684 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi) = 0;
686 virtual HRESULT STDMETHODCALLTYPE AddPlace(
687 /* [in] */ __RPC__in_opt IShellItem *psi,
688 /* [in] */ FDAP fdap) = 0;
690 virtual HRESULT STDMETHODCALLTYPE SetDefaultExtension(
691 /* [string][in] */ __RPC__in LPCWSTR pszDefaultExtension) = 0;
693 virtual HRESULT STDMETHODCALLTYPE Close(
694 /* [in] */ HRESULT hr) = 0;
696 virtual HRESULT STDMETHODCALLTYPE SetClientGuid(
697 /* [in] */ __RPC__in REFGUID guid) = 0;
699 virtual HRESULT STDMETHODCALLTYPE ClearClientData( void) = 0;
701 virtual HRESULT STDMETHODCALLTYPE SetFilter(
702 /* [in] */ __RPC__in_opt IShellItemFilter *pFilter) = 0;
706 #else /* C style interface */
708 typedef struct IFileDialogVtbl
710 BEGIN_INTERFACE
712 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
713 IFileDialog * This,
714 /* [in] */ __RPC__in REFIID riid,
715 /* [iid_is][out] */
716 __RPC__deref_out void **ppvObject);
718 ULONG ( STDMETHODCALLTYPE *AddRef )(
719 IFileDialog * This);
721 ULONG ( STDMETHODCALLTYPE *Release )(
722 IFileDialog * This);
724 /* [local] */ HRESULT ( STDMETHODCALLTYPE *Show )(
725 IFileDialog * This,
726 /* [in] */
727 __in HWND hwndParent);
729 HRESULT ( STDMETHODCALLTYPE *SetFileTypes )(
730 IFileDialog * This,
731 /* [in] */ UINT cFileTypes,
732 /* [size_is][in] */ __RPC__in_ecount_full(cFileTypes) const COMDLG_FILTERSPEC *rgFilterSpec);
734 HRESULT ( STDMETHODCALLTYPE *SetFileTypeIndex )(
735 IFileDialog * This,
736 /* [in] */ UINT iFileType);
738 HRESULT ( STDMETHODCALLTYPE *GetFileTypeIndex )(
739 IFileDialog * This,
740 /* [out] */ __RPC__out UINT *piFileType);
742 HRESULT ( STDMETHODCALLTYPE *Advise )(
743 IFileDialog * This,
744 /* [in] */ __RPC__in_opt IFileDialogEvents *pfde,
745 /* [out] */ __RPC__out DWORD *pdwCookie);
747 HRESULT ( STDMETHODCALLTYPE *Unadvise )(
748 IFileDialog * This,
749 /* [in] */ DWORD dwCookie);
751 HRESULT ( STDMETHODCALLTYPE *SetOptions )(
752 IFileDialog * This,
753 /* [in] */ DWORD fos);
755 HRESULT ( STDMETHODCALLTYPE *GetOptions )(
756 IFileDialog * This,
757 /* [out] */ __RPC__out DWORD *pfos);
759 HRESULT ( STDMETHODCALLTYPE *SetDefaultFolder )(
760 IFileDialog * This,
761 /* [in] */ __RPC__in_opt IShellItem *psi);
763 HRESULT ( STDMETHODCALLTYPE *SetFolder )(
764 IFileDialog * This,
765 /* [in] */ __RPC__in_opt IShellItem *psi);
767 HRESULT ( STDMETHODCALLTYPE *GetFolder )(
768 IFileDialog * This,
769 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi);
771 HRESULT ( STDMETHODCALLTYPE *GetCurrentSelection )(
772 IFileDialog * This,
773 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi);
775 HRESULT ( STDMETHODCALLTYPE *SetFileName )(
776 IFileDialog * This,
777 /* [string][in] */ __RPC__in LPCWSTR pszName);
779 HRESULT ( STDMETHODCALLTYPE *GetFileName )(
780 IFileDialog * This,
781 /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *pszName);
783 HRESULT ( STDMETHODCALLTYPE *SetTitle )(
784 IFileDialog * This,
785 /* [string][in] */ __RPC__in LPCWSTR pszTitle);
787 HRESULT ( STDMETHODCALLTYPE *SetOkButtonLabel )(
788 IFileDialog * This,
789 /* [string][in] */ __RPC__in LPCWSTR pszText);
791 HRESULT ( STDMETHODCALLTYPE *SetFileNameLabel )(
792 IFileDialog * This,
793 /* [string][in] */ __RPC__in LPCWSTR pszLabel);
795 HRESULT ( STDMETHODCALLTYPE *GetResult )(
796 IFileDialog * This,
797 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi);
799 HRESULT ( STDMETHODCALLTYPE *AddPlace )(
800 IFileDialog * This,
801 /* [in] */ __RPC__in_opt IShellItem *psi,
802 /* [in] */ FDAP fdap);
804 HRESULT ( STDMETHODCALLTYPE *SetDefaultExtension )(
805 IFileDialog * This,
806 /* [string][in] */ __RPC__in LPCWSTR pszDefaultExtension);
808 HRESULT ( STDMETHODCALLTYPE *Close )(
809 IFileDialog * This,
810 /* [in] */ HRESULT hr);
812 HRESULT ( STDMETHODCALLTYPE *SetClientGuid )(
813 IFileDialog * This,
814 /* [in] */ __RPC__in REFGUID guid);
816 HRESULT ( STDMETHODCALLTYPE *ClearClientData )(
817 IFileDialog * This);
819 HRESULT ( STDMETHODCALLTYPE *SetFilter )(
820 IFileDialog * This,
821 /* [in] */ __RPC__in_opt IShellItemFilter *pFilter);
823 END_INTERFACE
824 } IFileDialogVtbl;
826 interface IFileDialog
828 CONST_VTBL struct IFileDialogVtbl *lpVtbl;
833 #ifdef COBJMACROS
836 #define IFileDialog_QueryInterface(This,riid,ppvObject) \
837 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
839 #define IFileDialog_AddRef(This) \
840 ( (This)->lpVtbl -> AddRef(This) )
842 #define IFileDialog_Release(This) \
843 ( (This)->lpVtbl -> Release(This) )
846 #define IFileDialog_Show(This,hwndParent) \
847 ( (This)->lpVtbl -> Show(This,hwndParent) )
850 #define IFileDialog_SetFileTypes(This,cFileTypes,rgFilterSpec) \
851 ( (This)->lpVtbl -> SetFileTypes(This,cFileTypes,rgFilterSpec) )
853 #define IFileDialog_SetFileTypeIndex(This,iFileType) \
854 ( (This)->lpVtbl -> SetFileTypeIndex(This,iFileType) )
856 #define IFileDialog_GetFileTypeIndex(This,piFileType) \
857 ( (This)->lpVtbl -> GetFileTypeIndex(This,piFileType) )
859 #define IFileDialog_Advise(This,pfde,pdwCookie) \
860 ( (This)->lpVtbl -> Advise(This,pfde,pdwCookie) )
862 #define IFileDialog_Unadvise(This,dwCookie) \
863 ( (This)->lpVtbl -> Unadvise(This,dwCookie) )
865 #define IFileDialog_SetOptions(This,fos) \
866 ( (This)->lpVtbl -> SetOptions(This,fos) )
868 #define IFileDialog_GetOptions(This,pfos) \
869 ( (This)->lpVtbl -> GetOptions(This,pfos) )
871 #define IFileDialog_SetDefaultFolder(This,psi) \
872 ( (This)->lpVtbl -> SetDefaultFolder(This,psi) )
874 #define IFileDialog_SetFolder(This,psi) \
875 ( (This)->lpVtbl -> SetFolder(This,psi) )
877 #define IFileDialog_GetFolder(This,ppsi) \
878 ( (This)->lpVtbl -> GetFolder(This,ppsi) )
880 #define IFileDialog_GetCurrentSelection(This,ppsi) \
881 ( (This)->lpVtbl -> GetCurrentSelection(This,ppsi) )
883 #define IFileDialog_SetFileName(This,pszName) \
884 ( (This)->lpVtbl -> SetFileName(This,pszName) )
886 #define IFileDialog_GetFileName(This,pszName) \
887 ( (This)->lpVtbl -> GetFileName(This,pszName) )
889 #define IFileDialog_SetTitle(This,pszTitle) \
890 ( (This)->lpVtbl -> SetTitle(This,pszTitle) )
892 #define IFileDialog_SetOkButtonLabel(This,pszText) \
893 ( (This)->lpVtbl -> SetOkButtonLabel(This,pszText) )
895 #define IFileDialog_SetFileNameLabel(This,pszLabel) \
896 ( (This)->lpVtbl -> SetFileNameLabel(This,pszLabel) )
898 #define IFileDialog_GetResult(This,ppsi) \
899 ( (This)->lpVtbl -> GetResult(This,ppsi) )
901 #define IFileDialog_AddPlace(This,psi,fdap) \
902 ( (This)->lpVtbl -> AddPlace(This,psi,fdap) )
904 #define IFileDialog_SetDefaultExtension(This,pszDefaultExtension) \
905 ( (This)->lpVtbl -> SetDefaultExtension(This,pszDefaultExtension) )
907 #define IFileDialog_Close(This,hr) \
908 ( (This)->lpVtbl -> Close(This,hr) )
910 #define IFileDialog_SetClientGuid(This,guid) \
911 ( (This)->lpVtbl -> SetClientGuid(This,guid) )
913 #define IFileDialog_ClearClientData(This) \
914 ( (This)->lpVtbl -> ClearClientData(This) )
916 #define IFileDialog_SetFilter(This,pFilter) \
917 ( (This)->lpVtbl -> SetFilter(This,pFilter) )
919 #endif /* COBJMACROS */
922 #endif /* C style interface */
925 #ifndef __IEnumShellItems_INTERFACE_DEFINED__
926 #define __IEnumShellItems_INTERFACE_DEFINED__
928 /* interface IEnumShellItems */
929 /* [unique][object][uuid][helpstring] */
932 EXTERN_C const IID IID_IEnumShellItems;
934 #if defined(__cplusplus) && !defined(CINTERFACE)
936 MIDL_INTERFACE("70629033-e363-4a28-a567-0db78006e6d7")
937 IEnumShellItems : public IUnknown
939 public:
940 virtual HRESULT STDMETHODCALLTYPE Next(
941 /* [in] */ ULONG celt,
942 /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) IShellItem **rgelt,
943 /* [out] */ __RPC__out ULONG *pceltFetched) = 0;
945 virtual HRESULT STDMETHODCALLTYPE Skip(
946 /* [in] */ ULONG celt) = 0;
948 virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
950 virtual HRESULT STDMETHODCALLTYPE Clone(
951 /* [out] */ __RPC__deref_out_opt IEnumShellItems **ppenum) = 0;
955 #else /* C style interface */
957 typedef struct IEnumShellItemsVtbl
959 BEGIN_INTERFACE
961 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
962 IEnumShellItems * This,
963 /* [in] */ __RPC__in REFIID riid,
964 /* [iid_is][out] */
965 __RPC__deref_out void **ppvObject);
967 ULONG ( STDMETHODCALLTYPE *AddRef )(
968 IEnumShellItems * This);
970 ULONG ( STDMETHODCALLTYPE *Release )(
971 IEnumShellItems * This);
973 HRESULT ( STDMETHODCALLTYPE *Next )(
974 IEnumShellItems * This,
975 /* [in] */ ULONG celt,
976 /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) IShellItem **rgelt,
977 /* [out] */ __RPC__out ULONG *pceltFetched);
979 HRESULT ( STDMETHODCALLTYPE *Skip )(
980 IEnumShellItems * This,
981 /* [in] */ ULONG celt);
983 HRESULT ( STDMETHODCALLTYPE *Reset )(
984 IEnumShellItems * This);
986 HRESULT ( STDMETHODCALLTYPE *Clone )(
987 IEnumShellItems * This,
988 /* [out] */ __RPC__deref_out_opt IEnumShellItems **ppenum);
990 END_INTERFACE
991 } IEnumShellItemsVtbl;
993 interface IEnumShellItems
995 CONST_VTBL struct IEnumShellItemsVtbl *lpVtbl;
1000 #ifdef COBJMACROS
1003 #define IEnumShellItems_QueryInterface(This,riid,ppvObject) \
1004 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
1006 #define IEnumShellItems_AddRef(This) \
1007 ( (This)->lpVtbl -> AddRef(This) )
1009 #define IEnumShellItems_Release(This) \
1010 ( (This)->lpVtbl -> Release(This) )
1013 #define IEnumShellItems_Next(This,celt,rgelt,pceltFetched) \
1014 ( (This)->lpVtbl -> Next(This,celt,rgelt,pceltFetched) )
1016 #define IEnumShellItems_Skip(This,celt) \
1017 ( (This)->lpVtbl -> Skip(This,celt) )
1019 #define IEnumShellItems_Reset(This) \
1020 ( (This)->lpVtbl -> Reset(This) )
1022 #define IEnumShellItems_Clone(This,ppenum) \
1023 ( (This)->lpVtbl -> Clone(This,ppenum) )
1025 #endif /* COBJMACROS */
1028 #endif /* C style interface */
1033 #endif /* __IEnumShellItems_INTERFACE_DEFINED__ */
1036 #ifndef __IShellItemArray_INTERFACE_DEFINED__
1037 #define __IShellItemArray_INTERFACE_DEFINED__
1039 /* interface IShellItemArray */
1040 /* [unique][object][uuid][helpstring] */
1042 typedef /* [v1_enum] */
1043 enum tagSIATTRIBFLAGS
1044 { SIATTRIBFLAGS_AND = 0x1,
1045 SIATTRIBFLAGS_OR = 0x2,
1046 SIATTRIBFLAGS_APPCOMPAT = 0x3,
1047 SIATTRIBFLAGS_MASK = 0x3
1048 } SIATTRIBFLAGS;
1051 EXTERN_C const IID IID_IShellItemArray;
1053 #if defined(__cplusplus) && !defined(CINTERFACE)
1055 MIDL_INTERFACE("b63ea76d-1f85-456f-a19c-48159efa858b")
1056 IShellItemArray : public IUnknown
1058 public:
1059 virtual HRESULT STDMETHODCALLTYPE BindToHandler(
1060 /* [unique][in] */ __RPC__in_opt IBindCtx *pbc,
1061 /* [in] */ __RPC__in REFGUID rbhid,
1062 /* [in] */ __RPC__in REFIID riid,
1063 /* [iid_is][out] */ __RPC__deref_out_opt void **ppvOut) = 0;
1065 virtual HRESULT STDMETHODCALLTYPE GetPropertyStore(
1066 /* [in] */ GETPROPERTYSTOREFLAGS flags,
1067 /* [in] */ __RPC__in REFIID riid,
1068 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
1070 virtual HRESULT STDMETHODCALLTYPE GetPropertyDescriptionList(
1071 /* [in] */ __RPC__in REFPROPERTYKEY keyType,
1072 /* [in] */ __RPC__in REFIID riid,
1073 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
1075 virtual HRESULT STDMETHODCALLTYPE GetAttributes(
1076 /* [in] */ SIATTRIBFLAGS dwAttribFlags,
1077 /* [in] */ SFGAOF sfgaoMask,
1078 /* [out] */ __RPC__out SFGAOF *psfgaoAttribs) = 0;
1080 virtual HRESULT STDMETHODCALLTYPE GetCount(
1081 /* [out] */ __RPC__out DWORD *pdwNumItems) = 0;
1083 virtual HRESULT STDMETHODCALLTYPE GetItemAt(
1084 /* [in] */ DWORD dwIndex,
1085 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi) = 0;
1087 virtual HRESULT STDMETHODCALLTYPE EnumItems(
1088 /* [out] */ __RPC__deref_out_opt IEnumShellItems **ppenumShellItems) = 0;
1092 #else /* C style interface */
1094 typedef struct IShellItemArrayVtbl
1096 BEGIN_INTERFACE
1098 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
1099 IShellItemArray * This,
1100 /* [in] */ __RPC__in REFIID riid,
1101 /* [iid_is][out] */
1102 __RPC__deref_out void **ppvObject);
1104 ULONG ( STDMETHODCALLTYPE *AddRef )(
1105 IShellItemArray * This);
1107 ULONG ( STDMETHODCALLTYPE *Release )(
1108 IShellItemArray * This);
1110 HRESULT ( STDMETHODCALLTYPE *BindToHandler )(
1111 IShellItemArray * This,
1112 /* [unique][in] */ __RPC__in_opt IBindCtx *pbc,
1113 /* [in] */ __RPC__in REFGUID rbhid,
1114 /* [in] */ __RPC__in REFIID riid,
1115 /* [iid_is][out] */ __RPC__deref_out_opt void **ppvOut);
1117 HRESULT ( STDMETHODCALLTYPE *GetPropertyStore )(
1118 IShellItemArray * This,
1119 /* [in] */ GETPROPERTYSTOREFLAGS flags,
1120 /* [in] */ __RPC__in REFIID riid,
1121 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
1123 HRESULT ( STDMETHODCALLTYPE *GetPropertyDescriptionList )(
1124 IShellItemArray * This,
1125 /* [in] */ __RPC__in REFPROPERTYKEY keyType,
1126 /* [in] */ __RPC__in REFIID riid,
1127 /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
1129 HRESULT ( STDMETHODCALLTYPE *GetAttributes )(
1130 IShellItemArray * This,
1131 /* [in] */ SIATTRIBFLAGS dwAttribFlags,
1132 /* [in] */ SFGAOF sfgaoMask,
1133 /* [out] */ __RPC__out SFGAOF *psfgaoAttribs);
1135 HRESULT ( STDMETHODCALLTYPE *GetCount )(
1136 IShellItemArray * This,
1137 /* [out] */ __RPC__out DWORD *pdwNumItems);
1139 HRESULT ( STDMETHODCALLTYPE *GetItemAt )(
1140 IShellItemArray * This,
1141 /* [in] */ DWORD dwIndex,
1142 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi);
1144 HRESULT ( STDMETHODCALLTYPE *EnumItems )(
1145 IShellItemArray * This,
1146 /* [out] */ __RPC__deref_out_opt IEnumShellItems **ppenumShellItems);
1148 END_INTERFACE
1149 } IShellItemArrayVtbl;
1151 interface IShellItemArray
1153 CONST_VTBL struct IShellItemArrayVtbl *lpVtbl;
1158 #ifdef COBJMACROS
1161 #define IShellItemArray_QueryInterface(This,riid,ppvObject) \
1162 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
1164 #define IShellItemArray_AddRef(This) \
1165 ( (This)->lpVtbl -> AddRef(This) )
1167 #define IShellItemArray_Release(This) \
1168 ( (This)->lpVtbl -> Release(This) )
1171 #define IShellItemArray_BindToHandler(This,pbc,rbhid,riid,ppvOut) \
1172 ( (This)->lpVtbl -> BindToHandler(This,pbc,rbhid,riid,ppvOut) )
1174 #define IShellItemArray_GetPropertyStore(This,flags,riid,ppv) \
1175 ( (This)->lpVtbl -> GetPropertyStore(This,flags,riid,ppv) )
1177 #define IShellItemArray_GetPropertyDescriptionList(This,keyType,riid,ppv) \
1178 ( (This)->lpVtbl -> GetPropertyDescriptionList(This,keyType,riid,ppv) )
1180 #define IShellItemArray_GetAttributes(This,dwAttribFlags,sfgaoMask,psfgaoAttribs) \
1181 ( (This)->lpVtbl -> GetAttributes(This,dwAttribFlags,sfgaoMask,psfgaoAttribs) )
1183 #define IShellItemArray_GetCount(This,pdwNumItems) \
1184 ( (This)->lpVtbl -> GetCount(This,pdwNumItems) )
1186 #define IShellItemArray_GetItemAt(This,dwIndex,ppsi) \
1187 ( (This)->lpVtbl -> GetItemAt(This,dwIndex,ppsi) )
1189 #define IShellItemArray_EnumItems(This,ppenumShellItems) \
1190 ( (This)->lpVtbl -> EnumItems(This,ppenumShellItems) )
1192 #endif /* COBJMACROS */
1195 #endif /* C style interface */
1200 #endif /* __IShellItemArray_INTERFACE_DEFINED__ */
1206 #endif /* __IFileDialog_INTERFACE_DEFINED__ */
1208 #ifndef __IFileOpenDialog_INTERFACE_DEFINED__
1209 #define __IFileOpenDialog_INTERFACE_DEFINED__
1211 /* interface IFileOpenDialog */
1212 /* [unique][object][uuid] */
1215 EXTERN_C const IID IID_IFileOpenDialog;
1217 #if defined(__cplusplus) && !defined(CINTERFACE)
1219 MIDL_INTERFACE("d57c7288-d4ad-4768-be02-9d969532d960")
1220 IFileOpenDialog : public IFileDialog
1222 public:
1223 virtual HRESULT STDMETHODCALLTYPE GetResults(
1224 /* [out] */ __RPC__deref_out_opt IShellItemArray **ppenum) = 0;
1226 virtual HRESULT STDMETHODCALLTYPE GetSelectedItems(
1227 /* [out] */ __RPC__deref_out_opt IShellItemArray **ppsai) = 0;
1231 #else /* C style interface */
1233 typedef struct IFileOpenDialogVtbl
1235 BEGIN_INTERFACE
1237 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
1238 IFileOpenDialog * This,
1239 /* [in] */ __RPC__in REFIID riid,
1240 /* [iid_is][out] */
1241 __RPC__deref_out void **ppvObject);
1243 ULONG ( STDMETHODCALLTYPE *AddRef )(
1244 IFileOpenDialog * This);
1246 ULONG ( STDMETHODCALLTYPE *Release )(
1247 IFileOpenDialog * This);
1249 /* [local] */ HRESULT ( STDMETHODCALLTYPE *Show )(
1250 IFileOpenDialog * This,
1251 /* [in] */
1252 __in HWND hwndParent);
1254 HRESULT ( STDMETHODCALLTYPE *SetFileTypes )(
1255 IFileOpenDialog * This,
1256 /* [in] */ UINT cFileTypes,
1257 /* [size_is][in] */ __RPC__in_ecount_full(cFileTypes) const COMDLG_FILTERSPEC *rgFilterSpec);
1259 HRESULT ( STDMETHODCALLTYPE *SetFileTypeIndex )(
1260 IFileOpenDialog * This,
1261 /* [in] */ UINT iFileType);
1263 HRESULT ( STDMETHODCALLTYPE *GetFileTypeIndex )(
1264 IFileOpenDialog * This,
1265 /* [out] */ __RPC__out UINT *piFileType);
1267 HRESULT ( STDMETHODCALLTYPE *Advise )(
1268 IFileOpenDialog * This,
1269 /* [in] */ __RPC__in_opt IFileDialogEvents *pfde,
1270 /* [out] */ __RPC__out DWORD *pdwCookie);
1272 HRESULT ( STDMETHODCALLTYPE *Unadvise )(
1273 IFileOpenDialog * This,
1274 /* [in] */ DWORD dwCookie);
1276 HRESULT ( STDMETHODCALLTYPE *SetOptions )(
1277 IFileOpenDialog * This,
1278 /* [in] */ DWORD fos);
1280 HRESULT ( STDMETHODCALLTYPE *GetOptions )(
1281 IFileOpenDialog * This,
1282 /* [out] */ __RPC__out DWORD *pfos);
1284 HRESULT ( STDMETHODCALLTYPE *SetDefaultFolder )(
1285 IFileOpenDialog * This,
1286 /* [in] */ __RPC__in_opt IShellItem *psi);
1288 HRESULT ( STDMETHODCALLTYPE *SetFolder )(
1289 IFileOpenDialog * This,
1290 /* [in] */ __RPC__in_opt IShellItem *psi);
1292 HRESULT ( STDMETHODCALLTYPE *GetFolder )(
1293 IFileOpenDialog * This,
1294 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi);
1296 HRESULT ( STDMETHODCALLTYPE *GetCurrentSelection )(
1297 IFileOpenDialog * This,
1298 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi);
1300 HRESULT ( STDMETHODCALLTYPE *SetFileName )(
1301 IFileOpenDialog * This,
1302 /* [string][in] */ __RPC__in LPCWSTR pszName);
1304 HRESULT ( STDMETHODCALLTYPE *GetFileName )(
1305 IFileOpenDialog * This,
1306 /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *pszName);
1308 HRESULT ( STDMETHODCALLTYPE *SetTitle )(
1309 IFileOpenDialog * This,
1310 /* [string][in] */ __RPC__in LPCWSTR pszTitle);
1312 HRESULT ( STDMETHODCALLTYPE *SetOkButtonLabel )(
1313 IFileOpenDialog * This,
1314 /* [string][in] */ __RPC__in LPCWSTR pszText);
1316 HRESULT ( STDMETHODCALLTYPE *SetFileNameLabel )(
1317 IFileOpenDialog * This,
1318 /* [string][in] */ __RPC__in LPCWSTR pszLabel);
1320 HRESULT ( STDMETHODCALLTYPE *GetResult )(
1321 IFileOpenDialog * This,
1322 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi);
1324 HRESULT ( STDMETHODCALLTYPE *AddPlace )(
1325 IFileOpenDialog * This,
1326 /* [in] */ __RPC__in_opt IShellItem *psi,
1327 /* [in] */ FDAP fdap);
1329 HRESULT ( STDMETHODCALLTYPE *SetDefaultExtension )(
1330 IFileOpenDialog * This,
1331 /* [string][in] */ __RPC__in LPCWSTR pszDefaultExtension);
1333 HRESULT ( STDMETHODCALLTYPE *Close )(
1334 IFileOpenDialog * This,
1335 /* [in] */ HRESULT hr);
1337 HRESULT ( STDMETHODCALLTYPE *SetClientGuid )(
1338 IFileOpenDialog * This,
1339 /* [in] */ __RPC__in REFGUID guid);
1341 HRESULT ( STDMETHODCALLTYPE *ClearClientData )(
1342 IFileOpenDialog * This);
1344 HRESULT ( STDMETHODCALLTYPE *SetFilter )(
1345 IFileOpenDialog * This,
1346 /* [in] */ __RPC__in_opt IShellItemFilter *pFilter);
1348 HRESULT ( STDMETHODCALLTYPE *GetResults )(
1349 IFileOpenDialog * This,
1350 /* [out] */ __RPC__deref_out_opt IShellItemArray **ppenum);
1352 HRESULT ( STDMETHODCALLTYPE *GetSelectedItems )(
1353 IFileOpenDialog * This,
1354 /* [out] */ __RPC__deref_out_opt IShellItemArray **ppsai);
1356 END_INTERFACE
1357 } IFileOpenDialogVtbl;
1359 interface IFileOpenDialog
1361 CONST_VTBL struct IFileOpenDialogVtbl *lpVtbl;
1366 #ifdef COBJMACROS
1369 #define IFileOpenDialog_QueryInterface(This,riid,ppvObject) \
1370 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
1372 #define IFileOpenDialog_AddRef(This) \
1373 ( (This)->lpVtbl -> AddRef(This) )
1375 #define IFileOpenDialog_Release(This) \
1376 ( (This)->lpVtbl -> Release(This) )
1379 #define IFileOpenDialog_Show(This,hwndParent) \
1380 ( (This)->lpVtbl -> Show(This,hwndParent) )
1383 #define IFileOpenDialog_SetFileTypes(This,cFileTypes,rgFilterSpec) \
1384 ( (This)->lpVtbl -> SetFileTypes(This,cFileTypes,rgFilterSpec) )
1386 #define IFileOpenDialog_SetFileTypeIndex(This,iFileType) \
1387 ( (This)->lpVtbl -> SetFileTypeIndex(This,iFileType) )
1389 #define IFileOpenDialog_GetFileTypeIndex(This,piFileType) \
1390 ( (This)->lpVtbl -> GetFileTypeIndex(This,piFileType) )
1392 #define IFileOpenDialog_Advise(This,pfde,pdwCookie) \
1393 ( (This)->lpVtbl -> Advise(This,pfde,pdwCookie) )
1395 #define IFileOpenDialog_Unadvise(This,dwCookie) \
1396 ( (This)->lpVtbl -> Unadvise(This,dwCookie) )
1398 #define IFileOpenDialog_SetOptions(This,fos) \
1399 ( (This)->lpVtbl -> SetOptions(This,fos) )
1401 #define IFileOpenDialog_GetOptions(This,pfos) \
1402 ( (This)->lpVtbl -> GetOptions(This,pfos) )
1404 #define IFileOpenDialog_SetDefaultFolder(This,psi) \
1405 ( (This)->lpVtbl -> SetDefaultFolder(This,psi) )
1407 #define IFileOpenDialog_SetFolder(This,psi) \
1408 ( (This)->lpVtbl -> SetFolder(This,psi) )
1410 #define IFileOpenDialog_GetFolder(This,ppsi) \
1411 ( (This)->lpVtbl -> GetFolder(This,ppsi) )
1413 #define IFileOpenDialog_GetCurrentSelection(This,ppsi) \
1414 ( (This)->lpVtbl -> GetCurrentSelection(This,ppsi) )
1416 #define IFileOpenDialog_SetFileName(This,pszName) \
1417 ( (This)->lpVtbl -> SetFileName(This,pszName) )
1419 #define IFileOpenDialog_GetFileName(This,pszName) \
1420 ( (This)->lpVtbl -> GetFileName(This,pszName) )
1422 #define IFileOpenDialog_SetTitle(This,pszTitle) \
1423 ( (This)->lpVtbl -> SetTitle(This,pszTitle) )
1425 #define IFileOpenDialog_SetOkButtonLabel(This,pszText) \
1426 ( (This)->lpVtbl -> SetOkButtonLabel(This,pszText) )
1428 #define IFileOpenDialog_SetFileNameLabel(This,pszLabel) \
1429 ( (This)->lpVtbl -> SetFileNameLabel(This,pszLabel) )
1431 #define IFileOpenDialog_GetResult(This,ppsi) \
1432 ( (This)->lpVtbl -> GetResult(This,ppsi) )
1434 #define IFileOpenDialog_AddPlace(This,psi,fdap) \
1435 ( (This)->lpVtbl -> AddPlace(This,psi,fdap) )
1437 #define IFileOpenDialog_SetDefaultExtension(This,pszDefaultExtension) \
1438 ( (This)->lpVtbl -> SetDefaultExtension(This,pszDefaultExtension) )
1440 #define IFileOpenDialog_Close(This,hr) \
1441 ( (This)->lpVtbl -> Close(This,hr) )
1443 #define IFileOpenDialog_SetClientGuid(This,guid) \
1444 ( (This)->lpVtbl -> SetClientGuid(This,guid) )
1446 #define IFileOpenDialog_ClearClientData(This) \
1447 ( (This)->lpVtbl -> ClearClientData(This) )
1449 #define IFileOpenDialog_SetFilter(This,pFilter) \
1450 ( (This)->lpVtbl -> SetFilter(This,pFilter) )
1453 #define IFileOpenDialog_GetResults(This,ppenum) \
1454 ( (This)->lpVtbl -> GetResults(This,ppenum) )
1456 #define IFileOpenDialog_GetSelectedItems(This,ppsai) \
1457 ( (This)->lpVtbl -> GetSelectedItems(This,ppsai) )
1459 #endif /* COBJMACROS */
1462 #endif /* C style interface */
1467 #endif /* __IFileOpenDialog_INTERFACE_DEFINED__ */
1470 #ifndef __IFileDialogCustomize_INTERFACE_DEFINED__
1471 #define __IFileDialogCustomize_INTERFACE_DEFINED__
1473 /* interface IFileDialogCustomize */
1474 /* [unique][object][uuid] */
1477 EXTERN_C const IID IID_IFileDialogCustomize;
1479 #if defined(__cplusplus) && !defined(CINTERFACE)
1481 MIDL_INTERFACE("e6fdd21a-163f-4975-9c8c-a69f1ba37034")
1482 IFileDialogCustomize : public IUnknown
1484 public:
1485 virtual HRESULT STDMETHODCALLTYPE EnableOpenDropDown(
1486 /* [in] */ DWORD dwIDCtl) = 0;
1488 virtual HRESULT STDMETHODCALLTYPE AddMenu(
1489 /* [in] */ DWORD dwIDCtl,
1490 /* [string][in] */ __RPC__in LPCWSTR pszLabel) = 0;
1492 virtual HRESULT STDMETHODCALLTYPE AddPushButton(
1493 /* [in] */ DWORD dwIDCtl,
1494 /* [string][in] */ __RPC__in LPCWSTR pszLabel) = 0;
1496 virtual HRESULT STDMETHODCALLTYPE AddComboBox(
1497 /* [in] */ DWORD dwIDCtl) = 0;
1499 virtual HRESULT STDMETHODCALLTYPE AddRadioButtonList(
1500 /* [in] */ DWORD dwIDCtl) = 0;
1502 virtual HRESULT STDMETHODCALLTYPE AddCheckButton(
1503 /* [in] */ DWORD dwIDCtl,
1504 /* [string][in] */ __RPC__in LPCWSTR pszLabel,
1505 /* [in] */ BOOL bChecked) = 0;
1507 virtual HRESULT STDMETHODCALLTYPE AddEditBox(
1508 /* [in] */ DWORD dwIDCtl,
1509 /* [string][in] */ __RPC__in LPCWSTR pszText) = 0;
1511 virtual HRESULT STDMETHODCALLTYPE AddSeparator(
1512 /* [in] */ DWORD dwIDCtl) = 0;
1514 virtual HRESULT STDMETHODCALLTYPE AddText(
1515 /* [in] */ DWORD dwIDCtl,
1516 /* [string][in] */ __RPC__in LPCWSTR pszText) = 0;
1518 virtual HRESULT STDMETHODCALLTYPE SetControlLabel(
1519 /* [in] */ DWORD dwIDCtl,
1520 /* [string][in] */ __RPC__in LPCWSTR pszLabel) = 0;
1522 virtual HRESULT STDMETHODCALLTYPE GetControlState(
1523 /* [in] */ DWORD dwIDCtl,
1524 /* [out] */ __RPC__out CDCONTROLSTATEF *pdwState) = 0;
1526 virtual HRESULT STDMETHODCALLTYPE SetControlState(
1527 /* [in] */ DWORD dwIDCtl,
1528 /* [in] */ CDCONTROLSTATEF dwState) = 0;
1530 virtual HRESULT STDMETHODCALLTYPE GetEditBoxText(
1531 /* [in] */ DWORD dwIDCtl,
1532 /* [string][out] */ __RPC__deref_out_opt_string WCHAR **ppszText) = 0;
1534 virtual HRESULT STDMETHODCALLTYPE SetEditBoxText(
1535 /* [in] */ DWORD dwIDCtl,
1536 /* [string][in] */ __RPC__in LPCWSTR pszText) = 0;
1538 virtual HRESULT STDMETHODCALLTYPE GetCheckButtonState(
1539 /* [in] */ DWORD dwIDCtl,
1540 /* [out] */ __RPC__out BOOL *pbChecked) = 0;
1542 virtual HRESULT STDMETHODCALLTYPE SetCheckButtonState(
1543 /* [in] */ DWORD dwIDCtl,
1544 /* [in] */ BOOL bChecked) = 0;
1546 virtual HRESULT STDMETHODCALLTYPE AddControlItem(
1547 /* [in] */ DWORD dwIDCtl,
1548 /* [in] */ DWORD dwIDItem,
1549 /* [in] */ __RPC__in LPCWSTR pszLabel) = 0;
1551 virtual HRESULT STDMETHODCALLTYPE RemoveControlItem(
1552 /* [in] */ DWORD dwIDCtl,
1553 /* [in] */ DWORD dwIDItem) = 0;
1555 virtual HRESULT STDMETHODCALLTYPE RemoveAllControlItems(
1556 /* [in] */ DWORD dwIDCtl) = 0;
1558 virtual HRESULT STDMETHODCALLTYPE GetControlItemState(
1559 /* [in] */ DWORD dwIDCtl,
1560 /* [in] */ DWORD dwIDItem,
1561 /* [out] */ __RPC__out CDCONTROLSTATEF *pdwState) = 0;
1563 virtual HRESULT STDMETHODCALLTYPE SetControlItemState(
1564 /* [in] */ DWORD dwIDCtl,
1565 /* [in] */ DWORD dwIDItem,
1566 /* [in] */ CDCONTROLSTATEF dwState) = 0;
1568 virtual HRESULT STDMETHODCALLTYPE GetSelectedControlItem(
1569 /* [in] */ DWORD dwIDCtl,
1570 /* [out] */ __RPC__out DWORD *pdwIDItem) = 0;
1572 virtual HRESULT STDMETHODCALLTYPE SetSelectedControlItem(
1573 /* [in] */ DWORD dwIDCtl,
1574 /* [in] */ DWORD dwIDItem) = 0;
1576 virtual HRESULT STDMETHODCALLTYPE StartVisualGroup(
1577 /* [in] */ DWORD dwIDCtl,
1578 /* [string][in] */ __RPC__in LPCWSTR pszLabel) = 0;
1580 virtual HRESULT STDMETHODCALLTYPE EndVisualGroup( void) = 0;
1582 virtual HRESULT STDMETHODCALLTYPE MakeProminent(
1583 /* [in] */ DWORD dwIDCtl) = 0;
1585 virtual HRESULT STDMETHODCALLTYPE SetControlItemText(
1586 /* [in] */ DWORD dwIDCtl,
1587 /* [in] */ DWORD dwIDItem,
1588 /* [string][in] */ __RPC__in LPCWSTR pszLabel) = 0;
1592 #else /* C style interface */
1594 typedef struct IFileDialogCustomizeVtbl
1596 BEGIN_INTERFACE
1598 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
1599 IFileDialogCustomize * This,
1600 /* [in] */ __RPC__in REFIID riid,
1601 /* [iid_is][out] */
1602 __RPC__deref_out void **ppvObject);
1604 ULONG ( STDMETHODCALLTYPE *AddRef )(
1605 IFileDialogCustomize * This);
1607 ULONG ( STDMETHODCALLTYPE *Release )(
1608 IFileDialogCustomize * This);
1610 HRESULT ( STDMETHODCALLTYPE *EnableOpenDropDown )(
1611 IFileDialogCustomize * This,
1612 /* [in] */ DWORD dwIDCtl);
1614 HRESULT ( STDMETHODCALLTYPE *AddMenu )(
1615 IFileDialogCustomize * This,
1616 /* [in] */ DWORD dwIDCtl,
1617 /* [string][in] */ __RPC__in LPCWSTR pszLabel);
1619 HRESULT ( STDMETHODCALLTYPE *AddPushButton )(
1620 IFileDialogCustomize * This,
1621 /* [in] */ DWORD dwIDCtl,
1622 /* [string][in] */ __RPC__in LPCWSTR pszLabel);
1624 HRESULT ( STDMETHODCALLTYPE *AddComboBox )(
1625 IFileDialogCustomize * This,
1626 /* [in] */ DWORD dwIDCtl);
1628 HRESULT ( STDMETHODCALLTYPE *AddRadioButtonList )(
1629 IFileDialogCustomize * This,
1630 /* [in] */ DWORD dwIDCtl);
1632 HRESULT ( STDMETHODCALLTYPE *AddCheckButton )(
1633 IFileDialogCustomize * This,
1634 /* [in] */ DWORD dwIDCtl,
1635 /* [string][in] */ __RPC__in LPCWSTR pszLabel,
1636 /* [in] */ BOOL bChecked);
1638 HRESULT ( STDMETHODCALLTYPE *AddEditBox )(
1639 IFileDialogCustomize * This,
1640 /* [in] */ DWORD dwIDCtl,
1641 /* [string][in] */ __RPC__in LPCWSTR pszText);
1643 HRESULT ( STDMETHODCALLTYPE *AddSeparator )(
1644 IFileDialogCustomize * This,
1645 /* [in] */ DWORD dwIDCtl);
1647 HRESULT ( STDMETHODCALLTYPE *AddText )(
1648 IFileDialogCustomize * This,
1649 /* [in] */ DWORD dwIDCtl,
1650 /* [string][in] */ __RPC__in LPCWSTR pszText);
1652 HRESULT ( STDMETHODCALLTYPE *SetControlLabel )(
1653 IFileDialogCustomize * This,
1654 /* [in] */ DWORD dwIDCtl,
1655 /* [string][in] */ __RPC__in LPCWSTR pszLabel);
1657 HRESULT ( STDMETHODCALLTYPE *GetControlState )(
1658 IFileDialogCustomize * This,
1659 /* [in] */ DWORD dwIDCtl,
1660 /* [out] */ __RPC__out CDCONTROLSTATEF *pdwState);
1662 HRESULT ( STDMETHODCALLTYPE *SetControlState )(
1663 IFileDialogCustomize * This,
1664 /* [in] */ DWORD dwIDCtl,
1665 /* [in] */ CDCONTROLSTATEF dwState);
1667 HRESULT ( STDMETHODCALLTYPE *GetEditBoxText )(
1668 IFileDialogCustomize * This,
1669 /* [in] */ DWORD dwIDCtl,
1670 /* [string][out] */ __RPC__deref_out_opt_string WCHAR **ppszText);
1672 HRESULT ( STDMETHODCALLTYPE *SetEditBoxText )(
1673 IFileDialogCustomize * This,
1674 /* [in] */ DWORD dwIDCtl,
1675 /* [string][in] */ __RPC__in LPCWSTR pszText);
1677 HRESULT ( STDMETHODCALLTYPE *GetCheckButtonState )(
1678 IFileDialogCustomize * This,
1679 /* [in] */ DWORD dwIDCtl,
1680 /* [out] */ __RPC__out BOOL *pbChecked);
1682 HRESULT ( STDMETHODCALLTYPE *SetCheckButtonState )(
1683 IFileDialogCustomize * This,
1684 /* [in] */ DWORD dwIDCtl,
1685 /* [in] */ BOOL bChecked);
1687 HRESULT ( STDMETHODCALLTYPE *AddControlItem )(
1688 IFileDialogCustomize * This,
1689 /* [in] */ DWORD dwIDCtl,
1690 /* [in] */ DWORD dwIDItem,
1691 /* [in] */ __RPC__in LPCWSTR pszLabel);
1693 HRESULT ( STDMETHODCALLTYPE *RemoveControlItem )(
1694 IFileDialogCustomize * This,
1695 /* [in] */ DWORD dwIDCtl,
1696 /* [in] */ DWORD dwIDItem);
1698 HRESULT ( STDMETHODCALLTYPE *RemoveAllControlItems )(
1699 IFileDialogCustomize * This,
1700 /* [in] */ DWORD dwIDCtl);
1702 HRESULT ( STDMETHODCALLTYPE *GetControlItemState )(
1703 IFileDialogCustomize * This,
1704 /* [in] */ DWORD dwIDCtl,
1705 /* [in] */ DWORD dwIDItem,
1706 /* [out] */ __RPC__out CDCONTROLSTATEF *pdwState);
1708 HRESULT ( STDMETHODCALLTYPE *SetControlItemState )(
1709 IFileDialogCustomize * This,
1710 /* [in] */ DWORD dwIDCtl,
1711 /* [in] */ DWORD dwIDItem,
1712 /* [in] */ CDCONTROLSTATEF dwState);
1714 HRESULT ( STDMETHODCALLTYPE *GetSelectedControlItem )(
1715 IFileDialogCustomize * This,
1716 /* [in] */ DWORD dwIDCtl,
1717 /* [out] */ __RPC__out DWORD *pdwIDItem);
1719 HRESULT ( STDMETHODCALLTYPE *SetSelectedControlItem )(
1720 IFileDialogCustomize * This,
1721 /* [in] */ DWORD dwIDCtl,
1722 /* [in] */ DWORD dwIDItem);
1724 HRESULT ( STDMETHODCALLTYPE *StartVisualGroup )(
1725 IFileDialogCustomize * This,
1726 /* [in] */ DWORD dwIDCtl,
1727 /* [string][in] */ __RPC__in LPCWSTR pszLabel);
1729 HRESULT ( STDMETHODCALLTYPE *EndVisualGroup )(
1730 IFileDialogCustomize * This);
1732 HRESULT ( STDMETHODCALLTYPE *MakeProminent )(
1733 IFileDialogCustomize * This,
1734 /* [in] */ DWORD dwIDCtl);
1736 HRESULT ( STDMETHODCALLTYPE *SetControlItemText )(
1737 IFileDialogCustomize * This,
1738 /* [in] */ DWORD dwIDCtl,
1739 /* [in] */ DWORD dwIDItem,
1740 /* [string][in] */ __RPC__in LPCWSTR pszLabel);
1742 END_INTERFACE
1743 } IFileDialogCustomizeVtbl;
1745 interface IFileDialogCustomize
1747 CONST_VTBL struct IFileDialogCustomizeVtbl *lpVtbl;
1752 #ifdef COBJMACROS
1755 #define IFileDialogCustomize_QueryInterface(This,riid,ppvObject) \
1756 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
1758 #define IFileDialogCustomize_AddRef(This) \
1759 ( (This)->lpVtbl -> AddRef(This) )
1761 #define IFileDialogCustomize_Release(This) \
1762 ( (This)->lpVtbl -> Release(This) )
1765 #define IFileDialogCustomize_EnableOpenDropDown(This,dwIDCtl) \
1766 ( (This)->lpVtbl -> EnableOpenDropDown(This,dwIDCtl) )
1768 #define IFileDialogCustomize_AddMenu(This,dwIDCtl,pszLabel) \
1769 ( (This)->lpVtbl -> AddMenu(This,dwIDCtl,pszLabel) )
1771 #define IFileDialogCustomize_AddPushButton(This,dwIDCtl,pszLabel) \
1772 ( (This)->lpVtbl -> AddPushButton(This,dwIDCtl,pszLabel) )
1774 #define IFileDialogCustomize_AddComboBox(This,dwIDCtl) \
1775 ( (This)->lpVtbl -> AddComboBox(This,dwIDCtl) )
1777 #define IFileDialogCustomize_AddRadioButtonList(This,dwIDCtl) \
1778 ( (This)->lpVtbl -> AddRadioButtonList(This,dwIDCtl) )
1780 #define IFileDialogCustomize_AddCheckButton(This,dwIDCtl,pszLabel,bChecked) \
1781 ( (This)->lpVtbl -> AddCheckButton(This,dwIDCtl,pszLabel,bChecked) )
1783 #define IFileDialogCustomize_AddEditBox(This,dwIDCtl,pszText) \
1784 ( (This)->lpVtbl -> AddEditBox(This,dwIDCtl,pszText) )
1786 #define IFileDialogCustomize_AddSeparator(This,dwIDCtl) \
1787 ( (This)->lpVtbl -> AddSeparator(This,dwIDCtl) )
1789 #define IFileDialogCustomize_AddText(This,dwIDCtl,pszText) \
1790 ( (This)->lpVtbl -> AddText(This,dwIDCtl,pszText) )
1792 #define IFileDialogCustomize_SetControlLabel(This,dwIDCtl,pszLabel) \
1793 ( (This)->lpVtbl -> SetControlLabel(This,dwIDCtl,pszLabel) )
1795 #define IFileDialogCustomize_GetControlState(This,dwIDCtl,pdwState) \
1796 ( (This)->lpVtbl -> GetControlState(This,dwIDCtl,pdwState) )
1798 #define IFileDialogCustomize_SetControlState(This,dwIDCtl,dwState) \
1799 ( (This)->lpVtbl -> SetControlState(This,dwIDCtl,dwState) )
1801 #define IFileDialogCustomize_GetEditBoxText(This,dwIDCtl,ppszText) \
1802 ( (This)->lpVtbl -> GetEditBoxText(This,dwIDCtl,ppszText) )
1804 #define IFileDialogCustomize_SetEditBoxText(This,dwIDCtl,pszText) \
1805 ( (This)->lpVtbl -> SetEditBoxText(This,dwIDCtl,pszText) )
1807 #define IFileDialogCustomize_GetCheckButtonState(This,dwIDCtl,pbChecked) \
1808 ( (This)->lpVtbl -> GetCheckButtonState(This,dwIDCtl,pbChecked) )
1810 #define IFileDialogCustomize_SetCheckButtonState(This,dwIDCtl,bChecked) \
1811 ( (This)->lpVtbl -> SetCheckButtonState(This,dwIDCtl,bChecked) )
1813 #define IFileDialogCustomize_AddControlItem(This,dwIDCtl,dwIDItem,pszLabel) \
1814 ( (This)->lpVtbl -> AddControlItem(This,dwIDCtl,dwIDItem,pszLabel) )
1816 #define IFileDialogCustomize_RemoveControlItem(This,dwIDCtl,dwIDItem) \
1817 ( (This)->lpVtbl -> RemoveControlItem(This,dwIDCtl,dwIDItem) )
1819 #define IFileDialogCustomize_RemoveAllControlItems(This,dwIDCtl) \
1820 ( (This)->lpVtbl -> RemoveAllControlItems(This,dwIDCtl) )
1822 #define IFileDialogCustomize_GetControlItemState(This,dwIDCtl,dwIDItem,pdwState) \
1823 ( (This)->lpVtbl -> GetControlItemState(This,dwIDCtl,dwIDItem,pdwState) )
1825 #define IFileDialogCustomize_SetControlItemState(This,dwIDCtl,dwIDItem,dwState) \
1826 ( (This)->lpVtbl -> SetControlItemState(This,dwIDCtl,dwIDItem,dwState) )
1828 #define IFileDialogCustomize_GetSelectedControlItem(This,dwIDCtl,pdwIDItem) \
1829 ( (This)->lpVtbl -> GetSelectedControlItem(This,dwIDCtl,pdwIDItem) )
1831 #define IFileDialogCustomize_SetSelectedControlItem(This,dwIDCtl,dwIDItem) \
1832 ( (This)->lpVtbl -> SetSelectedControlItem(This,dwIDCtl,dwIDItem) )
1834 #define IFileDialogCustomize_StartVisualGroup(This,dwIDCtl,pszLabel) \
1835 ( (This)->lpVtbl -> StartVisualGroup(This,dwIDCtl,pszLabel) )
1837 #define IFileDialogCustomize_EndVisualGroup(This) \
1838 ( (This)->lpVtbl -> EndVisualGroup(This) )
1840 #define IFileDialogCustomize_MakeProminent(This,dwIDCtl) \
1841 ( (This)->lpVtbl -> MakeProminent(This,dwIDCtl) )
1843 #define IFileDialogCustomize_SetControlItemText(This,dwIDCtl,dwIDItem,pszLabel) \
1844 ( (This)->lpVtbl -> SetControlItemText(This,dwIDCtl,dwIDItem,pszLabel) )
1846 #endif /* COBJMACROS */
1849 #endif /* C style interface */
1854 #endif /* __IFileDialogCustomize_INTERFACE_DEFINED__ */
1857 #ifndef __IFileSaveDialog_INTERFACE_DEFINED__
1858 #define __IFileSaveDialog_INTERFACE_DEFINED__
1860 /* interface IFileSaveDialog */
1861 /* [unique][object][uuid] */
1864 EXTERN_C const IID IID_IFileSaveDialog;
1866 #if defined(__cplusplus) && !defined(CINTERFACE)
1868 MIDL_INTERFACE("84bccd23-5fde-4cdb-aea4-af64b83d78ab")
1869 IFileSaveDialog : public IFileDialog
1871 public:
1872 virtual HRESULT STDMETHODCALLTYPE SetSaveAsItem(
1873 /* [in] */ __RPC__in_opt IShellItem *psi) = 0;
1875 virtual HRESULT STDMETHODCALLTYPE SetProperties(
1876 /* [in] */ __RPC__in_opt IPropertyStore *pStore) = 0;
1878 virtual HRESULT STDMETHODCALLTYPE SetCollectedProperties(
1879 /* [in] */ __RPC__in_opt IPropertyDescriptionList *pList,
1880 /* [in] */ BOOL fAppendDefault) = 0;
1882 virtual HRESULT STDMETHODCALLTYPE GetProperties(
1883 /* [out] */ __RPC__deref_out_opt IPropertyStore **ppStore) = 0;
1885 virtual HRESULT STDMETHODCALLTYPE ApplyProperties(
1886 /* [in] */ __RPC__in_opt IShellItem *psi,
1887 /* [in] */ __RPC__in_opt IPropertyStore *pStore,
1888 /* [unique][in] */ __RPC__in_opt HWND hwnd,
1889 /* [unique][in] */ __RPC__in_opt IFileOperationProgressSink *pSink) = 0;
1893 #else /* C style interface */
1895 typedef struct IFileSaveDialogVtbl
1897 BEGIN_INTERFACE
1899 HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
1900 IFileSaveDialog * This,
1901 /* [in] */ __RPC__in REFIID riid,
1902 /* [iid_is][out] */
1903 __RPC__deref_out void **ppvObject);
1905 ULONG ( STDMETHODCALLTYPE *AddRef )(
1906 IFileSaveDialog * This);
1908 ULONG ( STDMETHODCALLTYPE *Release )(
1909 IFileSaveDialog * This);
1911 /* [local] */ HRESULT ( STDMETHODCALLTYPE *Show )(
1912 IFileSaveDialog * This,
1913 /* [in] */
1914 __in HWND hwndParent);
1916 HRESULT ( STDMETHODCALLTYPE *SetFileTypes )(
1917 IFileSaveDialog * This,
1918 /* [in] */ UINT cFileTypes,
1919 /* [size_is][in] */ __RPC__in_ecount_full(cFileTypes) const COMDLG_FILTERSPEC *rgFilterSpec);
1921 HRESULT ( STDMETHODCALLTYPE *SetFileTypeIndex )(
1922 IFileSaveDialog * This,
1923 /* [in] */ UINT iFileType);
1925 HRESULT ( STDMETHODCALLTYPE *GetFileTypeIndex )(
1926 IFileSaveDialog * This,
1927 /* [out] */ __RPC__out UINT *piFileType);
1929 HRESULT ( STDMETHODCALLTYPE *Advise )(
1930 IFileSaveDialog * This,
1931 /* [in] */ __RPC__in_opt IFileDialogEvents *pfde,
1932 /* [out] */ __RPC__out DWORD *pdwCookie);
1934 HRESULT ( STDMETHODCALLTYPE *Unadvise )(
1935 IFileSaveDialog * This,
1936 /* [in] */ DWORD dwCookie);
1938 HRESULT ( STDMETHODCALLTYPE *SetOptions )(
1939 IFileSaveDialog * This,
1940 /* [in] */ DWORD fos);
1942 HRESULT ( STDMETHODCALLTYPE *GetOptions )(
1943 IFileSaveDialog * This,
1944 /* [out] */ __RPC__out DWORD *pfos);
1946 HRESULT ( STDMETHODCALLTYPE *SetDefaultFolder )(
1947 IFileSaveDialog * This,
1948 /* [in] */ __RPC__in_opt IShellItem *psi);
1950 HRESULT ( STDMETHODCALLTYPE *SetFolder )(
1951 IFileSaveDialog * This,
1952 /* [in] */ __RPC__in_opt IShellItem *psi);
1954 HRESULT ( STDMETHODCALLTYPE *GetFolder )(
1955 IFileSaveDialog * This,
1956 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi);
1958 HRESULT ( STDMETHODCALLTYPE *GetCurrentSelection )(
1959 IFileSaveDialog * This,
1960 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi);
1962 HRESULT ( STDMETHODCALLTYPE *SetFileName )(
1963 IFileSaveDialog * This,
1964 /* [string][in] */ __RPC__in LPCWSTR pszName);
1966 HRESULT ( STDMETHODCALLTYPE *GetFileName )(
1967 IFileSaveDialog * This,
1968 /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *pszName);
1970 HRESULT ( STDMETHODCALLTYPE *SetTitle )(
1971 IFileSaveDialog * This,
1972 /* [string][in] */ __RPC__in LPCWSTR pszTitle);
1974 HRESULT ( STDMETHODCALLTYPE *SetOkButtonLabel )(
1975 IFileSaveDialog * This,
1976 /* [string][in] */ __RPC__in LPCWSTR pszText);
1978 HRESULT ( STDMETHODCALLTYPE *SetFileNameLabel )(
1979 IFileSaveDialog * This,
1980 /* [string][in] */ __RPC__in LPCWSTR pszLabel);
1982 HRESULT ( STDMETHODCALLTYPE *GetResult )(
1983 IFileSaveDialog * This,
1984 /* [out] */ __RPC__deref_out_opt IShellItem **ppsi);
1986 HRESULT ( STDMETHODCALLTYPE *AddPlace )(
1987 IFileSaveDialog * This,
1988 /* [in] */ __RPC__in_opt IShellItem *psi,
1989 /* [in] */ FDAP fdap);
1991 HRESULT ( STDMETHODCALLTYPE *SetDefaultExtension )(
1992 IFileSaveDialog * This,
1993 /* [string][in] */ __RPC__in LPCWSTR pszDefaultExtension);
1995 HRESULT ( STDMETHODCALLTYPE *Close )(
1996 IFileSaveDialog * This,
1997 /* [in] */ HRESULT hr);
1999 HRESULT ( STDMETHODCALLTYPE *SetClientGuid )(
2000 IFileSaveDialog * This,
2001 /* [in] */ __RPC__in REFGUID guid);
2003 HRESULT ( STDMETHODCALLTYPE *ClearClientData )(
2004 IFileSaveDialog * This);
2006 HRESULT ( STDMETHODCALLTYPE *SetFilter )(
2007 IFileSaveDialog * This,
2008 /* [in] */ __RPC__in_opt IShellItemFilter *pFilter);
2010 HRESULT ( STDMETHODCALLTYPE *SetSaveAsItem )(
2011 IFileSaveDialog * This,
2012 /* [in] */ __RPC__in_opt IShellItem *psi);
2014 HRESULT ( STDMETHODCALLTYPE *SetProperties )(
2015 IFileSaveDialog * This,
2016 /* [in] */ __RPC__in_opt IPropertyStore *pStore);
2018 HRESULT ( STDMETHODCALLTYPE *SetCollectedProperties )(
2019 IFileSaveDialog * This,
2020 /* [in] */ __RPC__in_opt IPropertyDescriptionList *pList,
2021 /* [in] */ BOOL fAppendDefault);
2023 HRESULT ( STDMETHODCALLTYPE *GetProperties )(
2024 IFileSaveDialog * This,
2025 /* [out] */ __RPC__deref_out_opt IPropertyStore **ppStore);
2027 HRESULT ( STDMETHODCALLTYPE *ApplyProperties )(
2028 IFileSaveDialog * This,
2029 /* [in] */ __RPC__in_opt IShellItem *psi,
2030 /* [in] */ __RPC__in_opt IPropertyStore *pStore,
2031 /* [unique][in] */ __RPC__in_opt HWND hwnd,
2032 /* [unique][in] */ __RPC__in_opt IFileOperationProgressSink *pSink);
2034 END_INTERFACE
2035 } IFileSaveDialogVtbl;
2037 interface IFileSaveDialog
2039 CONST_VTBL struct IFileSaveDialogVtbl *lpVtbl;
2044 #ifdef COBJMACROS
2047 #define IFileSaveDialog_QueryInterface(This,riid,ppvObject) \
2048 ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
2050 #define IFileSaveDialog_AddRef(This) \
2051 ( (This)->lpVtbl -> AddRef(This) )
2053 #define IFileSaveDialog_Release(This) \
2054 ( (This)->lpVtbl -> Release(This) )
2057 #define IFileSaveDialog_Show(This,hwndParent) \
2058 ( (This)->lpVtbl -> Show(This,hwndParent) )
2061 #define IFileSaveDialog_SetFileTypes(This,cFileTypes,rgFilterSpec) \
2062 ( (This)->lpVtbl -> SetFileTypes(This,cFileTypes,rgFilterSpec) )
2064 #define IFileSaveDialog_SetFileTypeIndex(This,iFileType) \
2065 ( (This)->lpVtbl -> SetFileTypeIndex(This,iFileType) )
2067 #define IFileSaveDialog_GetFileTypeIndex(This,piFileType) \
2068 ( (This)->lpVtbl -> GetFileTypeIndex(This,piFileType) )
2070 #define IFileSaveDialog_Advise(This,pfde,pdwCookie) \
2071 ( (This)->lpVtbl -> Advise(This,pfde,pdwCookie) )
2073 #define IFileSaveDialog_Unadvise(This,dwCookie) \
2074 ( (This)->lpVtbl -> Unadvise(This,dwCookie) )
2076 #define IFileSaveDialog_SetOptions(This,fos) \
2077 ( (This)->lpVtbl -> SetOptions(This,fos) )
2079 #define IFileSaveDialog_GetOptions(This,pfos) \
2080 ( (This)->lpVtbl -> GetOptions(This,pfos) )
2082 #define IFileSaveDialog_SetDefaultFolder(This,psi) \
2083 ( (This)->lpVtbl -> SetDefaultFolder(This,psi) )
2085 #define IFileSaveDialog_SetFolder(This,psi) \
2086 ( (This)->lpVtbl -> SetFolder(This,psi) )
2088 #define IFileSaveDialog_GetFolder(This,ppsi) \
2089 ( (This)->lpVtbl -> GetFolder(This,ppsi) )
2091 #define IFileSaveDialog_GetCurrentSelection(This,ppsi) \
2092 ( (This)->lpVtbl -> GetCurrentSelection(This,ppsi) )
2094 #define IFileSaveDialog_SetFileName(This,pszName) \
2095 ( (This)->lpVtbl -> SetFileName(This,pszName) )
2097 #define IFileSaveDialog_GetFileName(This,pszName) \
2098 ( (This)->lpVtbl -> GetFileName(This,pszName) )
2100 #define IFileSaveDialog_SetTitle(This,pszTitle) \
2101 ( (This)->lpVtbl -> SetTitle(This,pszTitle) )
2103 #define IFileSaveDialog_SetOkButtonLabel(This,pszText) \
2104 ( (This)->lpVtbl -> SetOkButtonLabel(This,pszText) )
2106 #define IFileSaveDialog_SetFileNameLabel(This,pszLabel) \
2107 ( (This)->lpVtbl -> SetFileNameLabel(This,pszLabel) )
2109 #define IFileSaveDialog_GetResult(This,ppsi) \
2110 ( (This)->lpVtbl -> GetResult(This,ppsi) )
2112 #define IFileSaveDialog_AddPlace(This,psi,fdap) \
2113 ( (This)->lpVtbl -> AddPlace(This,psi,fdap) )
2115 #define IFileSaveDialog_SetDefaultExtension(This,pszDefaultExtension) \
2116 ( (This)->lpVtbl -> SetDefaultExtension(This,pszDefaultExtension) )
2118 #define IFileSaveDialog_Close(This,hr) \
2119 ( (This)->lpVtbl -> Close(This,hr) )
2121 #define IFileSaveDialog_SetClientGuid(This,guid) \
2122 ( (This)->lpVtbl -> SetClientGuid(This,guid) )
2124 #define IFileSaveDialog_ClearClientData(This) \
2125 ( (This)->lpVtbl -> ClearClientData(This) )
2127 #define IFileSaveDialog_SetFilter(This,pFilter) \
2128 ( (This)->lpVtbl -> SetFilter(This,pFilter) )
2131 #define IFileSaveDialog_SetSaveAsItem(This,psi) \
2132 ( (This)->lpVtbl -> SetSaveAsItem(This,psi) )
2134 #define IFileSaveDialog_SetProperties(This,pStore) \
2135 ( (This)->lpVtbl -> SetProperties(This,pStore) )
2137 #define IFileSaveDialog_SetCollectedProperties(This,pList,fAppendDefault) \
2138 ( (This)->lpVtbl -> SetCollectedProperties(This,pList,fAppendDefault) )
2140 #define IFileSaveDialog_GetProperties(This,ppStore) \
2141 ( (This)->lpVtbl -> GetProperties(This,ppStore) )
2143 #define IFileSaveDialog_ApplyProperties(This,psi,pStore,hwnd,pSink) \
2144 ( (This)->lpVtbl -> ApplyProperties(This,psi,pStore,hwnd,pSink) )
2146 #endif /* COBJMACROS */
2149 #endif /* C style interface */
2154 #endif /* __IFileSaveDialog_INTERFACE_DEFINED__ */
2157 class DECLSPEC_UUID("DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7") FileOpenDialog;
2158 class DECLSPEC_UUID("C0B4E2F3-BA21-4773-8DBA-335EC946EB8B") FileSaveDialog;
2160 _COM_SMARTPTR_TYPEDEF(IFileDialog, __uuidof(IFileDialog));
2161 _COM_SMARTPTR_TYPEDEF(IFileOpenDialog, __uuidof(IFileOpenDialog));
2162 _COM_SMARTPTR_TYPEDEF(IShellItem, __uuidof(IShellItem));
2163 _COM_SMARTPTR_TYPEDEF(IFileDialogCustomize, __uuidof(IFileDialogCustomize));
2164 _COM_SMARTPTR_TYPEDEF(IShellItemArray, __uuidof(IShellItemArray));
2166 //helper class
2167 class Win7FileDialog
2169 public:
2170 Win7FileDialog(const char *name, int issave=0);
2171 ~Win7FileDialog();
2173 int inited() { return m_fod != NULL; }
2174 int show(HWND parent);
2176 void setFilterList(const char *list);
2177 void setDefaultExtension(const char *ext);
2178 void setFileTypeIndex(int i); //1-based
2179 void setFolder(const char *folder, int def=1); //def is for default folder
2180 void setFilename(const char *fn);
2181 void setTemplate(HINSTANCE inst, const char *dlgid, LPOFNHOOKPROC proc);
2183 void addOptions(DWORD o);
2185 void startGroup(DWORD id, char *label);
2186 void addText(DWORD id, char *txt);
2187 void addCheckbox(char *name, DWORD id, int defval);
2188 void endGroup();
2190 int getState(DWORD id);
2191 void getResult(char *fn, int maxlen);
2192 int getResult(int i, char *fn, int maxlen); // returns the number of written bytes, including ending null-character
2193 int getResultCount();
2195 private:
2196 IFileDialogPtr m_fod;
2197 IFileDialogCustomizePtr m_fdc;
2199 HINSTANCE m_inst;
2200 const char *m_dlgid;
2201 LPOFNHOOKPROC m_proc;
2203 WDL_String m_statictxt;
2205 #endif
2207 #endif