ReactOS 0.4.15-dev-7711-g5627da4
CTaskbarList.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: browseui
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: ITaskbarList implementation
5 * COPYRIGHT: Copyright 2018 Mark Jansen (mark.jansen@reactos.org)
6 */
7
8#include "precomp.h"
9
10
11/***********************************************************************
12 * ITaskbarList2 implementation
13 */
14
15#define TWM_GETTASKSWITCH (WM_USER + 236)
16
18 : m_hTaskWnd(NULL)
19{
21}
22
24{
25}
26
28{
29 HWND hTrayWnd;
31 return m_hTaskWnd;
32
33 hTrayWnd = FindWindowW(L"Shell_TrayWnd", NULL);
34 if (hTrayWnd)
35 {
37 }
38 return m_hTaskWnd;
39}
40
42{
43 HWND hTaskWnd = TaskWnd();
44 if (hTaskWnd && m_ShellHookMsg)
46}
47
48
50{
52 return E_NOTIMPL;
53}
54
55
56/***********************************************************************
57 * ITaskbarList implementation
58 */
59
61{
62 if (m_ShellHookMsg == NULL)
63 return E_OUTOFMEMORY;
64
65 if (!TaskWnd())
66 return E_HANDLE;
67
68 return S_OK;
69}
70
72{
74 return S_OK;
75}
76
78{
80 return S_OK;
81}
82
84{
85 SendTaskWndShellHook(HSHELL_WINDOWACTIVATED, hwnd);
86 return S_OK;
87}
88
90{
92 return E_NOTIMPL;
93}
94
HWND hWnd
Definition: settings.c:17
#define TWM_GETTASKSWITCH
Definition: precomp.h:131
#define UNIMPLEMENTED
Definition: debug.h:115
virtual HRESULT STDMETHODCALLTYPE HrInit()
UINT m_ShellHookMsg
Definition: CTaskbarList.h:17
virtual HRESULT WINAPI MarkFullscreenWindow(HWND hwnd, BOOL fFullscreen)
virtual HRESULT STDMETHODCALLTYPE DeleteTab(HWND hwnd)
virtual HRESULT STDMETHODCALLTYPE AddTab(HWND hwnd)
virtual HRESULT STDMETHODCALLTYPE SetActiveAlt(HWND hwnd)
virtual HRESULT STDMETHODCALLTYPE ActivateTab(HWND hwnd)
void SendTaskWndShellHook(WPARAM wParam, HWND hWnd)
virtual ~CTaskbarList()
WPARAM wParam
Definition: combotst.c:138
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
HANDLE HWND
Definition: compat.h:19
unsigned int BOOL
Definition: ntddk_ex.h:94
#define S_OK
Definition: intsafe.h:52
#define L(x)
Definition: ntvdm.h:50
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define E_HANDLE
Definition: winerror.h:2850
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define HSHELL_WINDOWDESTROYED
Definition: winuser.h:1255
#define HSHELL_WINDOWCREATED
Definition: winuser.h:1254
UINT WINAPI RegisterWindowMessageW(_In_ LPCWSTR)
HWND WINAPI FindWindowW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)