ReactOS 0.4.16-dev-852-gcfcc8d8
tbsite.cpp
Go to the documentation of this file.
1/*
2 * ReactOS Explorer
3 *
4 * Copyright 2006 - 2007 Thomas Weidenmueller <w3seek@reactos.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include "precomp.h"
22
23#include <shdeprecated.h>
24
25/*****************************************************************************
26 ** ITrayBandSite ************************************************************
27 *****************************************************************************/
28
29// WARNING: Can't use ATL for this class due to our ATL not fully supporting the AGGREGATION functions needed for this class to be an "outer" class
30// it works just fine this way.
32 public ITrayBandSite,
33 public IBandSite,
34 public IBandSiteStreamCallback
35 /* TODO: IWinEventHandler */
36{
37 volatile LONG m_RefCount;
38
40
46
48
49 union
50 {
52 struct
53 {
55 };
56 };
57
58public:
60 AddRef() override
61 {
63 }
64
66 Release() override
67 {
69
70 if (Ret == 0)
71 delete this;
72
73 return Ret;
74 }
75
78 {
79 if (ppvObj == NULL)
80 return E_POINTER;
81
82 if (IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IBandSiteHelper))
83 {
84 // return IBandSiteStreamCallback's IUnknown
85 *ppvObj = static_cast<IBandSiteStreamCallback*>(this);
86 }
87 else if (IsEqualIID(riid, IID_IBandSite))
88 {
89 *ppvObj = static_cast<IBandSite*>(this);
90 }
91 else if (IsEqualIID(riid, IID_IWinEventHandler))
92 {
93 TRACE("ITaskBandSite: IWinEventHandler queried!\n");
94 *ppvObj = NULL;
95 return E_NOINTERFACE;
96 }
97 else if (m_Inner != NULL)
98 {
99 return m_Inner->QueryInterface(riid, ppvObj);
100 }
101 else
102 {
103 *ppvObj = NULL;
104 return E_NOINTERFACE;
105 }
106
107 AddRef();
108 return S_OK;
109 }
110
111public:
113 m_RefCount(0),
115 {
116 }
117
118 virtual ~CTrayBandSite() { }
119
122 IN OUT IStream *pStm,
123 IN REFIID riid,
124 OUT PVOID *pvObj) override
125 {
126 LARGE_INTEGER liPosZero;
127 ULARGE_INTEGER liCurrent;
128 CLSID clsid;
129 ULONG ulRead;
130 HRESULT hRet;
131
132 /* NOTE: Callback routine called by the shell while loading the task band
133 stream. We use it to intercept the default behavior when the task
134 band is loaded from the stream.
135
136 NOTE: riid always points to IID_IUnknown! This is because the shell hasn't
137 read anything from the stream and therefore doesn't know what CLSID
138 it's dealing with. We'll have to find it out ourselves by reading
139 the GUID from the stream. */
140
141 /* Read the current position of the stream, we'll have to reset it everytime
142 we read a CLSID that's not the task band... */
143 ZeroMemory(&liPosZero, sizeof(liPosZero));
144 hRet = pStm->Seek(liPosZero, STREAM_SEEK_CUR, &liCurrent);
145
146 if (SUCCEEDED(hRet))
147 {
148 /* Now let's read the CLSID from the stream and see if it's our task band */
149 hRet = pStm->Read(&clsid, (ULONG)sizeof(clsid), &ulRead);
150
151 if (SUCCEEDED(hRet) && ulRead == sizeof(clsid))
152 {
154 {
156 /* We're trying to load the task band! Let's create it... */
157
158 hRet = m_TaskBand->QueryInterface(
159 riid,
160 pvObj);
161 if (SUCCEEDED(hRet))
162 {
163 /* Load the stream */
164 TRACE("IBandSiteStreamCallback::OnLoad intercepted the task band CLSID!\n");
165 }
166
167 return hRet;
168 }
169 }
170 }
171
172 /* Reset the position and let the shell do all the work for us */
173 hRet = pStm->Seek(
174 *(LARGE_INTEGER*) &liCurrent,
175 STREAM_SEEK_SET,
176 NULL);
177 if (SUCCEEDED(hRet))
178 {
179 /* Let the shell handle everything else for us :) */
180 hRet = OleLoadFromStream(pStm,
181 riid,
182 pvObj);
183 }
184
185 if (!SUCCEEDED(hRet))
186 {
187 TRACE("IBandSiteStreamCallback::OnLoad(0x%p, 0x%p, 0x%p) returns 0x%x\n", pStm, riid, pvObj, hRet);
188 }
189
190 return hRet;
191 }
192
196 IN OUT IStream *pStm) override
197 {
198 /* NOTE: Callback routine called by the shell while saving the task band
199 stream. We use it to intercept the default behavior when the task
200 band is saved to the stream */
201 /* FIXME: Implement */
202 TRACE("IBandSiteStreamCallback::OnSave(0x%p, 0x%p) returns E_NOTIMPL\n", pUnk, pStm);
203 return E_NOTIMPL;
204 }
205
207 IsTaskBand(IN IUnknown *punk) override
208 {
209 return IsSameObject(m_BandSite, punk);
210 }
211
214 IN HWND hWnd,
215 IN UINT uMsg,
218 OUT LRESULT *plResult) override
219 {
220 HRESULT hRet;
221
222 ASSERT(m_Rebar != NULL);
223
224 /* Custom task band behavior */
225 switch (uMsg)
226 {
227 case WM_NOTIFY:
228 {
229 const NMHDR *nmh = (const NMHDR *) lParam;
230
231 if (nmh->hwndFrom == m_Rebar)
232 {
233 switch (nmh->code)
234 {
235 case NM_NCHITTEST:
236 {
237 LPNMMOUSE nmm = (LPNMMOUSE) lParam;
238
239 if (nmm->dwHitInfo == RBHT_CLIENT || nmm->dwHitInfo == RBHT_NOWHERE ||
240 nmm->dwItemSpec == (DWORD_PTR) -1)
241 {
242 /* Make the rebar control appear transparent so the user
243 can drag the tray window */
244 *plResult = HTTRANSPARENT;
245 }
246 return S_OK;
247 }
248
249 case RBN_MINMAX:
250 /* Deny if an Administrator disabled this "feature" */
251 *plResult = (SHRestricted(REST_NOMOVINGBAND) != 0);
252 return S_OK;
253 }
254 }
255
256 //TRACE("ITrayBandSite::ProcessMessage: WM_NOTIFY for 0x%p, From: 0x%p, Code: NM_FIRST-%u...\n", hWnd, nmh->hwndFrom, NM_FIRST - nmh->code);
257 break;
258 }
259 }
260
261 /* Forward to the shell's IWinEventHandler interface to get the default shell behavior! */
263 return E_FAIL;
264
265 /*TRACE("Calling IWinEventHandler::ProcessMessage(0x%p, 0x%x, 0x%p, 0x%p, 0x%p) hWndRebar=0x%p\n", hWnd, uMsg, wParam, lParam, plResult, hWndRebar);*/
266 hRet = m_WindowEventHandler->OnWinEvent(hWnd, uMsg, wParam, lParam, plResult);
267
268#if 0
269 if (FAILED(hRet))
270 {
271 if (uMsg == WM_NOTIFY)
272 {
273 const NMHDR *nmh = (const NMHDR *) lParam;
274 ERR("ITrayBandSite->IWinEventHandler::ProcessMessage: WM_NOTIFY for 0x%p, From: 0x%p, Code: NM_FIRST-%u returned 0x%x\n", hWnd, nmh->hwndFrom, NM_FIRST - nmh->code, hRet);
275 }
276 else
277 {
278 ERR("ITrayBandSite->IWinEventHandler::ProcessMessage(0x%p,0x%x,0x%p,0x%p,0x%p->0x%p) returned: 0x%x\n", hWnd, uMsg, wParam, lParam, plResult, *plResult, hRet);
279 }
280 }
281#endif
282
283 return hRet;
284 }
285
288 IN HMENU hmenu,
289 IN UINT indexMenu,
290 IN UINT idCmdFirst,
291 IN UINT idCmdLast,
292 IN UINT uFlags,
293 OUT IContextMenu **ppcm) override
294 {
295 HRESULT hRet;
296
297 if (m_ContextMenu == NULL)
298 {
299 /* Cache the context menu so we don't need to CoCreateInstance all the time... */
301 if (FAILED_UNEXPECTEDLY(hRet))
302 return hRet;
303
305 if (FAILED_UNEXPECTEDLY(hRet))
306 return hRet;
307 }
308
309 if (ppcm != NULL)
310 {
311 *ppcm = m_ContextMenu;
312 (*ppcm)->AddRef();
313 }
314
315 /* Add the menu items */
316 hRet = m_ContextMenu->QueryContextMenu(hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
317 if (FAILED_UNEXPECTEDLY(hRet))
318 return hRet;
319
320 return S_OK;
321 }
322
324 Lock(IN BOOL bLock) override
325 {
326 BOOL bPrevLocked = Locked;
327 BANDSITEINFO bsi;
328 HRESULT hRet;
329
331
332 if (bPrevLocked != bLock)
333 {
334 Locked = bLock;
335
336 bsi.dwMask = BSIM_STYLE;
337 bsi.dwStyle = (Locked ? BSIS_LOCKED | BSIS_NOGRIPPER : BSIS_AUTOGRIPPER);
338
339 hRet = m_BandSite->SetBandSiteInfo(&bsi);
340 if (SUCCEEDED(hRet))
341 {
342 hRet = Update();
343 }
344
345 return hRet;
346 }
347
348 return S_FALSE;
349 }
350
351 /*******************************************************************/
352
354 AddBand(IN IUnknown *punk) override
355 {
356 /* Send the DBID_DELAYINIT command to initialize the band to be added */
357 /* FIXME: Should be delayed */
358 IUnknown_Exec(punk, IID_IDeskBand, DBID_DELAYINIT, 0, NULL, NULL);
359
360 HRESULT hr = m_BandSite->AddBand(punk);
362 return hr;
363
364 VARIANT vThemeName;
365 V_VT(&vThemeName) = VT_BSTR;
366 V_BSTR(&vThemeName) = SysAllocString(L"TaskBar");
367 IUnknown_Exec(punk,
368 IID_IDeskBand,
370 0,
371 &vThemeName,
372 NULL);
373
374 SysFreeString(V_BSTR(&vThemeName));
375
376 return S_OK;
377 }
378
381 IN UINT uBand,
382 OUT DWORD *pdwBandID) override
383 {
384 return m_BandSite->EnumBands(uBand, pdwBandID);
385 }
386
389 IN DWORD dwBandID,
390 OUT IDeskBand **ppstb,
391 OUT DWORD *pdwState,
392 OUT LPWSTR pszName,
393 IN int cchName) override
394 {
395 HRESULT hRet;
396 IDeskBand *pstb = NULL;
397
398 hRet = m_BandSite->QueryBand(
399 dwBandID,
400 &pstb,
401 pdwState,
402 pszName,
403 cchName);
404
405 if (SUCCEEDED(hRet))
406 {
407 hRet = IsSameObject(pstb, m_TaskBand);
408 if (hRet == S_OK)
409 {
410 /* Add the BSSF_UNDELETEABLE flag to pdwState because the task bar band shouldn't be deletable */
411 if (pdwState != NULL)
412 *pdwState |= BSSF_UNDELETEABLE;
413 }
414 else if (!SUCCEEDED(hRet))
415 {
416 pstb->Release();
417 pstb = NULL;
418 }
419
420 if (ppstb != NULL)
421 *ppstb = pstb;
422 }
423 else if (ppstb != NULL)
424 *ppstb = NULL;
425
426 return hRet;
427 }
428
431 IN DWORD dwBandID,
432 IN DWORD dwMask,
433 IN DWORD dwState) override
434 {
435 return m_BandSite->SetBandState(dwBandID, dwMask, dwState);
436 }
437
439 RemoveBand(IN DWORD dwBandID) override
440 {
441 return m_BandSite->RemoveBand(dwBandID);
442 }
443
446 IN DWORD dwBandID,
447 IN REFIID riid,
448 OUT VOID **ppv) override
449 {
450 return m_BandSite->GetBandObject(dwBandID, riid, ppv);
451 }
452
454 SetBandSiteInfo(IN const BANDSITEINFO *pbsinfo) override
455 {
456 return m_BandSite->SetBandSiteInfo(pbsinfo);
457 }
458
461 {
462 return m_BandSite->GetBandSiteInfo(pbsinfo);
463 }
464
466 {
467 CComPtr<IPersist> pBand;
468 CLSID BandCLSID;
469 DWORD dwBandID;
470 UINT uBand = 0;
471
472 /* Enumerate all bands */
473 while (SUCCEEDED(m_BandSite->EnumBands(uBand, &dwBandID)))
474 {
475 if (dwBandID && SUCCEEDED(m_BandSite->GetBandObject(dwBandID, IID_PPV_ARG(IPersist, &pBand))))
476 {
477 if (SUCCEEDED(pBand->GetClassID(&BandCLSID)))
478 {
479 if (IsEqualGUID(BandCLSID, CLSID_ITaskBand))
480 {
481 return TRUE;
482 }
483 }
484 }
485 uBand++;
486 }
487
488 return FALSE;
489 }
490
491 virtual HRESULT Update()
492 {
493 return IUnknown_Exec(m_Inner,
494 IID_IDeskBand,
496 0,
497 NULL,
498 NULL);
499 }
500
501 virtual VOID BroadcastOleCommandExec(REFGUID pguidCmdGroup,
502 DWORD nCmdID,
503 DWORD nCmdExecOpt,
504 VARIANTARG *pvaIn,
505 VARIANTARG *pvaOut)
506 {
507 IOleCommandTarget *pOct;
508 DWORD dwBandID;
509 UINT uBand = 0;
510
511 /* Enumerate all bands */
512 while (SUCCEEDED(m_BandSite->EnumBands(uBand, &dwBandID)))
513 {
514 if (SUCCEEDED(m_BandSite->GetBandObject(dwBandID, IID_PPV_ARG(IOleCommandTarget, &pOct))))
515 {
516 /* Execute the command */
517 pOct->Exec(
518 &pguidCmdGroup,
519 nCmdID,
520 nCmdExecOpt,
521 pvaIn,
522 pvaOut);
523
524 pOct->Release();
525 }
526
527 uBand++;
528 }
529 }
530
532 {
533 /* Broadcast the DBID_FINISHINIT command */
535
536 return S_OK;
537 }
538
539 virtual HRESULT Show(IN BOOL bShow)
540 {
542 HRESULT hRet;
543
544 hRet = m_BandSite->QueryInterface(IID_PPV_ARG(IDeskBarClient, &pDbc));
545 if (SUCCEEDED(hRet))
546 {
547 hRet = pDbc->UIActivateDBC(bShow ? DBC_SHOW : DBC_HIDE);
548 }
549
550 return hRet;
551 }
552
554 {
556 HRESULT hRet;
557
559
560 /* We implement the undocumented COM interface IBandSiteStreamCallback
561 that the shell will query so that we can intercept and custom-load
562 the task band when it finds the task band's CLSID (which is internal).
563 This way we can prevent the shell from attempting to CoCreateInstance
564 the (internal) task band, resulting in a failure... */
565 hRet = m_BandSite->QueryInterface(IID_PPV_ARG(IPersistStream, &pPStm));
566 if (SUCCEEDED(hRet))
567 {
568 hRet = pPStm->Load(pStm);
569 TRACE("->Load() returned 0x%x\n", hRet);
570 }
571
572 return hRet;
573 }
574
576 {
577 HKEY hkStreams;
579
581 L"Streams",
582 &hkStreams) == ERROR_SUCCESS)
583 {
584 Stream = SHOpenRegStreamW(hkStreams,
585 L"Desktop",
586 L"TaskbarWinXP",
587 grfMode);
588
589 RegCloseKey(hkStreams);
590 }
591
592 return Stream;
593 }
594
596 {
597 HKEY hkStreams;
599
601 L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Streams",
602 &hkStreams) == ERROR_SUCCESS)
603 {
604 Stream = SHOpenRegStreamW(hkStreams,
605 L"Desktop",
606 L"Default Taskbar",
607 grfMode);
608
609 RegCloseKey(hkStreams);
610 }
611
612 return Stream;
613 }
614
615 virtual HRESULT Load()
616 {
617 IStream *pStm;
618 HRESULT hRet;
619
620 /* Try to load the user's settings */
622 if (pStm != NULL)
623 {
624 hRet = LoadFromStream(pStm);
625
626 TRACE("Loaded user bands settings: 0x%x\n", hRet);
627 pStm->Release();
628 }
629 else
630 hRet = E_FAIL;
631
632 /* If the user's settings couldn't be loaded, try with
633 default settings (ie. when the user logs in for the
634 first time! */
635 if (!SUCCEEDED(hRet))
636 {
638 if (pStm != NULL)
639 {
640 hRet = LoadFromStream(pStm);
641
642 TRACE("Loaded default user bands settings: 0x%x\n", hRet);
643 pStm->Release();
644 }
645 else
646 hRet = E_FAIL;
647 }
648
649 return hRet;
650 }
651
652 HRESULT _Init(IN ITrayWindow *tray, IN IDeskBand* pTaskBand)
653 {
657 HRESULT hRet;
658
659 m_Tray = tray;
660 m_TaskBand = pTaskBand;
661
662 /* Create the RebarBandSite */
663 hRet = _CBandSite_CreateInstance(static_cast<IBandSite*>(this), IID_PPV_ARG(IUnknown, &m_Inner));
664 if (FAILED_UNEXPECTEDLY(hRet))
665 return hRet;
666
667 hRet = m_Inner->QueryInterface(IID_PPV_ARG(IBandSite, &m_BandSite));
668 if (FAILED_UNEXPECTEDLY(hRet))
669 return hRet;
670
671 hRet = m_Inner->QueryInterface(IID_PPV_ARG(IWinEventHandler, &m_WindowEventHandler));
672 if (FAILED_UNEXPECTEDLY(hRet))
673 return hRet;
674
675 hRet = m_Inner->QueryInterface(IID_PPV_ARG(IDeskBarClient, &pDbc));
676 if (FAILED_UNEXPECTEDLY(hRet))
677 return hRet;
678
679
680
681
682 /* Crete the rebar in the tray */
683 hRet = pDbc->SetDeskBarSite(tray);
684 if (FAILED_UNEXPECTEDLY(hRet))
685 return hRet;
686
687 hRet = pDbc->GetWindow(&m_Rebar);
688 if (FAILED_UNEXPECTEDLY(hRet))
689 return hRet;
690
692
693 /* Set the Desk Bar mode to the current one */
694 DWORD dwMode = 0;
695 /* FIXME: We need to set the mode (and update) whenever the user docks
696 the tray window to another monitor edge! */
697 if (!m_Tray->IsHorizontal())
698 dwMode = DBIF_VIEWMODE_VERTICAL;
699
700 hRet = pDbc->SetModeDBC(dwMode);
701
702 /* Load the saved state of the task band site */
703 /* FIXME: We should delay loading shell extensions, also see DBID_DELAYINIT */
704 Load();
705
706 /* Add the task bar band if it hasn't been added while loading */
707 if (!HasTaskBand())
708 {
709 hRet = m_BandSite->AddBand(m_TaskBand);
710 if (FAILED_UNEXPECTEDLY(hRet))
711 return hRet;
712 }
713
714 /* Should we send this after showing it? */
715 Update();
716
717 /* FIXME: When should we send this? Does anyone care anyway? */
718 FinishInit();
719
720 /* Activate the band site */
721 Show(TRUE);
722
723 return S_OK;
724 }
725};
726/*******************************************************************/
727
728HRESULT CTrayBandSite_CreateInstance(IN ITrayWindow *tray, IN IDeskBand* pTaskBand, OUT ITrayBandSite** pBandSite)
729{
730 HRESULT hr;
731
733 if (!tb)
734 return E_FAIL;
735
736 tb->AddRef();
737
738 hr = tb->_Init(tray, pTaskBand);
740 {
741 tb->Release();
742 return hr;
743 }
744
745 *pBandSite = tb;
746
747 return S_OK;
748}
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
HWND hWnd
Definition: settings.c:17
#define ERR(fmt,...)
Definition: precomp.h:57
HKEY hkExplorer
Definition: explorer.cpp:26
HRESULT WINAPI _CBandSite_CreateInstance(LPUNKNOWN pUnkOuter, REFIID riid, void **ppv)
Definition: rshell.cpp:186
HRESULT WINAPI _CBandSiteMenu_CreateInstance(REFIID riid, void **ppv)
Definition: rshell.cpp:167
HRESULT IsSameObject(IN IUnknown *punk1, IN IUnknown *punk2)
Definition: util.cpp:11
const GUID CLSID_ITaskBand
Definition: taskband.cpp:27
#define STDMETHODIMP
Definition: basetyps.h:43
#define STDMETHODIMP_(t)
Definition: basetyps.h:44
const GUID IID_IUnknown
#define RegCloseKey(hKey)
Definition: registry.h:49
CComPtr< IWinEventHandler > m_WindowEventHandler
Definition: tbsite.cpp:44
STDMETHODIMP AddContextMenus(IN HMENU hmenu, IN UINT indexMenu, IN UINT idCmdFirst, IN UINT idCmdLast, IN UINT uFlags, OUT IContextMenu **ppcm) override
Definition: tbsite.cpp:287
STDMETHODIMP GetBandObject(IN DWORD dwBandID, IN REFIID riid, OUT VOID **ppv) override
Definition: tbsite.cpp:445
STDMETHODIMP EnumBands(IN UINT uBand, OUT DWORD *pdwBandID) override
Definition: tbsite.cpp:380
AddRef() override
Definition: tbsite.cpp:60
STDMETHODIMP QueryBand(IN DWORD dwBandID, OUT IDeskBand **ppstb, OUT DWORD *pdwState, OUT LPWSTR pszName, IN int cchName) override
Definition: tbsite.cpp:388
Release() override
Definition: tbsite.cpp:66
STDMETHODIMP SetBandSiteInfo(IN const BANDSITEINFO *pbsinfo) override
Definition: tbsite.cpp:454
virtual HRESULT FinishInit()
Definition: tbsite.cpp:531
virtual HRESULT LoadFromStream(IN OUT IStream *pStm)
Definition: tbsite.cpp:553
HWND m_Rebar
Definition: tbsite.cpp:47
STDMETHODIMP SetBandState(IN DWORD dwBandID, IN DWORD dwMask, IN DWORD dwState) override
Definition: tbsite.cpp:430
STDMETHODIMP OnLoad(IN OUT IStream *pStm, IN REFIID riid, OUT PVOID *pvObj) override
Definition: tbsite.cpp:121
STDMETHODIMP AddBand(IN IUnknown *punk) override
Definition: tbsite.cpp:354
volatile LONG m_RefCount
Definition: tbsite.cpp:37
STDMETHODIMP Lock(IN BOOL bLock) override
Definition: tbsite.cpp:324
virtual IStream * GetDefaultBandsStream(IN DWORD grfMode)
Definition: tbsite.cpp:595
CComPtr< ITrayWindow > m_Tray
Definition: tbsite.cpp:39
virtual HRESULT Load()
Definition: tbsite.cpp:615
STDMETHODIMP GetBandSiteInfo(IN OUT BANDSITEINFO *pbsinfo) override
Definition: tbsite.cpp:460
STDMETHODIMP QueryInterface(IN REFIID riid, OUT LPVOID *ppvObj) override
Definition: tbsite.cpp:77
STDMETHODIMP OnSave(IN OUT IUnknown *pUnk, IN OUT IStream *pStm) override
Definition: tbsite.cpp:194
DWORD Locked
Definition: tbsite.cpp:54
virtual VOID BroadcastOleCommandExec(REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdExecOpt, VARIANTARG *pvaIn, VARIANTARG *pvaOut)
Definition: tbsite.cpp:501
STDMETHODIMP ProcessMessage(IN HWND hWnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam, OUT LRESULT *plResult) override
Definition: tbsite.cpp:213
STDMETHODIMP RemoveBand(IN DWORD dwBandID) override
Definition: tbsite.cpp:439
DWORD dwFlags
Definition: tbsite.cpp:51
CComPtr< IBandSite > m_BandSite
Definition: tbsite.cpp:42
HRESULT _Init(IN ITrayWindow *tray, IN IDeskBand *pTaskBand)
Definition: tbsite.cpp:652
CComPtr< IContextMenu > m_ContextMenu
Definition: tbsite.cpp:45
virtual IStream * GetUserBandsStream(IN DWORD grfMode)
Definition: tbsite.cpp:575
CComPtr< IUnknown > m_Inner
Definition: tbsite.cpp:41
virtual HRESULT Update()
Definition: tbsite.cpp:491
virtual ~CTrayBandSite()
Definition: tbsite.cpp:118
virtual HRESULT Show(IN BOOL bShow)
Definition: tbsite.cpp:539
virtual BOOL HasTaskBand()
Definition: tbsite.cpp:465
STDMETHODIMP IsTaskBand(IN IUnknown *punk) override
Definition: tbsite.cpp:207
CComPtr< IDeskBand > m_TaskBand
Definition: tbsite.cpp:43
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1201
UINT uFlags
Definition: api.c:59
@ VT_BSTR
Definition: compat.h:2303
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
HRESULT WINAPI OleLoadFromStream(IStream *pStm, REFIID iidInterface, void **ppvObj)
Definition: storage32.c:9129
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1087
HRESULT WINAPI IUnknown_SetOwner(IUnknown *iface, IUnknown *pUnk)
Definition: ordinal.c:1385
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT Exec([in, unique] const GUID *pguidCmdGroup, [in] DWORD nCmdID, [in] DWORD nCmdexecopt, [in, unique] VARIANT *pvaIn, [in, out, unique] VARIANT *pvaOut)
ULONG Release()
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define ASSERT(a)
Definition: mode.c:44
#define SetWindowStyle(hwnd, val)
Definition: utility.h:153
static IStream Stream
Definition: htmldoc.c:1115
static const WCHAR tb[]
Definition: suminfo.c:285
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
static HMENU hmenu
Definition: win.c:66
REFCLSID clsid
Definition: msctf.c:82
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
#define STGM_READ
Definition: objbase.h:917
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
long LONG
Definition: pedump.c:60
#define RBN_MINMAX
Definition: commctrl.h:1638
#define NM_FIRST
Definition: commctrl.h:199
#define RBS_BANDBORDERS
Definition: commctrl.h:1472
#define RBHT_NOWHERE
Definition: commctrl.h:1691
#define NM_NCHITTEST
Definition: commctrl.h:139
#define RBHT_CLIENT
Definition: commctrl.h:1693
struct tagNMMOUSE * LPNMMOUSE
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
IStream *WINAPI SHOpenRegStreamW(HKEY hkey, LPCWSTR pszSubkey, LPCWSTR pszValue, DWORD dwMode)
Definition: regstream.c:624
#define WM_NOTIFY
Definition: richedit.h:61
HRESULT hr
Definition: shlfolder.c:183
#define DBC_SHOW
Definition: shlobj.h:1063
#define DBC_HIDE
Definition: shlobj.h:1062
@ REST_NOMOVINGBAND
Definition: shlobj.h:1698
@ DBID_BANDINFOCHANGED
Definition: shobjidl.idl:2528
@ DBID_SETWINDOWTHEME
Definition: shobjidl.idl:2534
@ DBID_DELAYINIT
Definition: shobjidl.idl:2532
@ DBID_FINISHINIT
Definition: shobjidl.idl:2533
DWORD WINAPI SHRestricted(RESTRICTIONS rest)
Definition: shpolicy.c:150
#define TRACE(s)
Definition: solgame.cpp:4
Definition: scsiwmi.h:51
UINT code
Definition: winuser.h:3162
HWND hwndFrom
Definition: winuser.h:3160
DWORD_PTR dwItemSpec
Definition: commctrl.h:164
LPARAM dwHitInfo
Definition: commctrl.h:167
HRESULT CTrayBandSite_CreateInstance(IN ITrayWindow *tray, IN IDeskBand *pTaskBand, OUT ITrayBandSite **pBandSite)
Definition: tbsite.cpp:728
uint32_t DWORD_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define ZeroMemory
Definition: winbase.h:1737
_In_ PSID _Out_writes_to_opt_ cchName LPSTR _Inout_ LPDWORD cchName
Definition: winbase.h:2792
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_POINTER
Definition: winerror.h:2365
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define HTTRANSPARENT
Definition: winuser.h:2476
#define IID_PPV_ARG(Itype, ppType)
WCHAR * LPWSTR
Definition: xmlstorage.h:184