2 * Implementation of IShellBrowser for the File Open common dialog
8 #define SHBROWSER_H TRUE
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 /***********************************************************************
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 */
44 LPOPENFILENAMEA ofnInfos
;
46 IShellBrowser
*FOIShellBrowser
;
47 IShellFolder
*FOIShellFolder
;
48 IShellView
*FOIShellView
;
55 FOLDERSETTINGS folderSettings
;
56 LPITEMIDLIST pidlAbsCurrent
;
57 LPWSTR lpstrCurrentFilter
;
71 /***********************************************************************
74 #define IDS_ABOUTBOX 101
75 #define IDS_DOCUMENTFOLDERS 102
76 #define IDS_PERSONAL 103
77 #define IDS_FAVORITES 104
79 #define IDS_DESKTOP 106
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
88 #define IDS_CREATEFOLDER_DENIED 117
89 #define IDS_FILEOPEN_CAPTION 118
91 /* File Dialog Tooltips string IDs */
93 #define IDS_UPFOLDER 150
94 #define IDS_NEWFOLDER 151
95 #define IDS_LISTVIEW 152
96 #define IDS_REPORTVIEW 153
98 #define IDC_OPENREADONLY chx1
100 #define IDC_TOOLBARSTATIC stc1
101 #define IDC_FILETYPESTATIC stc2
102 #define IDC_FILENAMESTATIC stc3
103 #define IDC_LOOKINSTATIC stc4
105 #define IDC_SHELLSTATIC lst1
107 #define IDC_FILETYPE cmb1
108 #define IDC_LOOKIN cmb2
110 #define IDC_FILENAME edt1
112 #define IDC_TOOLBAR ctl1
114 /***********************************************************************
115 * Prototypes for the methods of the IShellBrowserImpl class
118 IShellBrowser
* IShellBrowserImpl_Construct(HWND hwndOwner
);
121 HRESULT WINAPI
IShellBrowserImpl_QueryInterface(IShellBrowser
*iface
,
125 ULONG WINAPI
IShellBrowserImpl_AddRef(IShellBrowser
* iface
);
127 ULONG WINAPI
IShellBrowserImpl_Release(IShellBrowser
* iface
);
130 HRESULT WINAPI
IShellBrowserImpl_GetWindow(IShellBrowser
* iface
,
133 HRESULT WINAPI
IShellBrowserImpl_ContextSensitiveHelp(IShellBrowser
* iface
,
138 HRESULT WINAPI
IShellBrowserImpl_BrowseObject(IShellBrowser
*iface
,
142 HRESULT WINAPI
IShellBrowserImpl_EnableModelessSB(IShellBrowser
*iface
,
145 HRESULT WINAPI
IShellBrowserImpl_GetControlWindow(IShellBrowser
*iface
,
149 HRESULT WINAPI
IShellBrowserImpl_GetViewStateStream(IShellBrowser
*iface
,
153 HRESULT WINAPI
IShellBrowserImpl_InsertMenusSB(IShellBrowser
*iface
,
155 LPOLEMENUGROUPWIDTHS lpMenuWidths
);
157 HRESULT WINAPI
IShellBrowserImpl_OnViewWindowActive(IShellBrowser
*iface
,
161 HRESULT WINAPI
IShellBrowserImpl_QueryActiveShellView(IShellBrowser
*iface
,
164 HRESULT WINAPI
IShellBrowserImpl_RemoveMenusSB(IShellBrowser
*iface
,
167 HRESULT WINAPI
IShellBrowserImpl_SendControlMsg(IShellBrowser
*iface
,
174 HRESULT WINAPI
IShellBrowserImpl_SetMenuSB(IShellBrowser
*iface
,
176 HOLEMENU holemenuReserved
,
177 HWND hwndActiveObject
);
179 HRESULT WINAPI
IShellBrowserImpl_SetStatusTextSB(IShellBrowser
*iface
,
180 LPCOLESTR lpszStatusText
);
183 HRESULT WINAPI
IShellBrowserImpl_SetToolbarItems(IShellBrowser
*iface
,
184 LPTBBUTTON lpButtons
,
188 HRESULT WINAPI
IShellBrowserImpl_TranslateAcceleratorSB(IShellBrowser
*iface
,
193 /* ICommDlgBrowser */
195 HRESULT WINAPI
IShellBrowserImpl_ICommDlgBrowser_QueryInterface(ICommDlgBrowser
*iface
,
199 ULONG WINAPI
IShellBrowserImpl_ICommDlgBrowser_AddRef(ICommDlgBrowser
* iface
);
201 ULONG WINAPI
IShellBrowserImpl_ICommDlgBrowser_Release(ICommDlgBrowser
* iface
);
203 HRESULT WINAPI
IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDlgBrowser
*iface
,
206 HRESULT WINAPI
IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBrowser
*iface
,
210 HRESULT WINAPI
IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser
*iface
,
216 LPITEMIDLIST
GetSelectedPidl(IShellView
*ppshv
);
217 BOOL
EnumSelectedPidls(IShellView
*ppshv
, UINT nPidlIndex
, LPITEMIDLIST
*pidlSelected
);
218 UINT
GetNumSelected(IShellView
*ppshv
);
220 #endif /*SHBROWSER_H*/