Use Get|SetPropA to store lParam to retrieve the OPENFILENAME16 for a
[wine/gsoc_dplay.git] / dlls / commdlg / filedlgbrowser.h
blob6c23dff4829e47bab8fe7f00592203909a2be749
1 /*
2 * Implementation of IShellBrowser for the File Open common dialog
3 *
5 */
7 #ifndef SHBROWSER_H
8 #define SHBROWSER_H TRUE
10 #include "shlobj.h"
11 #include "winbase.h"
12 #include "objbase.h"
13 #include "commdlg.h"
15 /***********************************************************************
16 * Defines and global variables
18 #define _ICOM_THIS_FromICommDlgBrowser(Class,name) Class* This = (Class*) (((char*)name)-sizeof(void *))
20 /* dialog internal property */
22 #define FODPROP_SAVEDLG 0x0001 /* File dialog is a Save file dialog */
23 #define FODPROP_USEVIEW 0x0002 /* Indicates the user selection must be taken
24 from the IShellView */
26 /***********************************************************************
27 * Data structure
31 typedef struct
34 ICOM_VTABLE(IShellBrowser)* lpVtbl; /* IShellBrowser VTable */
35 ICOM_VTABLE(ICommDlgBrowser)* lpVtbl2; /* ICommDlgBrowser VTable */
36 DWORD ref; /* Reference counter */
37 HWND hwndOwner; /* Owner dialog of the interface */
39 } IShellBrowserImpl;
41 typedef struct
44 OPENFILENAMEA ofnInfos;
45 struct {
46 IShellBrowser *FOIShellBrowser;
47 IShellFolder *FOIShellFolder;
48 IShellView *FOIShellView;
49 } Shell;
51 struct {
52 HWND hwndOwner;
53 HWND hwndView;
54 RECT rectView;
55 FOLDERSETTINGS folderSettings;
56 LPITEMIDLIST pidlAbsCurrent;
57 LPWSTR lpstrCurrentFilter;
58 } ShellInfos;
60 struct {
61 HWND hwndFileTypeCB;
62 HWND hwndLookInCB;
63 HWND hwndFileName;
64 DWORD dwDlgProp;
65 } DlgInfos;
67 } FileOpenDlgInfos;
69 /***********************************************************************
70 * Prototypes for the methods of the IShellBrowserImpl class
72 /* Constructor */
73 IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner);
75 /* IUnknown */
76 HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface,
77 REFIID riid,
78 LPVOID *ppvObj);
80 ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser * iface);
82 ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser * iface);
84 /* IOleWindow */
85 HRESULT WINAPI IShellBrowserImpl_GetWindow(IShellBrowser * iface,
86 HWND * phwnd);
88 HRESULT WINAPI IShellBrowserImpl_ContextSensitiveHelp(IShellBrowser * iface,
89 BOOL fEnterMode);
91 /* IShellBrowser */
93 HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface,
94 LPCITEMIDLIST pidl,
95 UINT wFlags);
97 HRESULT WINAPI IShellBrowserImpl_EnableModelessSB(IShellBrowser *iface,
98 BOOL fEnable);
100 HRESULT WINAPI IShellBrowserImpl_GetControlWindow(IShellBrowser *iface,
101 UINT id,
102 HWND *lphwnd);
104 HRESULT WINAPI IShellBrowserImpl_GetViewStateStream(IShellBrowser *iface,
105 DWORD grfMode,
106 LPSTREAM *ppStrm);
108 HRESULT WINAPI IShellBrowserImpl_InsertMenusSB(IShellBrowser *iface,
109 HMENU hmenuShared,
110 LPOLEMENUGROUPWIDTHS lpMenuWidths);
112 HRESULT WINAPI IShellBrowserImpl_OnViewWindowActive(IShellBrowser *iface,
113 IShellView *ppshv);
116 HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView(IShellBrowser *iface,
117 IShellView **ppshv);
119 HRESULT WINAPI IShellBrowserImpl_RemoveMenusSB(IShellBrowser *iface,
120 HMENU hmenuShared);
122 HRESULT WINAPI IShellBrowserImpl_SendControlMsg(IShellBrowser *iface,
123 UINT id,
124 UINT uMsg,
125 WPARAM wParam,
126 LPARAM lParam,
127 LRESULT *pret);
129 HRESULT WINAPI IShellBrowserImpl_SetMenuSB(IShellBrowser *iface,
130 HMENU hmenuShared,
131 HOLEMENU holemenuReserved,
132 HWND hwndActiveObject);
134 HRESULT WINAPI IShellBrowserImpl_SetStatusTextSB(IShellBrowser *iface,
135 LPCOLESTR lpszStatusText);
138 HRESULT WINAPI IShellBrowserImpl_SetToolbarItems(IShellBrowser *iface,
139 LPTBBUTTON lpButtons,
140 UINT nButtons,
141 UINT uFlags);
143 HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB(IShellBrowser *iface,
144 LPMSG lpmsg,
145 WORD wID);
148 /* ICommDlgBrowser */
150 HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface(ICommDlgBrowser *iface,
151 REFIID riid,
152 LPVOID *ppvObj);
154 ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef(ICommDlgBrowser * iface);
156 ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_Release(ICommDlgBrowser * iface);
158 HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDlgBrowser *iface,
159 IShellView *ppshv);
161 HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBrowser *iface,
162 IShellView *ppshv,
163 ULONG uChange);
165 HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *iface,
166 IShellView * ppshv,
167 LPCITEMIDLIST pidl);
171 LPITEMIDLIST GetSelectedPidl(IShellView *ppshv);
173 #endif /*SHBROWSER_H*/