Made the buttons in the filedlg change when selecting a different
[wine.git] / dlls / commdlg / filedlgbrowser.h
blob809f06b9ece9d1fe32cbd87594e4ae4203b8822e
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 HWND hwndTB;
65 HWND hwndCustomDlg;
66 DWORD dwDlgProp;
67 } DlgInfos;
69 } FileOpenDlgInfos;
71 /***********************************************************************
72 * Control ID's
74 #define IDS_ABOUTBOX 101
75 #define IDS_DOCUMENTFOLDERS 102
76 #define IDS_PERSONAL 103
77 #define IDS_FAVORITES 104
78 #define IDS_PATH 105
79 #define IDS_DESKTOP 106
81 #define IDS_FONTS 108
82 #define IDS_MYCOMPUTER 110
83 #define IDS_SYSTEMFOLDERS 112
84 #define IDS_LOCALHARDRIVES 113
85 #define IDS_FILENOTFOUND 114
86 #define IDS_VERIFYFILE 115
87 #define IDS_CREATEFILE 116
89 #define IDC_OPENREADONLY chx1
91 #define IDC_TOOLBARSTATIC stc1
92 #define IDC_FILETYPESTATIC stc2
93 #define IDC_FILENAMESTATIC stc3
94 #define IDC_LOOKINSTATIC stc4
96 #define IDC_SHELLSTATIC lst1
98 #define IDC_FILETYPE cmb1
99 #define IDC_LOOKIN cmb2
101 #define IDC_FILENAME edt1
103 #define IDC_TOOLBAR ctl1
105 /***********************************************************************
106 * Prototypes for the methods of the IShellBrowserImpl class
108 /* Constructor */
109 IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner);
111 /* IUnknown */
112 HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface,
113 REFIID riid,
114 LPVOID *ppvObj);
116 ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser * iface);
118 ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser * iface);
120 /* IOleWindow */
121 HRESULT WINAPI IShellBrowserImpl_GetWindow(IShellBrowser * iface,
122 HWND * phwnd);
124 HRESULT WINAPI IShellBrowserImpl_ContextSensitiveHelp(IShellBrowser * iface,
125 BOOL fEnterMode);
127 /* IShellBrowser */
129 HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface,
130 LPCITEMIDLIST pidl,
131 UINT wFlags);
133 HRESULT WINAPI IShellBrowserImpl_EnableModelessSB(IShellBrowser *iface,
134 BOOL fEnable);
136 HRESULT WINAPI IShellBrowserImpl_GetControlWindow(IShellBrowser *iface,
137 UINT id,
138 HWND *lphwnd);
140 HRESULT WINAPI IShellBrowserImpl_GetViewStateStream(IShellBrowser *iface,
141 DWORD grfMode,
142 LPSTREAM *ppStrm);
144 HRESULT WINAPI IShellBrowserImpl_InsertMenusSB(IShellBrowser *iface,
145 HMENU hmenuShared,
146 LPOLEMENUGROUPWIDTHS lpMenuWidths);
148 HRESULT WINAPI IShellBrowserImpl_OnViewWindowActive(IShellBrowser *iface,
149 IShellView *ppshv);
152 HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView(IShellBrowser *iface,
153 IShellView **ppshv);
155 HRESULT WINAPI IShellBrowserImpl_RemoveMenusSB(IShellBrowser *iface,
156 HMENU hmenuShared);
158 HRESULT WINAPI IShellBrowserImpl_SendControlMsg(IShellBrowser *iface,
159 UINT id,
160 UINT uMsg,
161 WPARAM wParam,
162 LPARAM lParam,
163 LRESULT *pret);
165 HRESULT WINAPI IShellBrowserImpl_SetMenuSB(IShellBrowser *iface,
166 HMENU hmenuShared,
167 HOLEMENU holemenuReserved,
168 HWND hwndActiveObject);
170 HRESULT WINAPI IShellBrowserImpl_SetStatusTextSB(IShellBrowser *iface,
171 LPCOLESTR lpszStatusText);
174 HRESULT WINAPI IShellBrowserImpl_SetToolbarItems(IShellBrowser *iface,
175 LPTBBUTTON lpButtons,
176 UINT nButtons,
177 UINT uFlags);
179 HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB(IShellBrowser *iface,
180 LPMSG lpmsg,
181 WORD wID);
184 /* ICommDlgBrowser */
186 HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface(ICommDlgBrowser *iface,
187 REFIID riid,
188 LPVOID *ppvObj);
190 ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef(ICommDlgBrowser * iface);
192 ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_Release(ICommDlgBrowser * iface);
194 HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDlgBrowser *iface,
195 IShellView *ppshv);
197 HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBrowser *iface,
198 IShellView *ppshv,
199 ULONG uChange);
201 HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *iface,
202 IShellView * ppshv,
203 LPCITEMIDLIST pidl);
207 LPITEMIDLIST GetSelectedPidl(IShellView *ppshv);
209 #endif /*SHBROWSER_H*/