1 | /* $Id: shlview.cpp,v 1.3 1999-10-24 22:50:46 sandervl Exp $ */
|
---|
2 | /*
|
---|
3 | * ShellView
|
---|
4 | *
|
---|
5 | * Copyright 1998,1999 <juergen.schmied@metronet.de>
|
---|
6 | *
|
---|
7 | * FIXME: when the ShellView_WndProc gets a WM_NCDESTROY should we do a
|
---|
8 | * Release() ???
|
---|
9 | *
|
---|
10 | */
|
---|
11 |
|
---|
12 | #include <stdlib.h>
|
---|
13 | #include <string.h>
|
---|
14 | #include <odin.h>
|
---|
15 |
|
---|
16 | #define ICOM_CINTERFACE 1
|
---|
17 | #define CINTERFACE 1
|
---|
18 |
|
---|
19 | #include "servprov.h"
|
---|
20 | #include "wine/obj_base.h"
|
---|
21 | #include "wine/obj_shellfolder.h"
|
---|
22 | #include "wine/obj_shellview.h"
|
---|
23 | #include "wine/obj_oleview.h"
|
---|
24 | #include "wine/obj_commdlgbrowser.h"
|
---|
25 | #include "wine/obj_shellbrowser.h"
|
---|
26 | #include "wine/obj_dockingwindowframe.h"
|
---|
27 | #include "wine/obj_extracticon.h"
|
---|
28 | #include "wine/obj_dragdrop.h"
|
---|
29 | #include "wine/undocshell.h"
|
---|
30 | #include "docobj.h"
|
---|
31 | #include "shresdef.h"
|
---|
32 | #include "spy.h"
|
---|
33 | #include "debugtools.h"
|
---|
34 | #include "winerror.h"
|
---|
35 |
|
---|
36 | #include "pidl.h"
|
---|
37 | #include "shell32_main.h"
|
---|
38 |
|
---|
39 | #include <misc.h>
|
---|
40 |
|
---|
41 | DEFAULT_DEBUG_CHANNEL(shell)
|
---|
42 |
|
---|
43 |
|
---|
44 | typedef struct
|
---|
45 | { ICOM_VTABLE(IShellView)* lpvtbl;
|
---|
46 | DWORD ref;
|
---|
47 | ICOM_VTABLE(IOleCommandTarget)* lpvtblOleCommandTarget;
|
---|
48 | ICOM_VTABLE(IDropTarget)* lpvtblDropTarget;
|
---|
49 | ICOM_VTABLE(IDropSource)* lpvtblDropSource;
|
---|
50 | ICOM_VTABLE(IViewObject)* lpvtblViewObject;
|
---|
51 | IShellFolder* pSFParent;
|
---|
52 | IShellBrowser* pShellBrowser;
|
---|
53 | ICommDlgBrowser* pCommDlgBrowser;
|
---|
54 | HWND hWnd;
|
---|
55 | HWND hWndList;
|
---|
56 | HWND hWndParent;
|
---|
57 | FOLDERSETTINGS FolderSettings;
|
---|
58 | HMENU hMenu;
|
---|
59 | UINT uState;
|
---|
60 | UINT cidl;
|
---|
61 | LPITEMIDLIST *apidl;
|
---|
62 | } IShellViewImpl;
|
---|
63 |
|
---|
64 | extern struct ICOM_VTABLE(IShellView) svvt;
|
---|
65 | extern struct ICOM_VTABLE(IOleCommandTarget) ctvt;
|
---|
66 | #define _IOleCommandTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblOleCommandTarget)))
|
---|
67 | #define _ICOM_THIS_From_IOleCommandTarget(myClass, name) myClass* This = (myClass*)(((char*)name)-_IOleCommandTarget_Offset);
|
---|
68 |
|
---|
69 | extern struct ICOM_VTABLE(IDropTarget) dtvt;
|
---|
70 | #define _IDropTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropTarget)))
|
---|
71 | #define _ICOM_THIS_From_IDropTarget(myClass, name) myClass* This = (myClass*)(((char*)name)-_IDropTarget_Offset);
|
---|
72 |
|
---|
73 | extern struct ICOM_VTABLE(IDropSource) dsvt;
|
---|
74 | #define _IDropSource_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropSource)))
|
---|
75 | #define _ICOM_THIS_From_IDropSource(myClass, name) myClass* This = (myClass*)(((char*)name)-_IDropSource_Offset);
|
---|
76 |
|
---|
77 | extern struct ICOM_VTABLE(IViewObject) vovt;
|
---|
78 | #define _IViewObject_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblViewObject)))
|
---|
79 | #define _ICOM_THIS_From_IViewObject(myClass, name) myClass* This = (myClass*)(((char*)name)-_IViewObject_Offset);
|
---|
80 |
|
---|
81 | /*menu items */
|
---|
82 | #define IDM_VIEW_FILES (FCIDM_SHVIEWFIRST + 0x500)
|
---|
83 | #define IDM_VIEW_IDW (FCIDM_SHVIEWFIRST + 0x501)
|
---|
84 | #define IDM_MYFILEITEM (FCIDM_SHVIEWFIRST + 0x502)
|
---|
85 |
|
---|
86 | #define ID_LISTVIEW 2000
|
---|
87 |
|
---|
88 | #define TOOLBAR_ID (L"SHELLDLL_DefView")
|
---|
89 | /*windowsx.h */
|
---|
90 | #define GET_WM_COMMAND_ID(wp, lp) LOWORD(wp)
|
---|
91 | #define GET_WM_COMMAND_HWND(wp, lp) (HWND)(lp)
|
---|
92 | #define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp)
|
---|
93 | /* winuser.h */
|
---|
94 | #define WM_SETTINGCHANGE WM_WININICHANGE
|
---|
95 | extern void WINAPI _InsertMenuItem (HMENU hmenu, UINT indexMenu, BOOL fByPosition,
|
---|
96 | UINT wID, UINT fType, LPSTR dwTypeData, UINT fState);
|
---|
97 |
|
---|
98 | /*
|
---|
99 | Items merged into the toolbar and and the filemenu
|
---|
100 | */
|
---|
101 | typedef struct
|
---|
102 | { int idCommand;
|
---|
103 | int iImage;
|
---|
104 | int idButtonString;
|
---|
105 | int idMenuString;
|
---|
106 | BYTE bState;
|
---|
107 | BYTE bStyle;
|
---|
108 | } MYTOOLINFO, *LPMYTOOLINFO;
|
---|
109 |
|
---|
110 | MYTOOLINFO Tools[] =
|
---|
111 | {
|
---|
112 | { FCIDM_SHVIEW_BIGICON, 0, 0, IDS_VIEW_LARGE, TBSTATE_ENABLED, TBSTYLE_BUTTON },
|
---|
113 | { FCIDM_SHVIEW_SMALLICON, 0, 0, IDS_VIEW_SMALL, TBSTATE_ENABLED, TBSTYLE_BUTTON },
|
---|
114 | { FCIDM_SHVIEW_LISTVIEW, 0, 0, IDS_VIEW_LIST, TBSTATE_ENABLED, TBSTYLE_BUTTON },
|
---|
115 | { FCIDM_SHVIEW_REPORTVIEW, 0, 0, IDS_VIEW_DETAILS, TBSTATE_ENABLED, TBSTYLE_BUTTON },
|
---|
116 | { -1, 0, 0, 0, 0, 0}
|
---|
117 | };
|
---|
118 |
|
---|
119 | typedef void (CALLBACK *PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
|
---|
120 |
|
---|
121 | /**********************************************************
|
---|
122 | * IShellView_Constructor
|
---|
123 | */
|
---|
124 | IShellView * IShellView_Constructor( IShellFolder * pFolder)
|
---|
125 | { IShellViewImpl * sv;
|
---|
126 | sv=(IShellViewImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellViewImpl));
|
---|
127 | sv->ref=1;
|
---|
128 | sv->lpvtbl=&svvt;
|
---|
129 | sv->lpvtblOleCommandTarget=&ctvt;
|
---|
130 | sv->lpvtblDropTarget=&dtvt;
|
---|
131 | sv->lpvtblDropSource=&dsvt;
|
---|
132 | sv->lpvtblViewObject=&vovt;
|
---|
133 |
|
---|
134 | sv->pSFParent = pFolder;
|
---|
135 |
|
---|
136 | if(pFolder)
|
---|
137 | IShellFolder_AddRef(pFolder);
|
---|
138 |
|
---|
139 | TRACE("(%p)->(%p)\n",sv, pFolder);
|
---|
140 | shell32_ObjCount++;
|
---|
141 | return (IShellView *) sv;
|
---|
142 | }
|
---|
143 |
|
---|
144 | /**********************************************************
|
---|
145 | *
|
---|
146 | * ##### helperfunctions for communication with ICommDlgBrowser #####
|
---|
147 | */
|
---|
148 | static BOOL IsInCommDlg(IShellViewImpl * This)
|
---|
149 | { return(This->pCommDlgBrowser != NULL);
|
---|
150 | }
|
---|
151 |
|
---|
152 | static HRESULT IncludeObject(IShellViewImpl * This, LPCITEMIDLIST pidl)
|
---|
153 | {
|
---|
154 | HRESULT ret = S_OK;
|
---|
155 |
|
---|
156 | if ( IsInCommDlg(This) )
|
---|
157 | {
|
---|
158 | TRACE("ICommDlgBrowser::IncludeObject pidl=%p\n", pidl);
|
---|
159 | ret = ICommDlgBrowser_IncludeObject(This->pCommDlgBrowser, (IShellView*)This, pidl);
|
---|
160 | TRACE("--0x%08lx\n", ret);
|
---|
161 | }
|
---|
162 | return ret;
|
---|
163 | }
|
---|
164 |
|
---|
165 | static HRESULT OnDefaultCommand(IShellViewImpl * This)
|
---|
166 | {
|
---|
167 | HRESULT ret = S_FALSE;
|
---|
168 |
|
---|
169 | if (IsInCommDlg(This))
|
---|
170 | {
|
---|
171 | TRACE("ICommDlgBrowser::OnDefaultCommand\n");
|
---|
172 | ret = ICommDlgBrowser_OnDefaultCommand(This->pCommDlgBrowser, (IShellView*)This);
|
---|
173 | TRACE("--\n");
|
---|
174 | }
|
---|
175 | return ret;
|
---|
176 | }
|
---|
177 |
|
---|
178 | static HRESULT OnStateChange(IShellViewImpl * This, UINT uFlags)
|
---|
179 | {
|
---|
180 | HRESULT ret = S_FALSE;
|
---|
181 |
|
---|
182 | if (IsInCommDlg(This))
|
---|
183 | {
|
---|
184 | TRACE("ICommDlgBrowser::OnStateChange flags=%x\n", uFlags);
|
---|
185 | ret = ICommDlgBrowser_OnStateChange(This->pCommDlgBrowser, (IShellView*)This, uFlags);
|
---|
186 | TRACE("--\n");
|
---|
187 | }
|
---|
188 | return ret;
|
---|
189 | }
|
---|
190 | /**********************************************************
|
---|
191 | *
|
---|
192 | * ##### helperfunctions for initializing the view #####
|
---|
193 | */
|
---|
194 | /**********************************************************
|
---|
195 | * set the toolbar buttons
|
---|
196 | */
|
---|
197 | static void CheckToolbar(IShellViewImpl * This)
|
---|
198 | {
|
---|
199 | LRESULT result;
|
---|
200 |
|
---|
201 | TRACE("\n");
|
---|
202 |
|
---|
203 | IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON,
|
---|
204 | FCIDM_TB_SMALLICON, (This->FolderSettings.ViewMode==FVM_LIST)? TRUE : FALSE, &result);
|
---|
205 | IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON,
|
---|
206 | FCIDM_TB_REPORTVIEW, (This->FolderSettings.ViewMode==FVM_DETAILS)? TRUE : FALSE, &result);
|
---|
207 | IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON,
|
---|
208 | FCIDM_TB_SMALLICON, TRUE, &result);
|
---|
209 | IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON,
|
---|
210 | FCIDM_TB_REPORTVIEW, TRUE, &result);
|
---|
211 | }
|
---|
212 |
|
---|
213 | /**********************************************************
|
---|
214 | * change the style of the listview control
|
---|
215 | */
|
---|
216 |
|
---|
217 | static void SetStyle(IShellViewImpl * This, DWORD dwAdd, DWORD dwRemove)
|
---|
218 | {
|
---|
219 | DWORD tmpstyle;
|
---|
220 |
|
---|
221 | TRACE("(%p)\n", This);
|
---|
222 |
|
---|
223 | tmpstyle = GetWindowLongA(This->hWndList, GWL_STYLE);
|
---|
224 | SetWindowLongA(This->hWndList, GWL_STYLE, dwAdd | (tmpstyle & ~dwRemove));
|
---|
225 | }
|
---|
226 |
|
---|
227 | /**********************************************************
|
---|
228 | * ShellView_CreateList()
|
---|
229 | *
|
---|
230 | */
|
---|
231 | static BOOL ShellView_CreateList (IShellViewImpl * This)
|
---|
232 | { DWORD dwStyle;
|
---|
233 |
|
---|
234 | TRACE("%p\n",This);
|
---|
235 |
|
---|
236 | dwStyle = WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER | WS_CHILDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
|
---|
237 | LVS_SHAREIMAGELISTS | LVS_EDITLABELS | LVS_ALIGNLEFT | LVS_AUTOARRANGE;
|
---|
238 |
|
---|
239 | switch (This->FolderSettings.ViewMode)
|
---|
240 | {
|
---|
241 | case FVM_ICON: dwStyle |= LVS_ICON; break;
|
---|
242 | case FVM_DETAILS: dwStyle |= LVS_REPORT; break;
|
---|
243 | case FVM_SMALLICON: dwStyle |= LVS_SMALLICON; break;
|
---|
244 | case FVM_LIST: dwStyle |= LVS_LIST; break;
|
---|
245 | default: dwStyle |= LVS_LIST; break;
|
---|
246 | }
|
---|
247 |
|
---|
248 | if (This->FolderSettings.fFlags && FWF_AUTOARRANGE) dwStyle |= LVS_AUTOARRANGE;
|
---|
249 | /*if (This->FolderSettings.fFlags && FWF_DESKTOP); used from explorer*/
|
---|
250 | if (This->FolderSettings.fFlags && FWF_SINGLESEL) dwStyle |= LVS_SINGLESEL;
|
---|
251 |
|
---|
252 | This->hWndList=CreateWindowExA( WS_EX_CLIENTEDGE,
|
---|
253 | WC_LISTVIEWA,
|
---|
254 | NULL,
|
---|
255 | dwStyle,
|
---|
256 | 0,0,0,0,
|
---|
257 | This->hWnd,
|
---|
258 | (HMENU)ID_LISTVIEW,
|
---|
259 | shell32_hInstance,
|
---|
260 | NULL);
|
---|
261 |
|
---|
262 | if(!This->hWndList)
|
---|
263 | return FALSE;
|
---|
264 |
|
---|
265 | /* UpdateShellSettings(); */
|
---|
266 | return TRUE;
|
---|
267 | }
|
---|
268 | /**********************************************************
|
---|
269 | * ShellView_InitList()
|
---|
270 | */
|
---|
271 | static BOOL ShellView_InitList(IShellViewImpl * This)
|
---|
272 | {
|
---|
273 | LVCOLUMNA lvColumn;
|
---|
274 | CHAR szString[50];
|
---|
275 |
|
---|
276 | TRACE("%p\n",This);
|
---|
277 |
|
---|
278 | ListView_DeleteAllItems(This->hWndList);
|
---|
279 |
|
---|
280 | /*initialize the columns */
|
---|
281 | lvColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT; /* | LVCF_SUBITEM;*/
|
---|
282 | lvColumn.fmt = LVCFMT_LEFT;
|
---|
283 | lvColumn.pszText = szString;
|
---|
284 |
|
---|
285 | lvColumn.cx = 120;
|
---|
286 | LoadStringA(shell32_hInstance, IDS_SHV_COLUMN1, szString, sizeof(szString));
|
---|
287 | ListView_InsertColumnA(This->hWndList, 0, &lvColumn);
|
---|
288 |
|
---|
289 | lvColumn.cx = 80;
|
---|
290 | LoadStringA(shell32_hInstance, IDS_SHV_COLUMN2, szString, sizeof(szString));
|
---|
291 | ListView_InsertColumnA(This->hWndList, 1, &lvColumn);
|
---|
292 |
|
---|
293 | lvColumn.cx = 170;
|
---|
294 | LoadStringA(shell32_hInstance, IDS_SHV_COLUMN3, szString, sizeof(szString));
|
---|
295 | ListView_InsertColumnA(This->hWndList, 2, &lvColumn);
|
---|
296 |
|
---|
297 | lvColumn.cx = 60;
|
---|
298 | LoadStringA(shell32_hInstance, IDS_SHV_COLUMN4, szString, sizeof(szString));
|
---|
299 | ListView_InsertColumnA(This->hWndList, 3, &lvColumn);
|
---|
300 |
|
---|
301 | ListView_SetImageList(This->hWndList, ShellSmallIconList, LVSIL_SMALL);
|
---|
302 | ListView_SetImageList(This->hWndList, ShellBigIconList, LVSIL_NORMAL);
|
---|
303 |
|
---|
304 | return TRUE;
|
---|
305 | }
|
---|
306 | /**********************************************************
|
---|
307 | * ShellView_CompareItems()
|
---|
308 | *
|
---|
309 | * NOTES
|
---|
310 | * internal, CALLBACK for DSA_Sort
|
---|
311 | */
|
---|
312 | static INT CALLBACK ShellView_CompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData)
|
---|
313 | {
|
---|
314 | int ret;
|
---|
315 | TRACE("pidl1=%p pidl2=%p lpsf=%p\n", lParam1, lParam2, (LPVOID) lpData);
|
---|
316 |
|
---|
317 | if(!lpData) return 0;
|
---|
318 |
|
---|
319 | ret = (SHORT) SCODE_CODE(IShellFolder_CompareIDs((LPSHELLFOLDER)lpData, 0, (LPITEMIDLIST)lParam1, (LPITEMIDLIST)lParam2));
|
---|
320 | TRACE("ret=%i\n",ret);
|
---|
321 | return ret;
|
---|
322 | }
|
---|
323 |
|
---|
324 | /**********************************************************
|
---|
325 | * ShellView_FillList()
|
---|
326 | *
|
---|
327 | * NOTES
|
---|
328 | * internal
|
---|
329 | */
|
---|
330 |
|
---|
331 | static HRESULT ShellView_FillList(IShellViewImpl * This)
|
---|
332 | {
|
---|
333 | LPENUMIDLIST pEnumIDList;
|
---|
334 | LPITEMIDLIST pidl;
|
---|
335 | DWORD dwFetched;
|
---|
336 | UINT i;
|
---|
337 | LVITEMA lvItem;
|
---|
338 | HRESULT hRes;
|
---|
339 | HDPA hdpa;
|
---|
340 |
|
---|
341 | TRACE("%p\n",This);
|
---|
342 |
|
---|
343 | /* get the itemlist from the shfolder*/
|
---|
344 | hRes = IShellFolder_EnumObjects(This->pSFParent,This->hWnd, SHCONTF_NONFOLDERS | SHCONTF_FOLDERS, &pEnumIDList);
|
---|
345 | if (hRes != S_OK)
|
---|
346 | {
|
---|
347 | if (hRes==S_FALSE)
|
---|
348 | return(NOERROR);
|
---|
349 | return(hRes);
|
---|
350 | }
|
---|
351 |
|
---|
352 | /* create a pointer array */
|
---|
353 | hdpa = pDPA_Create(16);
|
---|
354 | if (!hdpa)
|
---|
355 | {
|
---|
356 | return(E_OUTOFMEMORY);
|
---|
357 | }
|
---|
358 |
|
---|
359 | /* copy the items into the array*/
|
---|
360 | while((S_OK == IEnumIDList_Next(pEnumIDList,1, &pidl, &dwFetched)) && dwFetched)
|
---|
361 | {
|
---|
362 | if (pDPA_InsertPtr(hdpa, 0x7fff, pidl) == -1)
|
---|
363 | {
|
---|
364 | SHFree(pidl);
|
---|
365 | }
|
---|
366 | }
|
---|
367 |
|
---|
368 | /*sort the array*/
|
---|
369 | pDPA_Sort(hdpa, (PFNDPACOMPARE)ShellView_CompareItems, (LPARAM)This->pSFParent);
|
---|
370 |
|
---|
371 | /*turn the listview's redrawing off*/
|
---|
372 | SendMessageA(This->hWndList, WM_SETREDRAW, FALSE, 0);
|
---|
373 |
|
---|
374 | for (i=0; i < DPA_GetPtrCount(hdpa); ++i) /* DPA_GetPtrCount is a macro*/
|
---|
375 | {
|
---|
376 | pidl = (LPITEMIDLIST)DPA_GetPtr(hdpa, i);
|
---|
377 | if (IncludeObject(This, pidl) == S_OK) /* in a commdlg This works as a filemask*/
|
---|
378 | {
|
---|
379 | ZeroMemory(&lvItem, sizeof(lvItem)); /* create the listviewitem*/
|
---|
380 | lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; /*set the mask*/
|
---|
381 | lvItem.iItem = ListView_GetItemCount(This->hWndList); /*add the item to the end of the list*/
|
---|
382 | lvItem.lParam = (LPARAM) pidl; /*set the item's data*/
|
---|
383 | lvItem.pszText = LPSTR_TEXTCALLBACKA; /*get text on a callback basis*/
|
---|
384 | lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/
|
---|
385 | ListView_InsertItemA(This->hWndList, &lvItem);
|
---|
386 | }
|
---|
387 | else
|
---|
388 | SHFree(pidl); /* the listview has the COPY*/
|
---|
389 | }
|
---|
390 |
|
---|
391 | /*turn the listview's redrawing back on and force it to draw*/
|
---|
392 | SendMessageA(This->hWndList, WM_SETREDRAW, TRUE, 0);
|
---|
393 | InvalidateRect(This->hWndList, NULL, TRUE);
|
---|
394 | UpdateWindow(This->hWndList);
|
---|
395 |
|
---|
396 | IEnumIDList_Release(pEnumIDList); /* destroy the list*/
|
---|
397 | pDPA_Destroy(hdpa);
|
---|
398 |
|
---|
399 | return S_OK;
|
---|
400 | }
|
---|
401 |
|
---|
402 | /**********************************************************
|
---|
403 | * ShellView_OnCreate()
|
---|
404 | */
|
---|
405 | static LRESULT ShellView_OnCreate(IShellViewImpl * This)
|
---|
406 | {
|
---|
407 | #if 0
|
---|
408 | IDropTarget* pdt;
|
---|
409 | #endif
|
---|
410 | TRACE("%p\n",This);
|
---|
411 |
|
---|
412 | if(ShellView_CreateList(This))
|
---|
413 | {
|
---|
414 | if(ShellView_InitList(This))
|
---|
415 | {
|
---|
416 | ShellView_FillList(This);
|
---|
417 | }
|
---|
418 | }
|
---|
419 |
|
---|
420 | #if 0
|
---|
421 | /* This makes a chrash since we havn't called OleInititialize. But if we
|
---|
422 | do this call in DllMain it breaks some apps. The native shell32 does not
|
---|
423 | call OleInitialize and not even depend on ole32.dll.
|
---|
424 | But for some apps it works...*/
|
---|
425 | if (SUCCEEDED(IShellFolder_CreateViewObject(This->pSFParent, This->hWnd, &IID_IDropTarget, (LPVOID*)&pdt)))
|
---|
426 | {
|
---|
427 | pRegisterDragDrop(This->hWnd, pdt);
|
---|
428 | IDropTarget_Release(pdt);
|
---|
429 | }
|
---|
430 | #endif
|
---|
431 | return S_OK;
|
---|
432 | }
|
---|
433 |
|
---|
434 | /**********************************************************
|
---|
435 | * #### Handling of the menus ####
|
---|
436 | */
|
---|
437 |
|
---|
438 | /**********************************************************
|
---|
439 | * ShellView_BuildFileMenu()
|
---|
440 | */
|
---|
441 | static HMENU ShellView_BuildFileMenu(IShellViewImpl * This)
|
---|
442 | { CHAR szText[MAX_PATH];
|
---|
443 | MENUITEMINFOA mii;
|
---|
444 | int nTools,i;
|
---|
445 | HMENU hSubMenu;
|
---|
446 |
|
---|
447 | TRACE("(%p)\n",This);
|
---|
448 |
|
---|
449 | hSubMenu = CreatePopupMenu();
|
---|
450 | if(hSubMenu)
|
---|
451 | { /*get the number of items in our global array*/
|
---|
452 | for(nTools = 0; Tools[nTools].idCommand != -1; nTools++){}
|
---|
453 |
|
---|
454 | /*add the menu items*/
|
---|
455 | for(i = 0; i < nTools; i++)
|
---|
456 | {
|
---|
457 | LoadStringA(shell32_hInstance, Tools[i].idMenuString, szText, MAX_PATH);
|
---|
458 |
|
---|
459 | ZeroMemory(&mii, sizeof(mii));
|
---|
460 | mii.cbSize = sizeof(mii);
|
---|
461 | mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE;
|
---|
462 |
|
---|
463 | if(TBSTYLE_SEP != Tools[i].bStyle) /* no seperator*/
|
---|
464 | {
|
---|
465 | mii.fType = MFT_STRING;
|
---|
466 | mii.fState = MFS_ENABLED;
|
---|
467 | mii.dwTypeData = szText;
|
---|
468 | mii.wID = Tools[i].idCommand;
|
---|
469 | }
|
---|
470 | else
|
---|
471 | {
|
---|
472 | mii.fType = MFT_SEPARATOR;
|
---|
473 | }
|
---|
474 | /* tack This item onto the end of the menu */
|
---|
475 | InsertMenuItemA(hSubMenu, (UINT)-1, TRUE, &mii);
|
---|
476 | }
|
---|
477 | }
|
---|
478 | TRACE("-- return (menu=0x%x)\n",hSubMenu);
|
---|
479 | return hSubMenu;
|
---|
480 | }
|
---|
481 | /**********************************************************
|
---|
482 | * ShellView_MergeFileMenu()
|
---|
483 | */
|
---|
484 | static void ShellView_MergeFileMenu(IShellViewImpl * This, HMENU hSubMenu)
|
---|
485 | { TRACE("(%p)->(submenu=0x%08x) stub\n",This,hSubMenu);
|
---|
486 |
|
---|
487 | if(hSubMenu)
|
---|
488 | { /*insert This item at the beginning of the menu */
|
---|
489 | _InsertMenuItem(hSubMenu, 0, TRUE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED);
|
---|
490 | _InsertMenuItem(hSubMenu, 0, TRUE, IDM_MYFILEITEM, MFT_STRING, "dummy45", MFS_ENABLED);
|
---|
491 |
|
---|
492 | }
|
---|
493 | TRACE("--\n");
|
---|
494 | }
|
---|
495 |
|
---|
496 | /**********************************************************
|
---|
497 | * ShellView_MergeViewMenu()
|
---|
498 | */
|
---|
499 |
|
---|
500 | static void ShellView_MergeViewMenu(IShellViewImpl * This, HMENU hSubMenu)
|
---|
501 | { MENUITEMINFOA mii;
|
---|
502 |
|
---|
503 | TRACE("(%p)->(submenu=0x%08x)\n",This,hSubMenu);
|
---|
504 |
|
---|
505 | if(hSubMenu)
|
---|
506 | { /*add a separator at the correct position in the menu*/
|
---|
507 | _InsertMenuItem(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED);
|
---|
508 |
|
---|
509 | ZeroMemory(&mii, sizeof(mii));
|
---|
510 | mii.cbSize = sizeof(mii);
|
---|
511 | mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_DATA;;
|
---|
512 | mii.fType = MFT_STRING;
|
---|
513 | mii.dwTypeData = "View";
|
---|
514 | mii.hSubMenu = LoadMenuA(shell32_hInstance, "MENU_001");
|
---|
515 | InsertMenuItemA(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii);
|
---|
516 | }
|
---|
517 | }
|
---|
518 |
|
---|
519 | /**********************************************************
|
---|
520 | * ShellView_GetSelections()
|
---|
521 | *
|
---|
522 | * RETURNS
|
---|
523 | * number of selected items
|
---|
524 | */
|
---|
525 | static UINT ShellView_GetSelections(IShellViewImpl * This)
|
---|
526 | {
|
---|
527 | LVITEMA lvItem;
|
---|
528 | UINT i = 0;
|
---|
529 |
|
---|
530 | if (This->apidl)
|
---|
531 | {
|
---|
532 | SHFree(This->apidl);
|
---|
533 | }
|
---|
534 |
|
---|
535 | This->cidl = ListView_GetSelectedCount(This->hWndList);
|
---|
536 | This->apidl = (LPITEMIDLIST*)SHAlloc(This->cidl * sizeof(LPITEMIDLIST));
|
---|
537 |
|
---|
538 | TRACE("selected=%i\n", This->cidl);
|
---|
539 |
|
---|
540 | if(This->apidl)
|
---|
541 | {
|
---|
542 | TRACE("-- Items selected =%u\n", This->cidl);
|
---|
543 |
|
---|
544 | ZeroMemory(&lvItem, sizeof(lvItem));
|
---|
545 | lvItem.mask = LVIF_STATE | LVIF_PARAM;
|
---|
546 | lvItem.stateMask = LVIS_SELECTED;
|
---|
547 |
|
---|
548 | while(ListView_GetItemA(This->hWndList, &lvItem) && (i < This->cidl))
|
---|
549 | {
|
---|
550 | if(lvItem.state & LVIS_SELECTED)
|
---|
551 | {
|
---|
552 | This->apidl[i] = (LPITEMIDLIST)lvItem.lParam;
|
---|
553 | i++;
|
---|
554 | TRACE("-- selected Item found\n");
|
---|
555 | }
|
---|
556 | lvItem.iItem++;
|
---|
557 | }
|
---|
558 | }
|
---|
559 | return This->cidl;
|
---|
560 |
|
---|
561 | }
|
---|
562 | /**********************************************************
|
---|
563 | * ShellView_DoContextMenu()
|
---|
564 | */
|
---|
565 | static void ShellView_DoContextMenu(IShellViewImpl * This, WORD x, WORD y, BOOL bDefault)
|
---|
566 | { UINT uCommand;
|
---|
567 | DWORD wFlags;
|
---|
568 | HMENU hMenu;
|
---|
569 | BOOL fExplore = FALSE;
|
---|
570 | HWND hwndTree = 0;
|
---|
571 | LPCONTEXTMENU pContextMenu = NULL;
|
---|
572 | IContextMenu * pCM = NULL;
|
---|
573 | CMINVOKECOMMANDINFO cmi;
|
---|
574 |
|
---|
575 | TRACE("(%p)->(0x%08x 0x%08x 0x%08x) stub\n",This, x, y, bDefault);
|
---|
576 |
|
---|
577 | /* look, what's selected and create a context menu object of it*/
|
---|
578 | if( ShellView_GetSelections(This) )
|
---|
579 | {
|
---|
580 | IShellFolder_GetUIObjectOf( This->pSFParent, This->hWndParent, This->cidl, This->apidl,
|
---|
581 | (REFIID)&IID_IContextMenu, NULL, (LPVOID *)&pContextMenu);
|
---|
582 |
|
---|
583 | if(pContextMenu)
|
---|
584 | {
|
---|
585 | TRACE("-- pContextMenu\n");
|
---|
586 | hMenu = CreatePopupMenu();
|
---|
587 |
|
---|
588 | if( hMenu )
|
---|
589 | {
|
---|
590 | /* See if we are in Explore or Open mode. If the browser's tree is present, we are in Explore mode.*/
|
---|
591 | if(SUCCEEDED(IShellBrowser_GetControlWindow(This->pShellBrowser,FCW_TREE, &hwndTree)) && hwndTree)
|
---|
592 | {
|
---|
593 | TRACE("-- explore mode\n");
|
---|
594 | fExplore = TRUE;
|
---|
595 | }
|
---|
596 |
|
---|
597 | /* build the flags depending on what we can do with the selected item */
|
---|
598 | wFlags = CMF_NORMAL | (This->cidl != 1 ? 0 : CMF_CANRENAME) | (fExplore ? CMF_EXPLORE : 0);
|
---|
599 |
|
---|
600 | /* let the ContextMenu merge its items in */
|
---|
601 | if (SUCCEEDED(IContextMenu_QueryContextMenu( pContextMenu, hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, wFlags )))
|
---|
602 | {
|
---|
603 | if( bDefault )
|
---|
604 | {
|
---|
605 | TRACE("-- get menu default command\n");
|
---|
606 | uCommand = GetMenuDefaultItem(hMenu, FALSE, GMDI_GOINTOPOPUPS);
|
---|
607 | }
|
---|
608 | else
|
---|
609 | {
|
---|
610 | TRACE("-- track popup\n");
|
---|
611 | uCommand = TrackPopupMenu( hMenu,TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,This->hWnd,NULL);
|
---|
612 | }
|
---|
613 |
|
---|
614 | if(uCommand > 0)
|
---|
615 | {
|
---|
616 | TRACE("-- uCommand=%u\n", uCommand);
|
---|
617 | if (IsInCommDlg(This) && ((uCommand==IDM_EXPLORE) || (uCommand==IDM_OPEN)))
|
---|
618 | {
|
---|
619 | TRACE("-- dlg: OnDefaultCommand\n");
|
---|
620 | OnDefaultCommand(This);
|
---|
621 | }
|
---|
622 | else
|
---|
623 | {
|
---|
624 | TRACE("-- explore -- invoke command\n");
|
---|
625 | ZeroMemory(&cmi, sizeof(cmi));
|
---|
626 | cmi.cbSize = sizeof(cmi);
|
---|
627 | cmi.hwnd = This->hWndParent;
|
---|
628 | cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand);
|
---|
629 | IContextMenu_InvokeCommand(pContextMenu, &cmi);
|
---|
630 | }
|
---|
631 | }
|
---|
632 | DestroyMenu(hMenu);
|
---|
633 | }
|
---|
634 | }
|
---|
635 | if (pContextMenu)
|
---|
636 | IContextMenu_Release(pContextMenu);
|
---|
637 | }
|
---|
638 | }
|
---|
639 | else /* background context menu */
|
---|
640 | {
|
---|
641 | hMenu = CreatePopupMenu();
|
---|
642 |
|
---|
643 | pCM = ISvBgCm_Constructor();
|
---|
644 | IContextMenu_QueryContextMenu(pCM, hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, 0);
|
---|
645 |
|
---|
646 | uCommand = TrackPopupMenu( hMenu, TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,This->hWnd,NULL);
|
---|
647 | DestroyMenu(hMenu);
|
---|
648 |
|
---|
649 | TRACE("-- (%p)->(uCommand=0x%08x )\n",This, uCommand);
|
---|
650 |
|
---|
651 | ZeroMemory(&cmi, sizeof(cmi));
|
---|
652 | cmi.cbSize = sizeof(cmi);
|
---|
653 | cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand);
|
---|
654 | cmi.hwnd = This->hWndParent;
|
---|
655 | IContextMenu_InvokeCommand(pCM, &cmi);
|
---|
656 |
|
---|
657 | IContextMenu_Release(pCM);
|
---|
658 | }
|
---|
659 | }
|
---|
660 |
|
---|
661 | /**********************************************************
|
---|
662 | * ##### message handling #####
|
---|
663 | */
|
---|
664 |
|
---|
665 | /**********************************************************
|
---|
666 | * ShellView_OnSize()
|
---|
667 | */
|
---|
668 | static LRESULT ShellView_OnSize(IShellViewImpl * This, WORD wWidth, WORD wHeight)
|
---|
669 | {
|
---|
670 | TRACE("%p width=%u height=%u\n",This, wWidth,wHeight);
|
---|
671 |
|
---|
672 | /*resize the ListView to fit our window*/
|
---|
673 | if(This->hWndList)
|
---|
674 | {
|
---|
675 | MoveWindow(This->hWndList, 0, 0, wWidth, wHeight, TRUE);
|
---|
676 | }
|
---|
677 |
|
---|
678 | return S_OK;
|
---|
679 | }
|
---|
680 | /**********************************************************
|
---|
681 | * ShellView_OnDeactivate()
|
---|
682 | *
|
---|
683 | * NOTES
|
---|
684 | * internal
|
---|
685 | */
|
---|
686 | static void ShellView_OnDeactivate(IShellViewImpl * This)
|
---|
687 | {
|
---|
688 | TRACE("%p\n",This);
|
---|
689 |
|
---|
690 | if(This->uState != SVUIA_DEACTIVATE)
|
---|
691 | {
|
---|
692 | if(This->hMenu)
|
---|
693 | {
|
---|
694 | IShellBrowser_SetMenuSB(This->pShellBrowser,0, 0, 0);
|
---|
695 | IShellBrowser_RemoveMenusSB(This->pShellBrowser,This->hMenu);
|
---|
696 | DestroyMenu(This->hMenu);
|
---|
697 | This->hMenu = 0;
|
---|
698 | }
|
---|
699 |
|
---|
700 | This->uState = SVUIA_DEACTIVATE;
|
---|
701 | }
|
---|
702 | }
|
---|
703 |
|
---|
704 | /**********************************************************
|
---|
705 | * ShellView_OnActivate()
|
---|
706 | */
|
---|
707 | static LRESULT ShellView_OnActivate(IShellViewImpl * This, UINT uState)
|
---|
708 | { OLEMENUGROUPWIDTHS omw = { {0, 0, 0, 0, 0, 0} };
|
---|
709 | MENUITEMINFOA mii;
|
---|
710 | CHAR szText[MAX_PATH];
|
---|
711 |
|
---|
712 | TRACE("%p uState=%x\n",This,uState);
|
---|
713 |
|
---|
714 | /*don't do anything if the state isn't really changing */
|
---|
715 | if(This->uState == uState)
|
---|
716 | {
|
---|
717 | return S_OK;
|
---|
718 | }
|
---|
719 |
|
---|
720 | ShellView_OnDeactivate(This);
|
---|
721 |
|
---|
722 | /*only do This if we are active */
|
---|
723 | if(uState != SVUIA_DEACTIVATE)
|
---|
724 | {
|
---|
725 | /*merge the menus */
|
---|
726 | This->hMenu = CreateMenu();
|
---|
727 |
|
---|
728 | if(This->hMenu)
|
---|
729 | {
|
---|
730 | IShellBrowser_InsertMenusSB(This->pShellBrowser, This->hMenu, &omw);
|
---|
731 | TRACE("-- after fnInsertMenusSB\n");
|
---|
732 |
|
---|
733 | /*build the top level menu get the menu item's text*/
|
---|
734 | strcpy(szText,"dummy 31");
|
---|
735 |
|
---|
736 | ZeroMemory(&mii, sizeof(mii));
|
---|
737 | mii.cbSize = sizeof(mii);
|
---|
738 | mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_STATE;
|
---|
739 | mii.fType = MFT_STRING;
|
---|
740 | mii.fState = MFS_ENABLED;
|
---|
741 | mii.dwTypeData = szText;
|
---|
742 | mii.hSubMenu = ShellView_BuildFileMenu(This);
|
---|
743 |
|
---|
744 | /*insert our menu into the menu bar*/
|
---|
745 | if(mii.hSubMenu)
|
---|
746 | {
|
---|
747 | InsertMenuItemA(This->hMenu, FCIDM_MENU_HELP, FALSE, &mii);
|
---|
748 | }
|
---|
749 |
|
---|
750 | /*get the view menu so we can merge with it*/
|
---|
751 | ZeroMemory(&mii, sizeof(mii));
|
---|
752 | mii.cbSize = sizeof(mii);
|
---|
753 | mii.fMask = MIIM_SUBMENU;
|
---|
754 |
|
---|
755 | if(GetMenuItemInfoA(This->hMenu, FCIDM_MENU_VIEW, FALSE, &mii))
|
---|
756 | {
|
---|
757 | ShellView_MergeViewMenu(This, mii.hSubMenu);
|
---|
758 | }
|
---|
759 |
|
---|
760 | /*add the items that should only be added if we have the focus*/
|
---|
761 | if(SVUIA_ACTIVATE_FOCUS == uState)
|
---|
762 | {
|
---|
763 | /*get the file menu so we can merge with it */
|
---|
764 | ZeroMemory(&mii, sizeof(mii));
|
---|
765 | mii.cbSize = sizeof(mii);
|
---|
766 | mii.fMask = MIIM_SUBMENU;
|
---|
767 |
|
---|
768 | if(GetMenuItemInfoA(This->hMenu, FCIDM_MENU_FILE, FALSE, &mii))
|
---|
769 | {
|
---|
770 | ShellView_MergeFileMenu(This, mii.hSubMenu);
|
---|
771 | }
|
---|
772 | }
|
---|
773 | TRACE("-- before fnSetMenuSB\n");
|
---|
774 | IShellBrowser_SetMenuSB(This->pShellBrowser, This->hMenu, 0, This->hWnd);
|
---|
775 | }
|
---|
776 | }
|
---|
777 | This->uState = uState;
|
---|
778 | TRACE("--\n");
|
---|
779 | return S_OK;
|
---|
780 | }
|
---|
781 |
|
---|
782 | /**********************************************************
|
---|
783 | * ShellView_OnSetFocus()
|
---|
784 | *
|
---|
785 | */
|
---|
786 | static LRESULT ShellView_OnSetFocus(IShellViewImpl * This)
|
---|
787 | {
|
---|
788 | TRACE("%p\n",This);
|
---|
789 |
|
---|
790 | /* Tell the browser one of our windows has received the focus. This
|
---|
791 | should always be done before merging menus (OnActivate merges the
|
---|
792 | menus) if one of our windows has the focus.*/
|
---|
793 |
|
---|
794 | IShellBrowser_OnViewWindowActive(This->pShellBrowser,(IShellView*) This);
|
---|
795 | ShellView_OnActivate(This, SVUIA_ACTIVATE_FOCUS);
|
---|
796 |
|
---|
797 | /* Set the focus to the listview */
|
---|
798 | SetFocus(This->hWndList);
|
---|
799 |
|
---|
800 | /* Notify the ICommDlgBrowser interface */
|
---|
801 | OnStateChange(This,CDBOSC_SETFOCUS);
|
---|
802 |
|
---|
803 | return 0;
|
---|
804 | }
|
---|
805 |
|
---|
806 | /**********************************************************
|
---|
807 | * ShellView_OnKillFocus()
|
---|
808 | */
|
---|
809 | static LRESULT ShellView_OnKillFocus(IShellViewImpl * This)
|
---|
810 | {
|
---|
811 | TRACE("(%p) stub\n",This);
|
---|
812 |
|
---|
813 | ShellView_OnActivate(This, SVUIA_ACTIVATE_NOFOCUS);
|
---|
814 | /* Notify the ICommDlgBrowser */
|
---|
815 | OnStateChange(This,CDBOSC_KILLFOCUS);
|
---|
816 |
|
---|
817 | return 0;
|
---|
818 | }
|
---|
819 |
|
---|
820 | /**********************************************************
|
---|
821 | * ShellView_OnCommand()
|
---|
822 | */
|
---|
823 | static LRESULT ShellView_OnCommand(IShellViewImpl * This,DWORD dwCmdID, DWORD dwCmd, HWND hwndCmd)
|
---|
824 | {
|
---|
825 | TRACE("(%p)->(0x%08lx 0x%08lx 0x%08x) stub\n",This, dwCmdID, dwCmd, hwndCmd);
|
---|
826 |
|
---|
827 | switch(dwCmdID)
|
---|
828 | {
|
---|
829 | case FCIDM_SHVIEW_SMALLICON:
|
---|
830 | This->FolderSettings.ViewMode = FVM_SMALLICON;
|
---|
831 | SetStyle (This, LVS_SMALLICON, LVS_TYPEMASK);
|
---|
832 | break;
|
---|
833 |
|
---|
834 | case FCIDM_SHVIEW_BIGICON:
|
---|
835 | This->FolderSettings.ViewMode = FVM_ICON;
|
---|
836 | SetStyle (This, LVS_ICON, LVS_TYPEMASK);
|
---|
837 | break;
|
---|
838 |
|
---|
839 | case FCIDM_SHVIEW_LISTVIEW:
|
---|
840 | This->FolderSettings.ViewMode = FVM_LIST;
|
---|
841 | SetStyle (This, LVS_LIST, LVS_TYPEMASK);
|
---|
842 | break;
|
---|
843 |
|
---|
844 | case FCIDM_SHVIEW_REPORTVIEW:
|
---|
845 | This->FolderSettings.ViewMode = FVM_DETAILS;
|
---|
846 | SetStyle (This, LVS_REPORT, LVS_TYPEMASK);
|
---|
847 | break;
|
---|
848 |
|
---|
849 | default:
|
---|
850 | TRACE("-- COMMAND 0x%04lx unhandled\n", dwCmdID);
|
---|
851 | }
|
---|
852 | return 0;
|
---|
853 | }
|
---|
854 |
|
---|
855 | /**********************************************************
|
---|
856 | * ShellView_OnNotify()
|
---|
857 | */
|
---|
858 |
|
---|
859 | static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpnmh)
|
---|
860 | { NM_LISTVIEW *lpnmlv = (NM_LISTVIEW*)lpnmh;
|
---|
861 | NMLVDISPINFOA *lpdi = (NMLVDISPINFOA *)lpnmh;
|
---|
862 | LPITEMIDLIST pidl;
|
---|
863 | STRRET str;
|
---|
864 |
|
---|
865 | TRACE("%p CtlID=%u lpnmh->code=%x\n",This,CtlID,lpnmh->code);
|
---|
866 |
|
---|
867 | switch(lpnmh->code)
|
---|
868 | {
|
---|
869 | case NM_SETFOCUS:
|
---|
870 | TRACE("-- NM_SETFOCUS %p\n",This);
|
---|
871 | ShellView_OnSetFocus(This);
|
---|
872 | break;
|
---|
873 |
|
---|
874 | case NM_KILLFOCUS:
|
---|
875 | TRACE("-- NM_KILLFOCUS %p\n",This);
|
---|
876 | ShellView_OnDeactivate(This);
|
---|
877 | /* Notify the ICommDlgBrowser interface */
|
---|
878 | OnStateChange(This,CDBOSC_KILLFOCUS);
|
---|
879 | break;
|
---|
880 |
|
---|
881 | case HDN_ENDTRACKA:
|
---|
882 | TRACE("-- HDN_ENDTRACKA %p\n",This);
|
---|
883 | /*nColumn1 = ListView_GetColumnWidth(This->hWndList, 0);
|
---|
884 | nColumn2 = ListView_GetColumnWidth(This->hWndList, 1);*/
|
---|
885 | break;
|
---|
886 |
|
---|
887 | case LVN_DELETEITEM:
|
---|
888 | TRACE("-- LVN_DELETEITEM %p\n",This);
|
---|
889 | SHFree((LPITEMIDLIST)lpnmlv->lParam); /*delete the pidl because we made a copy of it*/
|
---|
890 | break;
|
---|
891 |
|
---|
892 | case LVN_ITEMACTIVATE:
|
---|
893 | TRACE("-- LVN_ITEMACTIVATE %p\n",This);
|
---|
894 | OnStateChange(This, CDBOSC_SELCHANGE); /* the browser will get the IDataObject now */
|
---|
895 | ShellView_DoContextMenu(This, 0, 0, TRUE);
|
---|
896 | break;
|
---|
897 |
|
---|
898 | case LVN_GETDISPINFOA:
|
---|
899 | TRACE("-- LVN_GETDISPINFOA %p\n",This);
|
---|
900 | pidl = (LPITEMIDLIST)lpdi->item.lParam;
|
---|
901 |
|
---|
902 |
|
---|
903 | if(lpdi->item.iSubItem) /*is the sub-item information being requested?*/
|
---|
904 | { if(lpdi->item.mask & LVIF_TEXT) /*is the text being requested?*/
|
---|
905 | { if(_ILIsValue(pidl)) /*is This a value or a folder?*/
|
---|
906 | { switch (lpdi->item.iSubItem)
|
---|
907 | { case 1: /* size */
|
---|
908 | _ILGetFileSize (pidl, lpdi->item.pszText, lpdi->item.cchTextMax);
|
---|
909 | break;
|
---|
910 | case 2: /* extension */
|
---|
911 | { char sTemp[64];
|
---|
912 | if (_ILGetExtension (pidl, sTemp, 64))
|
---|
913 | { if (!( HCR_MapTypeToValue(sTemp, sTemp, 64, TRUE)
|
---|
914 | && HCR_MapTypeToValue(sTemp, lpdi->item.pszText, lpdi->item.cchTextMax, FALSE )))
|
---|
915 | { lstrcpynA (lpdi->item.pszText, sTemp, lpdi->item.cchTextMax);
|
---|
916 | strncat (lpdi->item.pszText, "-file", lpdi->item.cchTextMax);
|
---|
917 | }
|
---|
918 | }
|
---|
919 | else /* no extension found */
|
---|
920 | { lpdi->item.pszText[0]=0x00;
|
---|
921 | }
|
---|
922 | }
|
---|
923 | break;
|
---|
924 | case 3: /* date */
|
---|
925 | _ILGetFileDate (pidl, lpdi->item.pszText, lpdi->item.cchTextMax);
|
---|
926 | break;
|
---|
927 | }
|
---|
928 | }
|
---|
929 | else /*its a folder*/
|
---|
930 | { switch (lpdi->item.iSubItem)
|
---|
931 | { case 1:
|
---|
932 | strcpy(lpdi->item.pszText, "");
|
---|
933 | break;
|
---|
934 | case 2:
|
---|
935 | lstrcpynA (lpdi->item.pszText, "Folder", lpdi->item.cchTextMax);
|
---|
936 | break;
|
---|
937 | case 3:
|
---|
938 | _ILGetFileDate (pidl, lpdi->item.pszText, lpdi->item.cchTextMax);
|
---|
939 | break;
|
---|
940 | }
|
---|
941 | }
|
---|
942 | TRACE("-- text=%s\n",lpdi->item.pszText);
|
---|
943 | }
|
---|
944 | }
|
---|
945 | else /*the item text is being requested*/
|
---|
946 | {
|
---|
947 | if(lpdi->item.mask & LVIF_TEXT) /*is the text being requested?*/
|
---|
948 | {
|
---|
949 | if(SUCCEEDED(IShellFolder_GetDisplayNameOf(This->pSFParent,pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &str)))
|
---|
950 | {
|
---|
951 | StrRetToStrNA(lpdi->item.pszText, lpdi->item.cchTextMax, &str, pidl);
|
---|
952 | }
|
---|
953 | TRACE("-- text=%s\n",lpdi->item.pszText);
|
---|
954 | }
|
---|
955 |
|
---|
956 | if(lpdi->item.mask & LVIF_IMAGE) /*is the image being requested?*/
|
---|
957 | {
|
---|
958 | lpdi->item.iImage = SHMapPIDLToSystemImageListIndex(This->pSFParent, pidl, 0);
|
---|
959 | }
|
---|
960 | }
|
---|
961 | break;
|
---|
962 |
|
---|
963 | case LVN_ITEMCHANGED:
|
---|
964 | TRACE("-- LVN_ITEMCHANGED %p\n",This);
|
---|
965 | OnStateChange(This, CDBOSC_SELCHANGE); /* the browser will get the IDataObject now */
|
---|
966 | break;
|
---|
967 |
|
---|
968 | case LVN_BEGINDRAG:
|
---|
969 | case LVN_BEGINRDRAG:
|
---|
970 |
|
---|
971 | if (ShellView_GetSelections(This))
|
---|
972 | {
|
---|
973 | IDataObject * pda;
|
---|
974 | DWORD dwAttributes;
|
---|
975 | DWORD dwEffect = DROPEFFECT_COPY | DROPEFFECT_MOVE;
|
---|
976 |
|
---|
977 | if (SUCCEEDED(IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, This->apidl, &IID_IDataObject,0,(LPVOID *)&pda)))
|
---|
978 | {
|
---|
979 | IDropSource * pds = (IDropSource*)&(This->lpvtblDropSource); /* own DropSource interface */
|
---|
980 |
|
---|
981 | if (SUCCEEDED(IShellFolder_GetAttributesOf(This->pSFParent, This->cidl, This->apidl, &dwAttributes)))
|
---|
982 | {
|
---|
983 | if (dwAttributes & SFGAO_CANLINK)
|
---|
984 | {
|
---|
985 | dwEffect |= DROPEFFECT_LINK;
|
---|
986 | }
|
---|
987 | }
|
---|
988 |
|
---|
989 | if (pds)
|
---|
990 | {
|
---|
991 | DWORD dwEffect;
|
---|
992 | pDoDragDrop(pda, pds, dwEffect, &dwEffect);
|
---|
993 | }
|
---|
994 |
|
---|
995 | IDataObject_Release(pda);
|
---|
996 | }
|
---|
997 | }
|
---|
998 | break;
|
---|
999 |
|
---|
1000 | case LVN_BEGINLABELEDITA:
|
---|
1001 | case LVN_ENDLABELEDITA:
|
---|
1002 | FIXME("labeledit\n");
|
---|
1003 | break;
|
---|
1004 |
|
---|
1005 | default:
|
---|
1006 | // TRACE("-- %p WM_COMMAND %s unhandled\n", This, SPY_GetMsgName(lpnmh->code));
|
---|
1007 | break;;
|
---|
1008 | }
|
---|
1009 | return 0;
|
---|
1010 | }
|
---|
1011 |
|
---|
1012 | /**********************************************************
|
---|
1013 | * ShellView_WndProc
|
---|
1014 | */
|
---|
1015 |
|
---|
1016 | static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam)
|
---|
1017 | {
|
---|
1018 | IShellViewImpl * pThis = (IShellViewImpl*)GetWindowLongA(hWnd, GWL_USERDATA);
|
---|
1019 | LPCREATESTRUCTA lpcs;
|
---|
1020 |
|
---|
1021 | TRACE("(hwnd=%x msg=%x wparm=%x lparm=%lx)\n",hWnd, uMessage, wParam, lParam);
|
---|
1022 |
|
---|
1023 | switch (uMessage)
|
---|
1024 | {
|
---|
1025 | case WM_NCCREATE:
|
---|
1026 | lpcs = (LPCREATESTRUCTA)lParam;
|
---|
1027 | pThis = (IShellViewImpl*)(lpcs->lpCreateParams);
|
---|
1028 | SetWindowLongA(hWnd, GWL_USERDATA, (LONG)pThis);
|
---|
1029 | pThis->hWnd = hWnd; /*set the window handle*/
|
---|
1030 | break;
|
---|
1031 |
|
---|
1032 | case WM_SIZE: return ShellView_OnSize(pThis,LOWORD(lParam), HIWORD(lParam));
|
---|
1033 | case WM_SETFOCUS: return ShellView_OnSetFocus(pThis);
|
---|
1034 | case WM_KILLFOCUS: return ShellView_OnKillFocus(pThis);
|
---|
1035 | case WM_CREATE: return ShellView_OnCreate(pThis);
|
---|
1036 | case WM_ACTIVATE: return ShellView_OnActivate(pThis, SVUIA_ACTIVATE_FOCUS);
|
---|
1037 | case WM_NOTIFY: return ShellView_OnNotify(pThis,(UINT)wParam, (LPNMHDR)lParam);
|
---|
1038 | case WM_COMMAND: return ShellView_OnCommand(pThis,
|
---|
1039 | GET_WM_COMMAND_ID(wParam, lParam),
|
---|
1040 | GET_WM_COMMAND_CMD(wParam, lParam),
|
---|
1041 | GET_WM_COMMAND_HWND(wParam, lParam));
|
---|
1042 |
|
---|
1043 | case WM_CONTEXTMENU: ShellView_DoContextMenu(pThis, LOWORD(lParam), HIWORD(lParam), FALSE);
|
---|
1044 | return 0;
|
---|
1045 |
|
---|
1046 | case WM_SHOWWINDOW: UpdateWindow(pThis->hWndList);
|
---|
1047 | break;
|
---|
1048 |
|
---|
1049 | case WM_GETDLGCODE: return SendMessageA(pThis->hWndList,uMessage,0,0);
|
---|
1050 |
|
---|
1051 | case WM_DESTROY: pRevokeDragDrop(pThis->hWnd);
|
---|
1052 | break;
|
---|
1053 | }
|
---|
1054 |
|
---|
1055 | return DefWindowProcA (hWnd, uMessage, wParam, lParam);
|
---|
1056 | }
|
---|
1057 | /**********************************************************
|
---|
1058 | *
|
---|
1059 | *
|
---|
1060 | * The INTERFACE of the IShellView object
|
---|
1061 | *
|
---|
1062 | *
|
---|
1063 | **********************************************************
|
---|
1064 | * IShellView_QueryInterface
|
---|
1065 | */
|
---|
1066 | static HRESULT WINAPI IShellView_fnQueryInterface(IShellView * iface,REFIID riid, LPVOID *ppvObj)
|
---|
1067 | {
|
---|
1068 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1069 |
|
---|
1070 | char xriid[50];
|
---|
1071 | WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
---|
1072 | TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,xriid,ppvObj);
|
---|
1073 |
|
---|
1074 | *ppvObj = NULL;
|
---|
1075 |
|
---|
1076 | if(IsEqualIID(riid, &IID_IUnknown))
|
---|
1077 | {
|
---|
1078 | *ppvObj = This;
|
---|
1079 | }
|
---|
1080 | else if(IsEqualIID(riid, &IID_IShellView))
|
---|
1081 | {
|
---|
1082 | *ppvObj = (IShellView*)This;
|
---|
1083 | }
|
---|
1084 | else if(IsEqualIID(riid, &IID_IOleCommandTarget))
|
---|
1085 | {
|
---|
1086 | *ppvObj = (IOleCommandTarget*)&(This->lpvtblOleCommandTarget);
|
---|
1087 | }
|
---|
1088 | else if(IsEqualIID(riid, &IID_IDropTarget))
|
---|
1089 | {
|
---|
1090 | *ppvObj = (IDropTarget*)&(This->lpvtblDropTarget);
|
---|
1091 | }
|
---|
1092 | else if(IsEqualIID(riid, &IID_IDropSource))
|
---|
1093 | {
|
---|
1094 | *ppvObj = (IDropSource*)&(This->lpvtblDropSource);
|
---|
1095 | }
|
---|
1096 | else if(IsEqualIID(riid, &IID_IViewObject))
|
---|
1097 | {
|
---|
1098 | *ppvObj = (IViewObject*)&(This->lpvtblViewObject);
|
---|
1099 | }
|
---|
1100 |
|
---|
1101 | if(*ppvObj)
|
---|
1102 | {
|
---|
1103 | IUnknown_AddRef( (IUnknown*)*ppvObj );
|
---|
1104 | TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
---|
1105 | return S_OK;
|
---|
1106 | }
|
---|
1107 | TRACE("-- Interface: E_NOINTERFACE\n");
|
---|
1108 | return E_NOINTERFACE;
|
---|
1109 | }
|
---|
1110 |
|
---|
1111 | /**********************************************************
|
---|
1112 | * IShellView_AddRef
|
---|
1113 | */
|
---|
1114 | static ULONG WINAPI IShellView_fnAddRef(IShellView * iface)
|
---|
1115 | {
|
---|
1116 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1117 |
|
---|
1118 | TRACE("(%p)->(count=%lu)\n",This,This->ref);
|
---|
1119 |
|
---|
1120 | shell32_ObjCount++;
|
---|
1121 | return ++(This->ref);
|
---|
1122 | }
|
---|
1123 | /**********************************************************
|
---|
1124 | * IShellView_Release
|
---|
1125 | */
|
---|
1126 | static ULONG WINAPI IShellView_fnRelease(IShellView * iface)
|
---|
1127 | {
|
---|
1128 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1129 |
|
---|
1130 | TRACE("(%p)->()\n",This);
|
---|
1131 |
|
---|
1132 | shell32_ObjCount--;
|
---|
1133 |
|
---|
1134 | if (!--(This->ref))
|
---|
1135 | {
|
---|
1136 | TRACE(" destroying IShellView(%p)\n",This);
|
---|
1137 |
|
---|
1138 | if(This->pSFParent)
|
---|
1139 | IShellFolder_Release(This->pSFParent);
|
---|
1140 |
|
---|
1141 | if (This->apidl)
|
---|
1142 | SHFree(This->apidl);
|
---|
1143 |
|
---|
1144 | if (This->pCommDlgBrowser)
|
---|
1145 | ICommDlgBrowser_Release(This->pCommDlgBrowser);
|
---|
1146 |
|
---|
1147 | HeapFree(GetProcessHeap(),0,This);
|
---|
1148 | return 0;
|
---|
1149 | }
|
---|
1150 | return This->ref;
|
---|
1151 | }
|
---|
1152 |
|
---|
1153 | /**********************************************************
|
---|
1154 | * ShellView_GetWindow
|
---|
1155 | */
|
---|
1156 | static HRESULT WINAPI IShellView_fnGetWindow(IShellView * iface,HWND * phWnd)
|
---|
1157 | {
|
---|
1158 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1159 |
|
---|
1160 | TRACE("(%p)\n",This);
|
---|
1161 |
|
---|
1162 | *phWnd = This->hWnd;
|
---|
1163 |
|
---|
1164 | return S_OK;
|
---|
1165 | }
|
---|
1166 |
|
---|
1167 | static HRESULT WINAPI IShellView_fnContextSensitiveHelp(IShellView * iface,BOOL fEnterMode)
|
---|
1168 | {
|
---|
1169 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1170 |
|
---|
1171 | FIXME("(%p) stub\n",This);
|
---|
1172 |
|
---|
1173 | return E_NOTIMPL;
|
---|
1174 | }
|
---|
1175 |
|
---|
1176 | /**********************************************************
|
---|
1177 | * IShellView_TranslateAccelerator
|
---|
1178 | *
|
---|
1179 | * FIXME:
|
---|
1180 | * use the accel functions
|
---|
1181 | */
|
---|
1182 | static HRESULT WINAPI IShellView_fnTranslateAccelerator(IShellView * iface,LPMSG lpmsg)
|
---|
1183 | {
|
---|
1184 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1185 |
|
---|
1186 | FIXME("(%p)->(%p: hwnd=%x msg=%x lp=%lx wp=%x) stub\n",This,lpmsg, lpmsg->hwnd, lpmsg->message, lpmsg->lParam, lpmsg->wParam);
|
---|
1187 |
|
---|
1188 |
|
---|
1189 | switch (lpmsg->message)
|
---|
1190 | { case WM_KEYDOWN: TRACE("-- key=0x04%x",lpmsg->wParam) ;
|
---|
1191 | }
|
---|
1192 | return NOERROR;
|
---|
1193 | }
|
---|
1194 |
|
---|
1195 | static HRESULT WINAPI IShellView_fnEnableModeless(IShellView * iface,BOOL fEnable)
|
---|
1196 | {
|
---|
1197 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1198 |
|
---|
1199 | FIXME("(%p) stub\n",This);
|
---|
1200 |
|
---|
1201 | return E_NOTIMPL;
|
---|
1202 | }
|
---|
1203 |
|
---|
1204 | static HRESULT WINAPI IShellView_fnUIActivate(IShellView * iface,UINT uState)
|
---|
1205 | {
|
---|
1206 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1207 |
|
---|
1208 | CHAR szName[MAX_PATH];
|
---|
1209 | LRESULT lResult;
|
---|
1210 | int nPartArray[1] = {-1};
|
---|
1211 |
|
---|
1212 | TRACE("(%p)->(state=%x) stub\n",This, uState);
|
---|
1213 |
|
---|
1214 | /*don't do anything if the state isn't really changing*/
|
---|
1215 | if(This->uState == uState)
|
---|
1216 | {
|
---|
1217 | return S_OK;
|
---|
1218 | }
|
---|
1219 |
|
---|
1220 | /*OnActivate handles the menu merging and internal state*/
|
---|
1221 | ShellView_OnActivate(This, uState);
|
---|
1222 |
|
---|
1223 | /*only do This if we are active*/
|
---|
1224 | if(uState != SVUIA_DEACTIVATE)
|
---|
1225 | {
|
---|
1226 |
|
---|
1227 | IShellFolder_GetFolderPath( This->pSFParent, szName, sizeof(szName) );
|
---|
1228 |
|
---|
1229 | /* set the number of parts */
|
---|
1230 | IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_STATUS, SB_SETPARTS, 1,
|
---|
1231 | (LPARAM)nPartArray, &lResult);
|
---|
1232 |
|
---|
1233 | /* set the text for the parts */
|
---|
1234 | IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_STATUS, SB_SETTEXTA,
|
---|
1235 | 0, (LPARAM)szName, &lResult);
|
---|
1236 | }
|
---|
1237 |
|
---|
1238 | return S_OK;
|
---|
1239 | }
|
---|
1240 |
|
---|
1241 | static HRESULT WINAPI IShellView_fnRefresh(IShellView * iface)
|
---|
1242 | {
|
---|
1243 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1244 |
|
---|
1245 | TRACE("(%p)\n",This);
|
---|
1246 |
|
---|
1247 | ListView_DeleteAllItems(This->hWndList);
|
---|
1248 | ShellView_FillList(This);
|
---|
1249 |
|
---|
1250 | return S_OK;
|
---|
1251 | }
|
---|
1252 |
|
---|
1253 | static HRESULT WINAPI IShellView_fnCreateViewWindow(
|
---|
1254 | IShellView * iface,
|
---|
1255 | IShellView *lpPrevView,
|
---|
1256 | LPCFOLDERSETTINGS lpfs,
|
---|
1257 | IShellBrowser * psb,
|
---|
1258 | RECT * prcView,
|
---|
1259 | HWND *phWnd)
|
---|
1260 | {
|
---|
1261 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1262 |
|
---|
1263 | WNDCLASSA wc;
|
---|
1264 | *phWnd = 0;
|
---|
1265 |
|
---|
1266 |
|
---|
1267 | TRACE("(%p)->(shlview=%p set=%p shlbrs=%p rec=%p hwnd=%p) incomplete\n",This, lpPrevView,lpfs, psb, prcView, phWnd);
|
---|
1268 | TRACE("-- vmode=%x flags=%x left=%i top=%i right=%i bottom=%i\n",lpfs->ViewMode, lpfs->fFlags ,prcView->left,prcView->top, prcView->right, prcView->bottom);
|
---|
1269 |
|
---|
1270 | /*set up the member variables*/
|
---|
1271 | This->pShellBrowser = psb;
|
---|
1272 | This->FolderSettings = *lpfs;
|
---|
1273 |
|
---|
1274 | /*get our parent window*/
|
---|
1275 | IShellBrowser_AddRef(This->pShellBrowser);
|
---|
1276 | IShellBrowser_GetWindow(This->pShellBrowser, &(This->hWndParent));
|
---|
1277 |
|
---|
1278 | /* try to get the ICommDlgBrowserInterface, adds a reference !!! */
|
---|
1279 | This->pCommDlgBrowser=NULL;
|
---|
1280 | if ( SUCCEEDED (IShellBrowser_QueryInterface( This->pShellBrowser,
|
---|
1281 | (REFIID)&IID_ICommDlgBrowser, (LPVOID*) &This->pCommDlgBrowser)))
|
---|
1282 | {
|
---|
1283 | TRACE("-- CommDlgBrowser\n");
|
---|
1284 | }
|
---|
1285 |
|
---|
1286 | /*if our window class has not been registered, then do so*/
|
---|
1287 | //SvL: Don't check this now
|
---|
1288 | // if(!GetClassInfoA(shell32_hInstance, SV_CLASS_NAME, &wc))
|
---|
1289 | // {
|
---|
1290 | ZeroMemory(&wc, sizeof(wc));
|
---|
1291 | wc.style = CS_HREDRAW | CS_VREDRAW;
|
---|
1292 | wc.lpfnWndProc = (WNDPROC) ShellView_WndProc;
|
---|
1293 | wc.cbClsExtra = 0;
|
---|
1294 | wc.cbWndExtra = 0;
|
---|
1295 | wc.hInstance = shell32_hInstance;
|
---|
1296 | wc.hIcon = 0;
|
---|
1297 | wc.hCursor = LoadCursorA (0, IDC_ARROWA);
|
---|
1298 | wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
|
---|
1299 | wc.lpszMenuName = NULL;
|
---|
1300 | wc.lpszClassName = SV_CLASS_NAME;
|
---|
1301 |
|
---|
1302 | if(!RegisterClassA(&wc))
|
---|
1303 | return E_FAIL;
|
---|
1304 | // }
|
---|
1305 |
|
---|
1306 | *phWnd = CreateWindowExA(0,
|
---|
1307 | SV_CLASS_NAME,
|
---|
1308 | NULL,
|
---|
1309 | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_TABSTOP,
|
---|
1310 | prcView->left,
|
---|
1311 | prcView->top,
|
---|
1312 | prcView->right - prcView->left,
|
---|
1313 | prcView->bottom - prcView->top,
|
---|
1314 | This->hWndParent,
|
---|
1315 | 0,
|
---|
1316 | shell32_hInstance,
|
---|
1317 | (LPVOID)This);
|
---|
1318 |
|
---|
1319 | CheckToolbar(This);
|
---|
1320 |
|
---|
1321 | if(!*phWnd)
|
---|
1322 | return E_FAIL;
|
---|
1323 |
|
---|
1324 | return S_OK;
|
---|
1325 | }
|
---|
1326 |
|
---|
1327 | static HRESULT WINAPI IShellView_fnDestroyViewWindow(IShellView * iface)
|
---|
1328 | {
|
---|
1329 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1330 |
|
---|
1331 | TRACE("(%p)\n",This);
|
---|
1332 |
|
---|
1333 | /*Make absolutely sure all our UI is cleaned up.*/
|
---|
1334 | IShellView_UIActivate((IShellView*)This, SVUIA_DEACTIVATE);
|
---|
1335 |
|
---|
1336 | if(This->hMenu)
|
---|
1337 | {
|
---|
1338 | DestroyMenu(This->hMenu);
|
---|
1339 | }
|
---|
1340 |
|
---|
1341 | DestroyWindow(This->hWnd);
|
---|
1342 | IShellBrowser_Release(This->pShellBrowser);
|
---|
1343 |
|
---|
1344 | return S_OK;
|
---|
1345 | }
|
---|
1346 |
|
---|
1347 | static HRESULT WINAPI IShellView_fnGetCurrentInfo(IShellView * iface, LPFOLDERSETTINGS lpfs)
|
---|
1348 | {
|
---|
1349 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1350 |
|
---|
1351 | TRACE("(%p)->(%p) vmode=%x flags=%x\n",This, lpfs,
|
---|
1352 | This->FolderSettings.ViewMode, This->FolderSettings.fFlags);
|
---|
1353 |
|
---|
1354 | if (!lpfs) return E_INVALIDARG;
|
---|
1355 |
|
---|
1356 | *lpfs = This->FolderSettings;
|
---|
1357 | return NOERROR;
|
---|
1358 | }
|
---|
1359 |
|
---|
1360 | static HRESULT WINAPI IShellView_fnAddPropertySheetPages(IShellView * iface, DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam)
|
---|
1361 | {
|
---|
1362 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1363 |
|
---|
1364 | FIXME("(%p) stub\n",This);
|
---|
1365 |
|
---|
1366 | return E_NOTIMPL;
|
---|
1367 | }
|
---|
1368 |
|
---|
1369 | static HRESULT WINAPI IShellView_fnSaveViewState(IShellView * iface)
|
---|
1370 | {
|
---|
1371 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1372 |
|
---|
1373 | FIXME("(%p) stub\n",This);
|
---|
1374 |
|
---|
1375 | return S_OK;
|
---|
1376 | }
|
---|
1377 |
|
---|
1378 | static HRESULT WINAPI IShellView_fnSelectItem(IShellView * iface, LPCITEMIDLIST pidlItem, UINT uFlags)
|
---|
1379 | { ICOM_THIS(IShellViewImpl, iface);
|
---|
1380 |
|
---|
1381 | FIXME("(%p)->(pidl=%p, 0x%08x) stub\n",This, pidlItem, uFlags);
|
---|
1382 |
|
---|
1383 | return E_NOTIMPL;
|
---|
1384 | }
|
---|
1385 |
|
---|
1386 | static HRESULT WINAPI IShellView_fnGetItemObject(IShellView * iface, UINT uItem, REFIID riid, LPVOID *ppvOut)
|
---|
1387 | {
|
---|
1388 | ICOM_THIS(IShellViewImpl, iface);
|
---|
1389 |
|
---|
1390 | char xriid[50];
|
---|
1391 |
|
---|
1392 | WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
---|
1393 | TRACE("(%p)->(uItem=0x%08x,\n\tIID=%s, ppv=%p)\n",This, uItem, xriid, ppvOut);
|
---|
1394 |
|
---|
1395 | *ppvOut = NULL;
|
---|
1396 |
|
---|
1397 | switch(uItem)
|
---|
1398 | {
|
---|
1399 | case SVGIO_BACKGROUND:
|
---|
1400 | *ppvOut = ISvBgCm_Constructor();
|
---|
1401 | break;
|
---|
1402 |
|
---|
1403 | case SVGIO_SELECTION:
|
---|
1404 | ShellView_GetSelections(This);
|
---|
1405 | IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, This->apidl, riid, 0, ppvOut);
|
---|
1406 | break;
|
---|
1407 | }
|
---|
1408 | TRACE("-- (%p)->(interface=%p)\n",This, *ppvOut);
|
---|
1409 |
|
---|
1410 | if(!*ppvOut) return E_OUTOFMEMORY;
|
---|
1411 |
|
---|
1412 | return S_OK;
|
---|
1413 | }
|
---|
1414 |
|
---|
1415 | struct ICOM_VTABLE(IShellView) svvt =
|
---|
1416 | {
|
---|
1417 | ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
---|
1418 | IShellView_fnQueryInterface,
|
---|
1419 | IShellView_fnAddRef,
|
---|
1420 | IShellView_fnRelease,
|
---|
1421 | IShellView_fnGetWindow,
|
---|
1422 | IShellView_fnContextSensitiveHelp,
|
---|
1423 | IShellView_fnTranslateAccelerator,
|
---|
1424 | IShellView_fnEnableModeless,
|
---|
1425 | IShellView_fnUIActivate,
|
---|
1426 | IShellView_fnRefresh,
|
---|
1427 | IShellView_fnCreateViewWindow,
|
---|
1428 | IShellView_fnDestroyViewWindow,
|
---|
1429 | IShellView_fnGetCurrentInfo,
|
---|
1430 | IShellView_fnAddPropertySheetPages,
|
---|
1431 | IShellView_fnSaveViewState,
|
---|
1432 | IShellView_fnSelectItem,
|
---|
1433 | IShellView_fnGetItemObject
|
---|
1434 | };
|
---|
1435 |
|
---|
1436 |
|
---|
1437 | /**********************************************************
|
---|
1438 | * ISVOleCmdTarget_QueryInterface (IUnknown)
|
---|
1439 | */
|
---|
1440 | static HRESULT WINAPI ISVOleCmdTarget_QueryInterface(
|
---|
1441 | IOleCommandTarget * iface,
|
---|
1442 | REFIID iid,
|
---|
1443 | LPVOID* ppvObj)
|
---|
1444 | {
|
---|
1445 | _ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface);
|
---|
1446 |
|
---|
1447 | return IShellFolder_QueryInterface((IShellFolder*)This, iid, ppvObj);
|
---|
1448 | }
|
---|
1449 |
|
---|
1450 | /**********************************************************
|
---|
1451 | * ISVOleCmdTarget_AddRef (IUnknown)
|
---|
1452 | */
|
---|
1453 | static ULONG WINAPI ISVOleCmdTarget_AddRef(
|
---|
1454 | IOleCommandTarget * iface)
|
---|
1455 | {
|
---|
1456 | _ICOM_THIS_From_IOleCommandTarget(IShellFolder, iface);
|
---|
1457 |
|
---|
1458 | return IShellFolder_AddRef((IShellFolder*)This);
|
---|
1459 | }
|
---|
1460 |
|
---|
1461 | /**********************************************************
|
---|
1462 | * ISVOleCmdTarget_Release (IUnknown)
|
---|
1463 | */
|
---|
1464 | static ULONG WINAPI ISVOleCmdTarget_Release(
|
---|
1465 | IOleCommandTarget * iface)
|
---|
1466 | {
|
---|
1467 | _ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface);
|
---|
1468 |
|
---|
1469 | return IShellFolder_Release((IShellFolder*)This);
|
---|
1470 | }
|
---|
1471 |
|
---|
1472 | /**********************************************************
|
---|
1473 | * ISVOleCmdTarget_QueryStatus (IOleCommandTarget)
|
---|
1474 | */
|
---|
1475 | static HRESULT WINAPI ISVOleCmdTarget_QueryStatus(
|
---|
1476 | IOleCommandTarget *iface,
|
---|
1477 | const GUID* pguidCmdGroup,
|
---|
1478 | ULONG cCmds,
|
---|
1479 | OLECMD * prgCmds,
|
---|
1480 | OLECMDTEXT* pCmdText)
|
---|
1481 | {
|
---|
1482 | char xguid[50];
|
---|
1483 |
|
---|
1484 | _ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface);
|
---|
1485 |
|
---|
1486 | WINE_StringFromCLSID((LPCLSID)pguidCmdGroup,xguid);
|
---|
1487 |
|
---|
1488 | FIXME("(%p)->(%p(%s) 0x%08lx %p %p\n", This, pguidCmdGroup, xguid, cCmds, prgCmds, pCmdText);
|
---|
1489 | return E_NOTIMPL;
|
---|
1490 | }
|
---|
1491 |
|
---|
1492 | /**********************************************************
|
---|
1493 | * ISVOleCmdTarget_Exec (IOleCommandTarget)
|
---|
1494 | *
|
---|
1495 | * nCmdID is the OLECMDID_* enumeration
|
---|
1496 | */
|
---|
1497 | static HRESULT WINAPI ISVOleCmdTarget_Exec(
|
---|
1498 | IOleCommandTarget *iface,
|
---|
1499 | const GUID* pguidCmdGroup,
|
---|
1500 | DWORD nCmdID,
|
---|
1501 | DWORD nCmdexecopt,
|
---|
1502 | VARIANT* pvaIn,
|
---|
1503 | VARIANT* pvaOut)
|
---|
1504 | {
|
---|
1505 | char xguid[50];
|
---|
1506 |
|
---|
1507 | _ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface);
|
---|
1508 |
|
---|
1509 | WINE_StringFromCLSID((LPCLSID)pguidCmdGroup,xguid);
|
---|
1510 |
|
---|
1511 | FIXME("(%p)->(\n\tTarget GUID:%s Command:0x%08lx Opt:0x%08lx %p %p)\n", This, xguid, nCmdID, nCmdexecopt, pvaIn, pvaOut);
|
---|
1512 | return E_NOTIMPL;
|
---|
1513 | }
|
---|
1514 |
|
---|
1515 | ICOM_VTABLE(IOleCommandTarget) ctvt =
|
---|
1516 | {
|
---|
1517 | ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
---|
1518 | ISVOleCmdTarget_QueryInterface,
|
---|
1519 | ISVOleCmdTarget_AddRef,
|
---|
1520 | ISVOleCmdTarget_Release,
|
---|
1521 | ISVOleCmdTarget_QueryStatus,
|
---|
1522 | ISVOleCmdTarget_Exec
|
---|
1523 | };
|
---|
1524 |
|
---|
1525 | /**********************************************************
|
---|
1526 | * ISVDropTarget implementation
|
---|
1527 | */
|
---|
1528 |
|
---|
1529 | static HRESULT WINAPI ISVDropTarget_QueryInterface(
|
---|
1530 | IDropTarget *iface,
|
---|
1531 | REFIID riid,
|
---|
1532 | LPVOID *ppvObj)
|
---|
1533 | {
|
---|
1534 | char xriid[50];
|
---|
1535 |
|
---|
1536 | _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface);
|
---|
1537 |
|
---|
1538 | WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
---|
1539 |
|
---|
1540 | TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,xriid,ppvObj);
|
---|
1541 |
|
---|
1542 | return IShellFolder_QueryInterface((IShellFolder*)This, riid, ppvObj);
|
---|
1543 | }
|
---|
1544 |
|
---|
1545 | static ULONG WINAPI ISVDropTarget_AddRef( IDropTarget *iface)
|
---|
1546 | {
|
---|
1547 | _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface);
|
---|
1548 |
|
---|
1549 | TRACE("(%p)->(count=%lu)\n",This,This->ref);
|
---|
1550 |
|
---|
1551 | return IShellFolder_AddRef((IShellFolder*)This);
|
---|
1552 | }
|
---|
1553 |
|
---|
1554 | static ULONG WINAPI ISVDropTarget_Release( IDropTarget *iface)
|
---|
1555 | {
|
---|
1556 | _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface);
|
---|
1557 |
|
---|
1558 | TRACE("(%p)->(count=%lu)\n",This,This->ref);
|
---|
1559 |
|
---|
1560 | return IShellFolder_Release((IShellFolder*)This);
|
---|
1561 | }
|
---|
1562 |
|
---|
1563 | static HRESULT WINAPI ISVDropTarget_DragEnter(
|
---|
1564 | IDropTarget *iface,
|
---|
1565 | IDataObject *pDataObject,
|
---|
1566 | DWORD grfKeyState,
|
---|
1567 | POINTL pt,
|
---|
1568 | DWORD *pdwEffect)
|
---|
1569 | {
|
---|
1570 |
|
---|
1571 | _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface);
|
---|
1572 |
|
---|
1573 | FIXME("Stub: This=%p, DataObject=%p\n",This,pDataObject);
|
---|
1574 |
|
---|
1575 | return E_NOTIMPL;
|
---|
1576 | }
|
---|
1577 |
|
---|
1578 | static HRESULT WINAPI ISVDropTarget_DragOver(
|
---|
1579 | IDropTarget *iface,
|
---|
1580 | DWORD grfKeyState,
|
---|
1581 | POINTL pt,
|
---|
1582 | DWORD *pdwEffect)
|
---|
1583 | {
|
---|
1584 | _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface);
|
---|
1585 |
|
---|
1586 | FIXME("Stub: This=%p\n",This);
|
---|
1587 |
|
---|
1588 | return E_NOTIMPL;
|
---|
1589 | }
|
---|
1590 |
|
---|
1591 | static HRESULT WINAPI ISVDropTarget_DragLeave(
|
---|
1592 | IDropTarget *iface)
|
---|
1593 | {
|
---|
1594 | _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface);
|
---|
1595 |
|
---|
1596 | FIXME("Stub: This=%p\n",This);
|
---|
1597 |
|
---|
1598 | return E_NOTIMPL;
|
---|
1599 | }
|
---|
1600 |
|
---|
1601 | static HRESULT WINAPI ISVDropTarget_Drop(
|
---|
1602 | IDropTarget *iface,
|
---|
1603 | IDataObject* pDataObject,
|
---|
1604 | DWORD grfKeyState,
|
---|
1605 | POINTL pt,
|
---|
1606 | DWORD *pdwEffect)
|
---|
1607 | {
|
---|
1608 | _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface);
|
---|
1609 |
|
---|
1610 | FIXME("Stub: This=%p\n",This);
|
---|
1611 |
|
---|
1612 | return E_NOTIMPL;
|
---|
1613 | }
|
---|
1614 |
|
---|
1615 | struct ICOM_VTABLE(IDropTarget) dtvt =
|
---|
1616 | {
|
---|
1617 | ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
---|
1618 | ISVDropTarget_QueryInterface,
|
---|
1619 | ISVDropTarget_AddRef,
|
---|
1620 | ISVDropTarget_Release,
|
---|
1621 | ISVDropTarget_DragEnter,
|
---|
1622 | ISVDropTarget_DragOver,
|
---|
1623 | ISVDropTarget_DragLeave,
|
---|
1624 | ISVDropTarget_Drop
|
---|
1625 | };
|
---|
1626 |
|
---|
1627 | /**********************************************************
|
---|
1628 | * ISVDropSource implementation
|
---|
1629 | */
|
---|
1630 |
|
---|
1631 | static HRESULT WINAPI ISVDropSource_QueryInterface(
|
---|
1632 | IDropSource *iface,
|
---|
1633 | REFIID riid,
|
---|
1634 | LPVOID *ppvObj)
|
---|
1635 | {
|
---|
1636 | char xriid[50];
|
---|
1637 |
|
---|
1638 | _ICOM_THIS_From_IDropSource(IShellViewImpl, iface);
|
---|
1639 |
|
---|
1640 | WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
---|
1641 |
|
---|
1642 | TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,xriid,ppvObj);
|
---|
1643 |
|
---|
1644 | return IShellFolder_QueryInterface((IShellFolder*)This, riid, ppvObj);
|
---|
1645 | }
|
---|
1646 |
|
---|
1647 | static ULONG WINAPI ISVDropSource_AddRef( IDropSource *iface)
|
---|
1648 | {
|
---|
1649 | _ICOM_THIS_From_IDropSource(IShellViewImpl, iface);
|
---|
1650 |
|
---|
1651 | TRACE("(%p)->(count=%lu)\n",This,This->ref);
|
---|
1652 |
|
---|
1653 | return IShellFolder_AddRef((IShellFolder*)This);
|
---|
1654 | }
|
---|
1655 |
|
---|
1656 | static ULONG WINAPI ISVDropSource_Release( IDropSource *iface)
|
---|
1657 | {
|
---|
1658 | _ICOM_THIS_From_IDropSource(IShellViewImpl, iface);
|
---|
1659 |
|
---|
1660 | TRACE("(%p)->(count=%lu)\n",This,This->ref);
|
---|
1661 |
|
---|
1662 | return IShellFolder_Release((IShellFolder*)This);
|
---|
1663 | }
|
---|
1664 | static HRESULT WINAPI ISVDropSource_QueryContinueDrag(
|
---|
1665 | IDropSource *iface,
|
---|
1666 | BOOL fEscapePressed,
|
---|
1667 | DWORD grfKeyState)
|
---|
1668 | {
|
---|
1669 | _ICOM_THIS_From_IDropSource(IShellViewImpl, iface);
|
---|
1670 | TRACE("(%p)\n",This);
|
---|
1671 |
|
---|
1672 | if (fEscapePressed)
|
---|
1673 | return DRAGDROP_S_CANCEL;
|
---|
1674 | else if (!(grfKeyState & MK_LBUTTON) && !(grfKeyState & MK_RBUTTON))
|
---|
1675 | return DRAGDROP_S_DROP;
|
---|
1676 | else
|
---|
1677 | return NOERROR;
|
---|
1678 | }
|
---|
1679 |
|
---|
1680 | static HRESULT WINAPI ISVDropSource_GiveFeedback(
|
---|
1681 | IDropSource *iface,
|
---|
1682 | DWORD dwEffect)
|
---|
1683 | {
|
---|
1684 | _ICOM_THIS_From_IDropSource(IShellViewImpl, iface);
|
---|
1685 | TRACE("(%p)\n",This);
|
---|
1686 |
|
---|
1687 | return DRAGDROP_S_USEDEFAULTCURSORS;
|
---|
1688 | }
|
---|
1689 |
|
---|
1690 | struct ICOM_VTABLE(IDropSource) dsvt =
|
---|
1691 | {
|
---|
1692 | ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
---|
1693 | ISVDropSource_QueryInterface,
|
---|
1694 | ISVDropSource_AddRef,
|
---|
1695 | ISVDropSource_Release,
|
---|
1696 | ISVDropSource_QueryContinueDrag,
|
---|
1697 | ISVDropSource_GiveFeedback
|
---|
1698 | };
|
---|
1699 | /**********************************************************
|
---|
1700 | * ISVViewObject implementation
|
---|
1701 | */
|
---|
1702 |
|
---|
1703 | static HRESULT WINAPI ISVViewObject_QueryInterface(
|
---|
1704 | IViewObject *iface,
|
---|
1705 | REFIID riid,
|
---|
1706 | LPVOID *ppvObj)
|
---|
1707 | {
|
---|
1708 | char xriid[50];
|
---|
1709 |
|
---|
1710 | _ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
|
---|
1711 |
|
---|
1712 | WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
---|
1713 |
|
---|
1714 | TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,xriid,ppvObj);
|
---|
1715 |
|
---|
1716 | return IShellFolder_QueryInterface((IShellFolder*)This, riid, ppvObj);
|
---|
1717 | }
|
---|
1718 |
|
---|
1719 | static ULONG WINAPI ISVViewObject_AddRef( IViewObject *iface)
|
---|
1720 | {
|
---|
1721 | _ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
|
---|
1722 |
|
---|
1723 | TRACE("(%p)->(count=%lu)\n",This,This->ref);
|
---|
1724 |
|
---|
1725 | return IShellFolder_AddRef((IShellFolder*)This);
|
---|
1726 | }
|
---|
1727 |
|
---|
1728 | static ULONG WINAPI ISVViewObject_Release( IViewObject *iface)
|
---|
1729 | {
|
---|
1730 | _ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
|
---|
1731 |
|
---|
1732 | TRACE("(%p)->(count=%lu)\n",This,This->ref);
|
---|
1733 |
|
---|
1734 | return IShellFolder_Release((IShellFolder*)This);
|
---|
1735 | }
|
---|
1736 |
|
---|
1737 | static HRESULT WINAPI ISVViewObject_Draw(
|
---|
1738 | IViewObject *iface,
|
---|
1739 | DWORD dwDrawAspect,
|
---|
1740 | LONG lindex,
|
---|
1741 | void* pvAspect,
|
---|
1742 | DVTARGETDEVICE* ptd,
|
---|
1743 | HDC hdcTargetDev,
|
---|
1744 | HDC hdcDraw,
|
---|
1745 | LPCRECTL lprcBounds,
|
---|
1746 | LPCRECTL lprcWBounds,
|
---|
1747 | IVO_ContCallback pfnContinue,
|
---|
1748 | DWORD dwContinue)
|
---|
1749 | {
|
---|
1750 |
|
---|
1751 | _ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
|
---|
1752 |
|
---|
1753 | FIXME("Stub: This=%p\n",This);
|
---|
1754 |
|
---|
1755 | return E_NOTIMPL;
|
---|
1756 | }
|
---|
1757 | static HRESULT WINAPI ISVViewObject_GetColorSet(
|
---|
1758 | IViewObject *iface,
|
---|
1759 | DWORD dwDrawAspect,
|
---|
1760 | LONG lindex,
|
---|
1761 | void *pvAspect,
|
---|
1762 | DVTARGETDEVICE* ptd,
|
---|
1763 | HDC hicTargetDevice,
|
---|
1764 | tagLOGPALETTE** ppColorSet)
|
---|
1765 | {
|
---|
1766 |
|
---|
1767 | _ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
|
---|
1768 |
|
---|
1769 | FIXME("Stub: This=%p\n",This);
|
---|
1770 |
|
---|
1771 | return E_NOTIMPL;
|
---|
1772 | }
|
---|
1773 | static HRESULT WINAPI ISVViewObject_Freeze(
|
---|
1774 | IViewObject *iface,
|
---|
1775 | DWORD dwDrawAspect,
|
---|
1776 | LONG lindex,
|
---|
1777 | void* pvAspect,
|
---|
1778 | DWORD* pdwFreeze)
|
---|
1779 | {
|
---|
1780 |
|
---|
1781 | _ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
|
---|
1782 |
|
---|
1783 | FIXME("Stub: This=%p\n",This);
|
---|
1784 |
|
---|
1785 | return E_NOTIMPL;
|
---|
1786 | }
|
---|
1787 | static HRESULT WINAPI ISVViewObject_Unfreeze(
|
---|
1788 | IViewObject *iface,
|
---|
1789 | DWORD dwFreeze)
|
---|
1790 | {
|
---|
1791 |
|
---|
1792 | _ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
|
---|
1793 |
|
---|
1794 | FIXME("Stub: This=%p\n",This);
|
---|
1795 |
|
---|
1796 | return E_NOTIMPL;
|
---|
1797 | }
|
---|
1798 | static HRESULT WINAPI ISVViewObject_SetAdvise(
|
---|
1799 | IViewObject *iface,
|
---|
1800 | DWORD aspects,
|
---|
1801 | DWORD advf,
|
---|
1802 | IAdviseSink* pAdvSink)
|
---|
1803 | {
|
---|
1804 |
|
---|
1805 | _ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
|
---|
1806 |
|
---|
1807 | FIXME("Stub: This=%p\n",This);
|
---|
1808 |
|
---|
1809 | return E_NOTIMPL;
|
---|
1810 | }
|
---|
1811 | static HRESULT WINAPI ISVViewObject_GetAdvise(
|
---|
1812 | IViewObject *iface,
|
---|
1813 | DWORD* pAspects,
|
---|
1814 | DWORD* pAdvf,
|
---|
1815 | IAdviseSink** ppAdvSink)
|
---|
1816 | {
|
---|
1817 |
|
---|
1818 | _ICOM_THIS_From_IViewObject(IShellViewImpl, iface);
|
---|
1819 |
|
---|
1820 | FIXME("Stub: This=%p\n",This);
|
---|
1821 |
|
---|
1822 | return E_NOTIMPL;
|
---|
1823 | }
|
---|
1824 |
|
---|
1825 |
|
---|
1826 | struct ICOM_VTABLE(IViewObject) vovt =
|
---|
1827 | {
|
---|
1828 | ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
---|
1829 | ISVViewObject_QueryInterface,
|
---|
1830 | ISVViewObject_AddRef,
|
---|
1831 | ISVViewObject_Release,
|
---|
1832 | ISVViewObject_Draw,
|
---|
1833 | ISVViewObject_GetColorSet,
|
---|
1834 | ISVViewObject_Freeze,
|
---|
1835 | ISVViewObject_Unfreeze,
|
---|
1836 | ISVViewObject_SetAdvise,
|
---|
1837 | ISVViewObject_GetAdvise
|
---|
1838 | };
|
---|
1839 |
|
---|