ReactOS 0.4.15-dev-7889-g76290a6
csystray.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS system libraries
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: dll/shellext/stobject/csystray.h
5 * PURPOSE: Systray shell service object
6 * PROGRAMMERS: Robert Naumann
7 * David Quintana <gigaherz@gmail.com>
8 * Shriraj Sawant a.k.a SR13 <sr.official@hotmail.com>
9 */
10
11#pragma once
12
13extern const GUID CLSID_SysTray;
14
15
16typedef CWinTraits <
20
21class CSysTray :
22 public CComCoClass<CSysTray, &CLSID_SysTray>,
23 public CComObjectRootEx<CComMultiThreadModelNoCS>,
24 public CWindowImpl<CSysTray, CWindow, CMessageWndClass>,
26{
27 CComPtr<IOleCommandTarget> pctNetShell;
28
29 // TODO: keep icon handlers here
30
34
40
45
48
50
51public:
52 HRESULT NotifyIcon(INT code, UINT uId, HICON hIcon, LPCWSTR szTip, DWORD dwstate = 0);
53
54 HWND GetHWnd() { return m_hWnd; }
55
56 VOID EnableService(DWORD dwServiceFlag, BOOL bEnable);
57 BOOL IsServiceEnabled(DWORD dwServiceFlag);
58
59protected:
60 BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID = 0);
61
62public:
63 CSysTray();
64 virtual ~CSysTray();
65
66 // *** IOleCommandTarget methods ***
67 virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText);
68 virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
69
71
75
77 COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
79
80};
HWND hWnd
Definition: settings.c:17
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
HRESULT NotifyIcon(INT code, UINT uId, HICON hIcon, LPCWSTR szTip, DWORD dwstate=0)
Definition: csystray.cpp:207
BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID=0)
Definition: csystray.cpp:315
CComPtr< IOleCommandTarget > pctNetShell
Definition: csystray.h:27
VOID GetServicesEnabled()
Definition: csystray.cpp:33
HRESULT SysTrayThreadProc()
Definition: csystray.cpp:253
HRESULT ProcessIconMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult)
Definition: csystray.cpp:171
CSysTray()
Definition: csystray.cpp:23
HRESULT DestroySysTrayWindow()
Definition: csystray.cpp:283
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: csystray.cpp:300
BOOL IsServiceEnabled(DWORD dwServiceFlag)
Definition: csystray.cpp:92
HRESULT InitNetShell()
Definition: csystray.cpp:97
HWND GetHWnd()
Definition: csystray.h:54
UINT wm_SHELLHOOK
Definition: csystray.h:32
DWORD dwServicesEnabled
Definition: csystray.h:31
HRESULT ShutdownIcons()
Definition: csystray.cpp:137
HRESULT UpdateIcons()
Definition: csystray.cpp:155
HRESULT InitIcons()
Definition: csystray.cpp:119
VOID EnableService(DWORD dwServiceFlag, BOOL bEnable)
Definition: csystray.cpp:62
HRESULT CreateSysTrayThread()
Definition: csystray.cpp:271
HRESULT SysTrayMessageLoop()
Definition: csystray.cpp:236
UINT wm_DESTROYWINDOW
Definition: csystray.h:33
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
Definition: csystray.cpp:294
HRESULT ShutdownNetShell()
Definition: csystray.cpp:108
virtual ~CSysTray()
Definition: csystray.cpp:29
static DWORD WINAPI s_SysTrayThreadProc(PVOID param)
Definition: csystray.cpp:230
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
const GUID CLSID_SysTray
CWinTraits< WS_POPUP|WS_DLGFRAME|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, WS_EX_LEFT|WS_EX_LTRREADING|WS_EX_RIGHTSCROLLBAR|WS_EX_PALETTEWINDOW > CMessageWndClass
Definition: csystray.h:19
#define IDR_SYSTRAY
Definition: resource.h:71
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLfloat param
Definition: glext.h:5796
struct IOleCommandTarget::_tagOLECMDTEXT OLECMDTEXT
struct IOleCommandTarget::_tagOLECMD OLECMD
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:601
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:679
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:651
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:645
#define END_COM_MAP()
Definition: atlcom.h:592
#define DECLARE_WND_CLASS_EX(WndClassName, style, bkgnd)
Definition: atlwin.h:2004
static HICON
Definition: imagelist.c:84
HICON hIcon
Definition: msconfig.c:44
unsigned int UINT
Definition: ndis.h:50
#define WS_POPUP
Definition: pedump.c:616
#define WS_DLGFRAME
Definition: pedump.c:626
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
Definition: inflate.c:139
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
#define _T(x)
Definition: vfdio.h:22
_In_ BOOL bEnable
Definition: winddi.h:3426
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define WS_EX_RIGHTSCROLLBAR
Definition: winuser.h:401
#define WS_EX_PALETTEWINDOW
Definition: winuser.h:399
#define WS_EX_LTRREADING
Definition: winuser.h:393
#define CS_GLOBALCLASS
Definition: winuser.h:652
#define WS_EX_LEFT
Definition: winuser.h:391
#define COLOR_3DFACE
Definition: winuser.h:929
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185