ReactOS 0.4.15-dev-7958-gcd0bb1a
CTrayNotifyWnd Class Reference
Inheritance diagram for CTrayNotifyWnd:
Collaboration diagram for CTrayNotifyWnd:

Public Member Functions

 CTrayNotifyWnd ()
 
virtual ~CTrayNotifyWnd ()
 
LRESULT OnThemeChanged ()
 
LRESULT OnThemeChanged (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCreate (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
BOOL GetMinimumSize (IN OUT PSIZE pSize)
 
VOID Size (IN const SIZE *pszClient)
 
LRESULT OnEraseBackground (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnGetMinimumSize (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSize (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNcHitTest (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCtxMenu (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnClockMessage (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnPagerMessage (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnRealign (INT uCode, LPNMHDR hdr, BOOL &bHandled)
 
HRESULT WINAPI GetWindow (HWND *phwnd)
 
HRESULT WINAPI ContextSensitiveHelp (BOOL fEnterMode)
 
HRESULT Initialize (IN HWND hwndParent)
 
- 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 ATL::CWindowImpl< CTrayNotifyWnd, CWindow, CControlWinTraits >
HWND Create (HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
- Public Member Functions inherited from ATL::CWindowImplBaseT< TBase, TWinTraits >
 CWindowImplBaseT ()
 
virtual void OnFinalMessage (HWND)
 
BOOL SubclassWindow (HWND hWnd)
 
HWND UnsubclassWindow (BOOL bForce=FALSE)
 
virtual WNDPROC GetWindowProc ()
 
LRESULT DefWindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HWND Create (HWND hWndParent, _U_RECT rect, LPCTSTR szWindowName, DWORD dwStyle, DWORD dwExStyle, _U_MENUorID MenuOrID, ATOM atom, LPVOID lpCreateParam)
 
- Public Member Functions inherited from ATL::CWindowImplRoot< TBase >
 CWindowImplRoot ()
 
virtual ~CWindowImplRoot ()
 
- Public Member Functions inherited from ATL::CWindow
 CWindow (HWND hWnd=NULL)
 
 operator HWND () const
 
UINT ArrangeIconicWindows ()
 
void Attach (HWND hWndNew)
 
HDC BeginPaint (LPPAINTSTRUCT lpPaint)
 
BOOL BringWindowToTop ()
 
BOOL CenterWindow (HWND hWndCenter=NULL)
 
BOOL ChangeClipboardChain (HWND hWndNewNext)
 
BOOL CheckDlgButton (int nIDButton, UINT nCheck)
 
BOOL CheckRadioButton (int nIDFirstButton, int nIDLastButton, int nIDCheckButton)
 
HWND ChildWindowFromPoint (POINT point) const
 
HWND ChildWindowFromPointEx (POINT point, UINT uFlags) const
 
BOOL ClientToScreen (LPPOINT lpPoint) const
 
BOOL ClientToScreen (LPRECT lpRect) const
 
HWND Create (LPCTSTR lpstrWndClass, HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
BOOL CreateCaret (HBITMAP pBitmap)
 
BOOL CreateGrayCaret (int nWidth, int nHeight)
 
BOOL CreateSolidCaret (int nWidth, int nHeight)
 
HDWP DeferWindowPos (HDWP hWinPosInfo, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags)
 
BOOL DestroyWindow ()
 
HWND Detach ()
 
int DlgDirList (LPTSTR lpPathSpec, int nIDListBox, int nIDStaticPath, UINT nFileType)
 
int DlgDirListComboBox (LPTSTR lpPathSpec, int nIDComboBox, int nIDStaticPath, UINT nFileType)
 
BOOL DlgDirSelect (LPTSTR lpString, int nCount, int nIDListBox)
 
BOOL DlgDirSelectComboBox (LPTSTR lpString, int nCount, int nIDComboBox)
 
void DragAcceptFiles (BOOL bAccept=TRUE)
 
BOOL DrawMenuBar ()
 
BOOL EnableScrollBar (UINT uSBFlags, UINT uArrowFlags=ESB_ENABLE_BOTH)
 
BOOL EnableWindow (BOOL bEnable=TRUE)
 
void EndPaint (LPPAINTSTRUCT lpPaint)
 
BOOL FlashWindow (BOOL bInvert)
 
BOOL GetClientRect (LPRECT lpRect) const
 
HDC GetDC ()
 
HDC GetDCEx (HRGN hRgnClip, DWORD flags)
 
HWND GetDescendantWindow (int nID) const
 
HRESULT GetDlgControl (int nID, REFIID iid, void **ppCtrl)
 
int GetDlgCtrlID () const
 
HRESULT GetDlgHost (int nID, REFIID iid, void **ppHost)
 
HWND GetDlgItem (_In_ int nID) const
 
UINT GetDlgItemInt (_In_ int nID, _Out_opt_ BOOL *lpTrans=NULL, _In_ BOOL bSigned=TRUE) const
 
UINT GetDlgItemText (_In_ int nID, _Out_writes_to_(nMaxCount, return+1) LPTSTR lpStr, _In_ int nMaxCount) const
 
BOOL GetDlgItemText (_In_ int nID, _Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
DWORD GetExStyle () const
 
HFONT GetFont () const
 
DWORD GetHotKey () const
 
HICON GetIcon (BOOL bBigIcon=TRUE) const
 
HWND GetLastActivePopup () const
 
HMENU GetMenu () const
 
HWND GetNextDlgGroupItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
HWND GetNextDlgTabItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
CWindow GetParent () const
 
BOOL GetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo)
 
BOOL GetScrollPos (int nBar)
 
BOOL GetScrollRange (int nBar, LPINT lpMinPos, LPINT lpMaxPos) const
 
DWORD GetStyle () const
 
HMENU GetSystemMenu (BOOL bRevert)
 
HWND GetTopLevelParent () const
 
HWND GetTopLevelWindow () const
 
HWND GetTopWindow () const
 
BOOL GetUpdateRect (LPRECT lpRect, BOOL bErase=FALSE)
 
int GetUpdateRgn (HRGN hRgn, BOOL bErase=FALSE)
 
HWND GetWindow (UINT nCmd) const
 
DWORD GetWindowContextHelpId () const
 
HDC GetWindowDC ()
 
LONG GetWindowLong (int nIndex) const
 
LONG_PTR GetWindowLongPtr (int nIndex) const
 
BOOL GetWindowPlacement (WINDOWPLACEMENT *lpwndpl) const
 
DWORD GetWindowProcessID ()
 
BOOL GetWindowRect (LPRECT lpRect) const
 
int GetWindowRgn (HRGN hRgn)
 
int GetWindowText (_Out_writes_to_(nMaxCount, return+1) LPTSTR lpszStringBuf, _In_ int nMaxCount) const
 
BOOL GetWindowText (_Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
int GetWindowTextLength () const
 
DWORD GetWindowThreadID ()
 
WORD GetWindowWord (int nIndex) const
 
void GotoDlgCtrl (HWND hWndCtrl) const
 
BOOL HideCaret ()
 
BOOL HiliteMenuItem (HMENU hMenu, UINT uHiliteItem, UINT uHilite)
 
BOOL Invalidate (BOOL bErase=TRUE)
 
BOOL InvalidateRect (LPCRECT lpRect, BOOL bErase=TRUE)
 
void InvalidateRgn (HRGN hRgn, BOOL bErase=TRUE)
 
BOOL IsChild (const HWND hWnd) const
 
BOOL IsDialogMessage (LPMSG lpMsg)
 
UINT IsDlgButtonChecked (int nIDButton) const
 
BOOL IsIconic () const
 
BOOL IsParentDialog ()
 
BOOL IsWindow () const
 
BOOL IsWindowEnabled () const
 
BOOL IsWindowVisible () const
 
BOOL IsWindowUnicode ()
 
BOOL IsZoomed () const
 
BOOL KillTimer (UINT_PTR nIDEvent)
 
BOOL LockWindowUpdate (BOOL bLock=TRUE)
 
int MapWindowPoints (HWND hWndTo, LPPOINT lpPoint, UINT nCount) const
 
int MapWindowPoints (HWND hWndTo, LPRECT lpRect) const
 
int MessageBox (LPCTSTR lpszText, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK)
 
BOOL ModifyStyle (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL ModifyStyleEx (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL MoveWindow (int x, int y, int nWidth, int nHeight, BOOL bRepaint=TRUE)
 
void NextDlgCtrl () const
 
BOOL OpenClipboard ()
 
BOOL PostMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void PrevDlgCtrl () const
 
void Print (HDC hDC, DWORD dwFlags) const
 
void PrintClient (HDC hDC, DWORD dwFlags) const
 
BOOL RedrawWindow (LPCRECT lpRectUpdate=NULL, HRGN hRgnUpdate=NULL, UINT flags=RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE)
 
int ReleaseDC (HDC hDC)
 
BOOL ResizeClient (int nWidth, int nHeight, BOOL bRedraw=FALSE)
 
BOOL ScreenToClient (LPPOINT lpPoint) const
 
BOOL ScrollWindow (int xAmount, int yAmount, LPCRECT lpRect=NULL, LPCRECT lpClipRect=NULL)
 
int ScrollWindowEx (int dx, int dy, LPCRECT lpRectScroll, LPCRECT lpRectClip, HRGN hRgnUpdate, LPRECT lpRectUpdate, UINT flags)
 
LRESULT SendDlgItemMessage (int nID, UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
LRESULT SendMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void SendMessageToDescendants (UINT message, WPARAM wParam=0, LPARAM lParam=0, BOOL bDeep=TRUE)
 
BOOL SendNotifyMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
HWND SetActiveWindow ()
 
HWND SetCapture ()
 
HWND SetClipboardViewer ()
 
int SetDlgCtrlID (int nID)
 
BOOL SetDlgItemInt (int nID, UINT nValue, BOOL bSigned=TRUE)
 
BOOL SetDlgItemText (int nID, LPCTSTR lpszString)
 
HWND SetFocus ()
 
void SetFont (HFONT hFont, BOOL bRedraw=TRUE)
 
int SetHotKey (WORD wVirtualKeyCode, WORD wModifiers)
 
HICON SetIcon (HICON hIcon, BOOL bBigIcon=TRUE)
 
BOOL SetMenu (HMENU hMenu)
 
HWND SetParent (HWND hWndNewParent)
 
void SetRedraw (BOOL bRedraw=TRUE)
 
int SetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo, BOOL bRedraw=TRUE)
 
int SetScrollPos (int nBar, int nPos, BOOL bRedraw=TRUE)
 
BOOL SetScrollRange (int nBar, int nMinPos, int nMaxPos, BOOL bRedraw=TRUE)
 
UINT_PTR SetTimer (UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)=NULL)
 
BOOL SetWindowContextHelpId (DWORD dwContextHelpId)
 
LONG SetWindowLong (int nIndex, LONG dwNewLong)
 
LONG_PTR SetWindowLongPtr (int nIndex, LONG_PTR dwNewLong)
 
BOOL SetWindowPlacement (const WINDOWPLACEMENT *lpwndpl)
 
BOOL SetWindowPos (HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
 
int SetWindowRgn (HRGN hRgn, BOOL bRedraw=FALSE)
 
BOOL SetWindowText (LPCTSTR lpszString)
 
WORD SetWindowWord (int nIndex, WORD wNewWord)
 
BOOL ShowCaret ()
 
BOOL ShowOwnedPopups (BOOL bShow=TRUE)
 
BOOL ShowScrollBar (UINT nBar, BOOL bShow=TRUE)
 
BOOL ShowWindow (int nCmdShow)
 
BOOL ShowWindowAsync (int nCmdShow)
 
BOOL UpdateWindow ()
 
BOOL ValidateRect (LPCRECT lpRect)
 
BOOL ValidateRgn (HRGN hRgn)
 
BOOL WinHelp (LPCTSTR lpszHelp, UINT nCmd=HELP_CONTEXT, DWORD dwData=0)
 
- Public Member Functions inherited from ATL::CMessageMap
virtual BOOL ProcessWindowMessage (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID)=0
 
HRESULT GetWindow ([out] HWND *phwnd)
 
HRESULT ContextSensitiveHelp ([in] BOOL fEnterMode)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Private Attributes

CComPtr< IUnknownm_clock
 
CComPtr< IUnknownm_pager
 
HWND m_hwndClock
 
HWND m_hwndPager
 
HTHEME TrayTheme
 
SIZE szTrayClockMin
 
SIZE szTrayNotify
 
MARGINS ContentMargin
 
BOOL IsHorizontal
 

Additional Inherited Members

- Public Types inherited from ATL::CWindowImplRoot< TBase >
enum  { WINSTATE_DESTROYED = 0x00000001 }
 
- Public Types inherited from IOleWindow
typedef IOleWindowLPOLEWINDOW
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Static Public Member Functions inherited from ATL::CComCoClass< CTrayNotifyWnd >
static LPCTSTR WINAPI GetObjectDescription ()
 
- 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)
 
- Static Public Member Functions inherited from ATL::CWindowImpl< CTrayNotifyWnd, CWindow, CControlWinTraits >
static LPCTSTR GetWndCaption ()
 
- Static Public Member Functions inherited from ATL::CWindowImplBaseT< TBase, TWinTraits >
static DWORD GetWndStyle (DWORD dwStyle)
 
static DWORD GetWndExStyle (DWORD dwExStyle)
 
static LRESULT CALLBACK StartWindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static LRESULT CALLBACK WindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
- Static Public Member Functions inherited from ATL::CWindow
static LPCTSTR GetWndClassName ()
 
static LRESULT SendMessage (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 
- Public Attributes inherited from ATL::CWindowImplBaseT< TBase, TWinTraits >
WNDPROC m_pfnSuperWindowProc
 
- Public Attributes inherited from ATL::CWindowImplRoot< TBase >
CWndProcThunk m_thunk
 
const _ATL_MSGm_pCurrentMsg
 
DWORD m_dwState
 
- Public Attributes inherited from ATL::CWindow
HWND m_hWnd
 
- Static Public Attributes inherited from ATL::CWindow
static RECT rcDefault
 

Detailed Description

Definition at line 33 of file trayntfy.cpp.

Constructor & Destructor Documentation

◆ CTrayNotifyWnd()

CTrayNotifyWnd::CTrayNotifyWnd ( )
inline

Definition at line 52 of file trayntfy.cpp.

52 :
57 {
61 }
BOOL IsHorizontal
Definition: trayntfy.cpp:49
SIZE szTrayClockMin
Definition: trayntfy.cpp:46
HTHEME TrayTheme
Definition: trayntfy.cpp:45
SIZE szTrayNotify
Definition: trayntfy.cpp:47
HWND m_hwndClock
Definition: trayntfy.cpp:42
HWND m_hwndPager
Definition: trayntfy.cpp:43
MARGINS ContentMargin
Definition: trayntfy.cpp:48
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define ZeroMemory
Definition: winbase.h:1712

◆ ~CTrayNotifyWnd()

virtual CTrayNotifyWnd::~CTrayNotifyWnd ( )
inlinevirtual

Definition at line 62 of file trayntfy.cpp.

62{ }

Member Function Documentation

◆ ContextSensitiveHelp()

HRESULT WINAPI CTrayNotifyWnd::ContextSensitiveHelp ( BOOL  fEnterMode)
inline

Implements IOleWindow.

Definition at line 332 of file trayntfy.cpp.

333 {
334 return E_NOTIMPL;
335 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetMinimumSize()

BOOL CTrayNotifyWnd::GetMinimumSize ( IN OUT PSIZE  pSize)
inline

Definition at line 127 of file trayntfy.cpp.

128 {
129 SIZE szClock = { 0, 0 };
130 SIZE szTray = { 0, 0 };
131
133 {
134 if (IsHorizontal)
135 {
136 szClock.cy = pSize->cy - 2 * TRAY_NOTIFY_WND_SPACING_Y;
137 if (szClock.cy <= 0)
138 goto NoClock;
139 }
140 else
141 {
142 szClock.cx = pSize->cx - 2 * TRAY_NOTIFY_WND_SPACING_X;
143 if (szClock.cx <= 0)
144 goto NoClock;
145 }
146
148
149 szTrayClockMin = szClock;
150 }
151 else
152 NoClock:
153 szTrayClockMin = szClock;
154
155 if (IsHorizontal)
156 {
157 szTray.cy = pSize->cy - 2 * TRAY_NOTIFY_WND_SPACING_Y;
158 }
159 else
160 {
161 szTray.cx = pSize->cx - 2 * TRAY_NOTIFY_WND_SPACING_X;
162 }
163
165
166 szTrayNotify = szTray;
167
168 if (IsHorizontal)
169 {
170 pSize->cx = 2 * TRAY_NOTIFY_WND_SPACING_X;
171
174
175 pSize->cx += szTray.cx;
177 }
178 else
179 {
180 pSize->cy = 2 * TRAY_NOTIFY_WND_SPACING_Y;
181
184
185 pSize->cy += szTray.cy;
187 }
188
189 return TRUE;
190 }
#define TNWM_GETMINIMUMSIZE
Definition: precomp.h:367
TaskbarSettings g_TaskbarSettings
Definition: settings.cpp:23
#define TRUE
Definition: types.h:120
TW_STRUCKRECTS2 sr
Definition: precomp.h:225
int cyBottomHeight
Definition: misc.c:283
int cyTopHeight
Definition: misc.c:282
int cxRightWidth
Definition: misc.c:281
int cxLeftWidth
Definition: misc.c:280
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
DWORD HideClock
Definition: precomp.h:207
#define TRAY_NOTIFY_WND_SPACING_Y
Definition: trayntfy.cpp:31
#define TRAY_NOTIFY_WND_SPACING_X
Definition: trayntfy.cpp:30
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define SendMessage
Definition: winuser.h:5843

Referenced by OnGetMinimumSize().

◆ GetWindow()

HRESULT WINAPI CTrayNotifyWnd::GetWindow ( HWND phwnd)
inline

Implements IOleWindow.

Definition at line 324 of file trayntfy.cpp.

325 {
326 if (!phwnd)
327 return E_INVALIDARG;
328 *phwnd = m_hWnd;
329 return S_OK;
330 }
HWND m_hWnd
Definition: atlwin.h:273
#define E_INVALIDARG
Definition: ddrawi.h:101
#define S_OK
Definition: intsafe.h:52

◆ Initialize()

HRESULT CTrayNotifyWnd::Initialize ( IN HWND  hwndParent)
inline

Definition at line 362 of file trayntfy.cpp.

363 {
365 Create(hwndParent, 0, NULL, dwStyle, WS_EX_STATICEDGE);
366 if (!m_hWnd)
367 return E_FAIL;
368 return S_OK;
369 }
@ Create
Definition: registry.c:563
static HWND hwndParent
Definition: cryptui.c:300
#define E_FAIL
Definition: ddrawi.h:102
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WS_CHILD
Definition: pedump.c:617
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define WS_EX_STATICEDGE
Definition: winuser.h:403

◆ OnClockMessage()

LRESULT CTrayNotifyWnd::OnClockMessage ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 308 of file trayntfy.cpp.

309 {
310 return SendMessageW(m_hwndClock, uMsg, wParam, lParam);
311 }
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

◆ OnCreate()

LRESULT CTrayNotifyWnd::OnCreate ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 104 of file trayntfy.cpp.

105 {
106 HRESULT hr;
107
110 return FALSE;
111
114 return FALSE;
115
118 return FALSE;
119
122 return FALSE;
123
124 return TRUE;
125 }
HRESULT CTrayClockWnd_CreateInstance(HWND hwndParent, REFIID riid, void **ppv)
Definition: trayclock.cpp:779
HRESULT CSysPagerWnd_CreateInstance(HWND hwndParent, REFIID riid, void **ppv)
Definition: syspager.cpp:1611
CComPtr< IUnknown > m_pager
Definition: trayntfy.cpp:40
CComPtr< IUnknown > m_clock
Definition: trayntfy.cpp:39
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1332
HRESULT hr
Definition: shlfolder.c:183
#define IID_PPV_ARG(Itype, ppType)

◆ OnCtxMenu()

LRESULT CTrayNotifyWnd::OnCtxMenu ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 298 of file trayntfy.cpp.

299 {
300 bHandled = TRUE;
301
302 if (reinterpret_cast<HWND>(wParam) == m_hwndClock)
303 return GetParent().SendMessage(uMsg, wParam, lParam);
304 else
305 return 0;
306 }
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1116
CWindow GetParent() const
Definition: atlwin.h:700

◆ OnEraseBackground()

LRESULT CTrayNotifyWnd::OnEraseBackground ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 245 of file trayntfy.cpp.

246 {
247 HDC hdc = (HDC) wParam;
248
249 if (!TrayTheme)
250 {
251 bHandled = FALSE;
252 return 0;
253 }
254
255 RECT rect;
259
261
262 return TRUE;
263 }
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
Definition: draw.c:128
BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME hTheme, int iPartId, int iStateId)
Definition: draw.c:1883
HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
Definition: draw.c:72
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:92
& rect
Definition: startmenu.cpp:1413
@ TNP_BACKGROUND
Definition: vssym32.h:543
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)

◆ OnGetMinimumSize()

LRESULT CTrayNotifyWnd::OnGetMinimumSize ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 265 of file trayntfy.cpp.

266 {
267 BOOL Horizontal = (BOOL) wParam;
268
269 if (Horizontal != IsHorizontal)
270 {
271 IsHorizontal = Horizontal;
272 if (IsHorizontal)
273 SetWindowTheme(m_hWnd, L"TrayNotifyHoriz", NULL);
274 else
275 SetWindowTheme(m_hWnd, L"TrayNotifyVert", NULL);
276 }
277
279 }
BOOL GetMinimumSize(IN OUT PSIZE pSize)
Definition: trayntfy.cpp:127
unsigned int BOOL
Definition: ntddk_ex.h:94
#define BOOL
Definition: nt_native.h:43
#define L(x)
Definition: ntvdm.h:50
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Definition: uxthemesupp.c:69
LONG_PTR LRESULT
Definition: windef.h:209

◆ OnNcHitTest()

LRESULT CTrayNotifyWnd::OnNcHitTest ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 293 of file trayntfy.cpp.

294 {
295 return HTTRANSPARENT;
296 }
#define HTTRANSPARENT
Definition: winuser.h:2473

◆ OnPagerMessage()

LRESULT CTrayNotifyWnd::OnPagerMessage ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 313 of file trayntfy.cpp.

314 {
315 return SendMessageW(m_hwndPager, uMsg, wParam, lParam);
316 }

◆ OnRealign()

LRESULT CTrayNotifyWnd::OnRealign ( INT  uCode,
LPNMHDR  hdr,
BOOL bHandled 
)
inline

Definition at line 318 of file trayntfy.cpp.

319 {
320 hdr->hwndFrom = m_hWnd;
322 }
char hdr[14]
Definition: iptest.cpp:33
#define WM_NOTIFY
Definition: richedit.h:61

◆ OnSize()

LRESULT CTrayNotifyWnd::OnSize ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 281 of file trayntfy.cpp.

282 {
283 SIZE szClient;
284
285 szClient.cx = LOWORD(lParam);
286 szClient.cy = HIWORD(lParam);
287
288 Size(&szClient);
289
290 return TRUE;
291 }
#define LOWORD(l)
Definition: pedump.c:82
#define HIWORD(l)
Definition: typedefs.h:247
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533

◆ OnThemeChanged() [1/2]

LRESULT CTrayNotifyWnd::OnThemeChanged ( )
inline

Definition at line 64 of file trayntfy.cpp.

65 {
66 if (TrayTheme)
68
69 if (IsThemeActive())
70 TrayTheme = OpenThemeData(m_hWnd, L"TrayNotify");
71 else
73
74 if (TrayTheme)
75 {
77
79 NULL,
81 0,
83 NULL,
85 }
86 else
87 {
89
94 }
95
96 return TRUE;
97 }
HRESULT WINAPI GetThemeMargins(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, RECT *prc, MARGINS *pMargins)
Definition: property.c:216
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist)
Definition: system.c:835
BOOL WINAPI IsThemeActive(void)
Definition: system.c:606
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
Definition: system.c:950
#define SetWindowExStyle(h, val)
Definition: utility.h:154
#define TMT_CONTENTMARGINS
Definition: vssym32.h:324

Referenced by OnThemeChanged().

◆ OnThemeChanged() [2/2]

LRESULT CTrayNotifyWnd::OnThemeChanged ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 99 of file trayntfy.cpp.

100 {
101 return OnThemeChanged();
102 }
LRESULT OnThemeChanged()
Definition: trayntfy.cpp:64

◆ Size()

VOID CTrayNotifyWnd::Size ( IN const SIZE pszClient)
inline

Definition at line 192 of file trayntfy.cpp.

193 {
195 {
196 POINT ptClock;
197 SIZE szClock;
198
199 if (IsHorizontal)
200 {
201 ptClock.x = pszClient->cx - szTrayClockMin.cx - ContentMargin.cxRightWidth;
202 ptClock.y = ContentMargin.cyTopHeight;
203 szClock.cx = szTrayClockMin.cx;
204 szClock.cy = pszClient->cy - ContentMargin.cyTopHeight - ContentMargin.cyBottomHeight;
205 }
206 else
207 {
208 ptClock.x = ContentMargin.cxLeftWidth;
209 ptClock.y = pszClient->cy - szTrayClockMin.cy;
210 szClock.cx = pszClient->cx - ContentMargin.cxLeftWidth - ContentMargin.cxRightWidth;
211 szClock.cy = szTrayClockMin.cy;
212 }
213
215 NULL,
216 ptClock.x,
217 ptClock.y,
218 szClock.cx,
219 szClock.cy,
221 }
222
223 POINT ptPager;
224
225 if (IsHorizontal)
226 {
227 ptPager.x = ContentMargin.cxLeftWidth;
228 ptPager.y = (pszClient->cy - szTrayNotify.cy)/2;
229 }
230 else
231 {
232 ptPager.x = (pszClient->cx - szTrayNotify.cx)/2;
233 ptPager.y = ContentMargin.cyTopHeight;
234 }
235
237 NULL,
238 ptPager.x,
239 ptPager.y,
243 }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOZORDER
Definition: winuser.h:1247

Member Data Documentation

◆ ContentMargin

MARGINS CTrayNotifyWnd::ContentMargin
private

Definition at line 48 of file trayntfy.cpp.

Referenced by CTrayNotifyWnd(), GetMinimumSize(), OnThemeChanged(), and Size().

◆ IsHorizontal

BOOL CTrayNotifyWnd::IsHorizontal
private

Definition at line 49 of file trayntfy.cpp.

Referenced by GetMinimumSize(), OnGetMinimumSize(), and Size().

◆ m_clock

CComPtr<IUnknown> CTrayNotifyWnd::m_clock
private

Definition at line 39 of file trayntfy.cpp.

Referenced by OnCreate().

◆ m_hwndClock

HWND CTrayNotifyWnd::m_hwndClock
private

Definition at line 42 of file trayntfy.cpp.

Referenced by GetMinimumSize(), OnClockMessage(), OnCreate(), OnCtxMenu(), and Size().

◆ m_hwndPager

HWND CTrayNotifyWnd::m_hwndPager
private

Definition at line 43 of file trayntfy.cpp.

Referenced by GetMinimumSize(), OnCreate(), OnPagerMessage(), and Size().

◆ m_pager

CComPtr<IUnknown> CTrayNotifyWnd::m_pager
private

Definition at line 40 of file trayntfy.cpp.

Referenced by OnCreate().

◆ szTrayClockMin

SIZE CTrayNotifyWnd::szTrayClockMin
private

Definition at line 46 of file trayntfy.cpp.

Referenced by CTrayNotifyWnd(), GetMinimumSize(), and Size().

◆ szTrayNotify

SIZE CTrayNotifyWnd::szTrayNotify
private

Definition at line 47 of file trayntfy.cpp.

Referenced by CTrayNotifyWnd(), GetMinimumSize(), and Size().

◆ TrayTheme

HTHEME CTrayNotifyWnd::TrayTheme
private

Definition at line 45 of file trayntfy.cpp.

Referenced by OnEraseBackground(), and OnThemeChanged().


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