ReactOS  0.4.15-dev-1397-g19779b3
CTaskbarList Class Reference

#include <CTaskbarList.h>

Inheritance diagram for CTaskbarList:
Collaboration diagram for CTaskbarList:

Public Member Functions

 CTaskbarList ()
 
virtual ~CTaskbarList ()
 
virtual HRESULT WINAPI MarkFullscreenWindow (HWND hwnd, BOOL fFullscreen)
 
virtual HRESULT STDMETHODCALLTYPE HrInit ()
 
virtual HRESULT STDMETHODCALLTYPE AddTab (HWND hwnd)
 
virtual HRESULT STDMETHODCALLTYPE DeleteTab (HWND hwnd)
 
virtual HRESULT STDMETHODCALLTYPE ActivateTab (HWND hwnd)
 
virtual HRESULT STDMETHODCALLTYPE SetActiveAlt (HWND hwnd)
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Private Member Functions

HWND TaskWnd ()
 
void SendTaskWndShellHook (WPARAM wParam, HWND hWnd)
 

Private Attributes

HWND m_hTaskWnd
 
UINT m_ShellHookMsg
 

Additional Inherited Members

- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Detailed Description

Definition at line 11 of file CTaskbarList.h.

Constructor & Destructor Documentation

◆ CTaskbarList()

CTaskbarList::CTaskbarList ( )

Definition at line 17 of file CTaskbarList.cpp.

18  : m_hTaskWnd(NULL)
19 {
21 }
UINT m_ShellHookMsg
Definition: CTaskbarList.h:17
static const WCHAR L[]
Definition: oid.c:1250
UINT WINAPI RegisterWindowMessageW(_In_ LPCWSTR)
#define NULL
Definition: types.h:112

◆ ~CTaskbarList()

CTaskbarList::~CTaskbarList ( )
virtual

Definition at line 23 of file CTaskbarList.cpp.

24 {
25 }

Member Function Documentation

◆ ActivateTab()

HRESULT WINAPI CTaskbarList::ActivateTab ( HWND  hwnd)
virtual

Implements ITaskbarList.

Definition at line 83 of file CTaskbarList.cpp.

84 {
85  SendTaskWndShellHook(HSHELL_WINDOWACTIVATED, hwnd);
86  return S_OK;
87 }
void SendTaskWndShellHook(WPARAM wParam, HWND hWnd)
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define S_OK
Definition: intsafe.h:51

◆ AddTab()

HRESULT WINAPI CTaskbarList::AddTab ( HWND  hwnd)
virtual

Implements ITaskbarList.

Definition at line 71 of file CTaskbarList.cpp.

72 {
74  return S_OK;
75 }
void SendTaskWndShellHook(WPARAM wParam, HWND hWnd)
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define HSHELL_WINDOWCREATED
Definition: winuser.h:1240
#define S_OK
Definition: intsafe.h:51

◆ DeleteTab()

HRESULT WINAPI CTaskbarList::DeleteTab ( HWND  hwnd)
virtual

Implements ITaskbarList.

Definition at line 77 of file CTaskbarList.cpp.

78 {
80  return S_OK;
81 }
void SendTaskWndShellHook(WPARAM wParam, HWND hWnd)
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define HSHELL_WINDOWDESTROYED
Definition: winuser.h:1241
#define S_OK
Definition: intsafe.h:51

◆ HrInit()

HRESULT WINAPI CTaskbarList::HrInit ( )
virtual

Implements ITaskbarList.

Definition at line 60 of file CTaskbarList.cpp.

61 {
62  if (m_ShellHookMsg == NULL)
63  return E_OUTOFMEMORY;
64 
65  if (!TaskWnd())
66  return E_HANDLE;
67 
68  return S_OK;
69 }
#define E_HANDLE
Definition: winerror.h:2850
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
UINT m_ShellHookMsg
Definition: CTaskbarList.h:17
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112

◆ MarkFullscreenWindow()

HRESULT WINAPI CTaskbarList::MarkFullscreenWindow ( HWND  hwnd,
BOOL  fFullscreen 
)
virtual

Implements ITaskbarList2.

Definition at line 49 of file CTaskbarList.cpp.

50 {
52  return E_NOTIMPL;
53 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ SendTaskWndShellHook()

void CTaskbarList::SendTaskWndShellHook ( WPARAM  wParam,
HWND  hWnd 
)
private

Definition at line 41 of file CTaskbarList.cpp.

42 {
43  HWND hTaskWnd = TaskWnd();
44  if (hTaskWnd && m_ShellHookMsg)
46 }
HWND hWnd
Definition: settings.c:17
WPARAM wParam
Definition: combotst.c:138
LONG_PTR LPARAM
Definition: windef.h:208
UINT m_ShellHookMsg
Definition: CTaskbarList.h:17
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by ActivateTab(), AddTab(), and DeleteTab().

◆ SetActiveAlt()

HRESULT WINAPI CTaskbarList::SetActiveAlt ( HWND  hwnd)
virtual

Implements ITaskbarList.

Definition at line 89 of file CTaskbarList.cpp.

90 {
92  return E_NOTIMPL;
93 }
#define E_NOTIMPL
Definition: ddrawi.h:99
#define UNIMPLEMENTED
Definition: debug.h:115

◆ TaskWnd()

HWND CTaskbarList::TaskWnd ( )
private

Definition at line 27 of file CTaskbarList.cpp.

28 {
29  HWND hTrayWnd;
30  if (m_hTaskWnd && ::IsWindow(m_hTaskWnd))
31  return m_hTaskWnd;
32 
33  hTrayWnd = FindWindowW(L"Shell_TrayWnd", NULL);
34  if (hTrayWnd)
35  {
36  m_hTaskWnd = (HWND)SendMessageW(hTrayWnd, TWM_GETTASKSWITCH, 0L, 0L);
37  }
38  return m_hTaskWnd;
39 }
BOOL WINAPI IsWindow(_In_opt_ HWND)
HANDLE HWND
Definition: compat.h:19
#define TWM_GETTASKSWITCH
HWND WINAPI FindWindowW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
static const WCHAR L[]
Definition: oid.c:1250
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define NULL
Definition: types.h:112

Referenced by HrInit(), and SendTaskWndShellHook().

Member Data Documentation

◆ m_hTaskWnd

HWND CTaskbarList::m_hTaskWnd
private

Definition at line 16 of file CTaskbarList.h.

Referenced by TaskWnd().

◆ m_ShellHookMsg

UINT CTaskbarList::m_ShellHookMsg
private

Definition at line 17 of file CTaskbarList.h.

Referenced by CTaskbarList(), HrInit(), and SendTaskWndShellHook().


The documentation for this class was generated from the following files: