ReactOS  0.4.15-dev-5146-g069b08d
CSysPagerWnd Class Reference
Inheritance diagram for CSysPagerWnd:
Collaboration diagram for CSysPagerWnd:

Public Member Functions

 CSysPagerWnd ()
 
virtual ~CSysPagerWnd ()
 
LRESULT DrawBackground (HDC hdc)
 
LRESULT OnEraseBackground (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCreate (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnDestroy (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnGetInfoTip (INT uCode, LPNMHDR hdr, BOOL &bHandled)
 
LRESULT OnCustomDraw (INT uCode, LPNMHDR hdr, BOOL &bHandled)
 
LRESULT OnCommand (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSize (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCtxMenu (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnBalloonPop (UINT uCode, LPNMHDR hdr, BOOL &bHandled)
 
LRESULT OnTimer (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCopyData (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSettingChanged (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnGetMinimumSize (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
HRESULT WINAPI GetWindow (HWND *phwnd)
 
HRESULT WINAPI ContextSensitiveHelp (BOOL fEnterMode)
 
BOOL NotifyIcon (DWORD dwMessage, _In_ CONST NOTIFYICONDATA *iconData)
 
void GetSize (IN BOOL IsHorizontal, IN PSIZE size)
 
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< CSysPagerWnd, 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< CWindow, CControlWinTraits >
 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< CWindow >
 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
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
- Public Member Functions inherited from CIconWatcher
 CIconWatcher ()
 
virtual ~CIconWatcher ()
 
bool Initialize (_In_ HWND hWndParent)
 
void Uninitialize ()
 
bool AddIconToWatcher (_In_ CONST NOTIFYICONDATA *iconData)
 
bool RemoveIconFromWatcher (_In_ CONST NOTIFYICONDATA *iconData)
 
IconWatcherDataGetListEntry (_In_opt_ CONST NOTIFYICONDATA *iconData, _In_opt_ HANDLE hProcess, _In_ bool Remove)
 

Private Attributes

CNotifyToolbar Toolbar
 
CTooltips m_Balloons
 
CBalloonQueue m_BalloonQueue
 

Additional Inherited Members

- Public Types inherited from ATL::CWindowImplRoot< CWindow >
enum  
 
- Public Types inherited from IOleWindow
typedef IOleWindowLPOLEWINDOW
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Static Public Member Functions inherited from ATL::CComCoClass< CSysPagerWnd >
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< CSysPagerWnd, CWindow, CControlWinTraits >
static LPCTSTR GetWndCaption ()
 
- Static Public Member Functions inherited from ATL::CWindowImplBaseT< CWindow, CControlWinTraits >
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< CWindow, CControlWinTraits >
WNDPROC m_pfnSuperWindowProc
 
- Public Attributes inherited from ATL::CWindowImplRoot< CWindow >
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 186 of file syspager.cpp.

Constructor & Destructor Documentation

◆ CSysPagerWnd()

CSysPagerWnd::CSysPagerWnd ( )

Definition at line 1268 of file syspager.cpp.

1268 {}

◆ ~CSysPagerWnd()

CSysPagerWnd::~CSysPagerWnd ( )
virtual

Definition at line 1270 of file syspager.cpp.

1270 {}

Member Function Documentation

◆ ContextSensitiveHelp()

HRESULT WINAPI CSysPagerWnd::ContextSensitiveHelp ( BOOL  fEnterMode)
inline

Implements IOleWindow.

Definition at line 226 of file syspager.cpp.

227  {
228  return E_NOTIMPL;
229  }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ DrawBackground()

LRESULT CSysPagerWnd::DrawBackground ( HDC  hdc)

◆ GetSize()

void CSysPagerWnd::GetSize ( IN BOOL  IsHorizontal,
IN PSIZE  size 
)

Definition at line 1382 of file syspager.cpp.

1383 {
1384  /* Get the ideal height or width */
1385 #if 0
1386  /* Unfortunately this doens't work correctly in ros */
1387  Toolbar.GetIdealSize(!IsHorizontal, size);
1388 
1389  /* Make the reference dimension an exact multiple of the icon size */
1390  if (IsHorizontal)
1391  size->cy -= size->cy % GetSystemMetrics(SM_CYSMICON);
1392  else
1393  size->cx -= size->cx % GetSystemMetrics(SM_CXSMICON);
1394 
1395 #else
1396  INT rows = 0;
1397  INT columns = 0;
1398  INT cyButton = GetSystemMetrics(SM_CYSMICON) + 2;
1399  INT cxButton = GetSystemMetrics(SM_CXSMICON) + 2;
1400  int VisibleButtonCount = Toolbar.GetVisibleButtonCount();
1401 
1402  if (IsHorizontal)
1403  {
1404  rows = max(size->cy / cyButton, 1);
1405  columns = (VisibleButtonCount + rows - 1) / rows;
1406  }
1407  else
1408  {
1409  columns = max(size->cx / cxButton, 1);
1410  rows = (VisibleButtonCount + columns - 1) / columns;
1411  }
1412  size->cx = columns * cxButton;
1413  size->cy = rows * cyButton;
1414 #endif
1415 }
#define max(a, b)
Definition: svc.c:63
CNotifyToolbar Toolbar
Definition: syspager.cpp:193
#define SM_CYSMICON
Definition: winuser.h:1007
DWORD GetIdealSize(BOOL useHeight, LPSIZE size)
Definition: rosctrls.h:388
int32_t INT
Definition: typedefs.h:58
GLsizeiptr size
Definition: glext.h:5919
int WINAPI GetSystemMetrics(_In_ int)
#define SM_CXSMICON
Definition: winuser.h:1006
int GetVisibleButtonCount()
Definition: syspager.cpp:672

Referenced by OnGetMinimumSize().

◆ GetWindow()

HRESULT WINAPI CSysPagerWnd::GetWindow ( HWND phwnd)
inline

Implements IOleWindow.

Definition at line 218 of file syspager.cpp.

219  {
220  if (!phwnd)
221  return E_INVALIDARG;
222  *phwnd = m_hWnd;
223  return S_OK;
224  }
#define E_INVALIDARG
Definition: ddrawi.h:101
HWND m_hWnd
Definition: atlwin.h:267
#define S_OK
Definition: intsafe.h:52

◆ Initialize()

HRESULT CSysPagerWnd::Initialize ( IN HWND  hWndParent)

Definition at line 1570 of file syspager.cpp.

1571 {
1572  /* Create the window. The tray window is going to move it to the correct
1573  position and resize it as needed. */
1574  DWORD dwStyle = WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE;
1575  Create(hWndParent, 0, NULL, dwStyle);
1576  if (!m_hWnd)
1577  return E_FAIL;
1578 
1579  SetWindowTheme(m_hWnd, L"TrayNotify", NULL);
1580 
1581  return S_OK;
1582 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
HWND Create(HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
Definition: atlwin.h:1728
#define WS_CHILD
Definition: pedump.c:617
#define E_FAIL
Definition: ddrawi.h:102
#define L(x)
Definition: ntvdm.h:50
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Definition: uxthemesupp.c:69
unsigned long DWORD
Definition: ntddk_ex.h:95
HWND m_hWnd
Definition: atlwin.h:267
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
#define WS_VISIBLE
Definition: pedump.c:620

◆ NotifyIcon()

BOOL CSysPagerWnd::NotifyIcon ( DWORD  dwMessage,
_In_ CONST NOTIFYICONDATA iconData 
)

Definition at line 1329 of file syspager.cpp.

1330 {
1331  BOOL ret = FALSE;
1332 
1333  int VisibleButtonCount = Toolbar.GetVisibleButtonCount();
1334 
1335  TRACE("NotifyIcon received. Code=%d\n", dwMessage);
1336  switch (dwMessage)
1337  {
1338  case NIM_ADD:
1339  ret = Toolbar.AddButton(iconData);
1340  if (ret == TRUE)
1341  {
1342  (void)AddIconToWatcher(iconData);
1343  }
1344  break;
1345 
1346  case NIM_MODIFY:
1347  ret = Toolbar.UpdateButton(iconData);
1348  break;
1349 
1350  case NIM_DELETE:
1351  ret = Toolbar.RemoveButton(iconData);
1352  if (ret == TRUE)
1353  {
1354  (void)RemoveIconFromWatcher(iconData);
1355  }
1356  break;
1357 
1358  case NIM_SETFOCUS:
1359  Toolbar.SetFocus();
1360  ret = TRUE;
1361  break;
1362 
1363  case NIM_SETVERSION:
1364  ret = Toolbar.SwitchVersion(iconData);
1365  break;
1366 
1367  default:
1368  TRACE("NotifyIcon received with unknown code %d.\n", dwMessage);
1369  return FALSE;
1370  }
1371 
1372  if (VisibleButtonCount != Toolbar.GetVisibleButtonCount())
1373  {
1374  /* Ask the parent to resize */
1375  NMHDR nmh = {GetParent(), 0, NTNWM_REALIGN};
1376  GetParent().SendMessage(WM_NOTIFY, 0, (LPARAM) &nmh);
1377  }
1378 
1379  return ret;
1380 }
BOOL SwitchVersion(IN CONST NOTIFYICONDATA *iconData)
Definition: syspager.cpp:813
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
CNotifyToolbar Toolbar
Definition: syspager.cpp:193
#define TRUE
Definition: types.h:120
BOOL RemoveButton(IN CONST NOTIFYICONDATA *iconData)
Definition: syspager.cpp:941
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
#define NTNWM_REALIGN
Definition: precomp.h:336
#define NIM_DELETE
Definition: shellapi.h:93
int ret
bool RemoveIconFromWatcher(_In_ CONST NOTIFYICONDATA *iconData)
Definition: syspager.cpp:369
BOOL AddButton(IN CONST NOTIFYICONDATA *iconData)
Definition: syspager.cpp:714
BOOL UpdateButton(IN CONST NOTIFYICONDATA *iconData)
Definition: syspager.cpp:836
#define NIM_ADD
Definition: shellapi.h:91
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1110
CWindow GetParent() const
Definition: atlwin.h:694
int GetVisibleButtonCount()
Definition: syspager.cpp:672
bool AddIconToWatcher(_In_ CONST NOTIFYICONDATA *iconData)
Definition: syspager.cpp:330
#define WM_NOTIFY
Definition: richedit.h:61
#define NIM_MODIFY
Definition: shellapi.h:92

Referenced by OnCopyData().

◆ OnBalloonPop()

LRESULT CSysPagerWnd::OnBalloonPop ( UINT  uCode,
LPNMHDR  hdr,
BOOL bHandled 
)

Definition at line 1520 of file syspager.cpp.

1521 {
1523  bHandled = TRUE;
1524  return 0;
1525 }
#define TRUE
Definition: types.h:120
CBalloonQueue m_BalloonQueue
Definition: syspager.cpp:195
void CloseCurrent()
Definition: syspager.cpp:590

◆ OnCommand()

LRESULT CSysPagerWnd::OnCommand ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1438 of file syspager.cpp.

1439 {
1440  bHandled = FALSE;
1441 
1442  /* Handles the BN_CLICKED notifications sent by the CNotifyToolbar member */
1443  if (HIWORD(wParam) != BN_CLICKED)
1444  return 0;
1445 
1446  INT iBtn = LOWORD(wParam);
1447  if (iBtn < 0)
1448  return 0;
1449 
1450  InternalIconData* notifyItem = Toolbar.GetItemData(iBtn);
1451 
1452  if (!::IsWindow(notifyItem->hWnd))
1453  return 0;
1454 
1455  // TODO: Improve keyboard handling by looking whether one presses
1456  // on ENTER, etc..., which roughly translates into "double-clicking".
1457 
1458  if (notifyItem->uVersionCopy >= NOTIFYICON_VERSION)
1459  {
1460  /* Use new-style notifications if the notification icon supports them */
1461  ::SendNotifyMessage(notifyItem->hWnd,
1462  notifyItem->uCallbackMessage,
1463  notifyItem->uID,
1464  NIN_SELECT); // TODO: Distinguish with NIN_KEYSELECT
1465  }
1466  else if (lParam == -1)
1467  {
1468  /*
1469  * Otherwise, and only if the icon was selected via the keyboard,
1470  * simulate right-click mouse messages. This is not needed if the
1471  * selection was done by mouse because in this case the mouse
1472  * messages were already sent.
1473  */
1474  ::SendNotifyMessage(notifyItem->hWnd,
1475  notifyItem->uCallbackMessage,
1476  notifyItem->uID,
1477  WM_LBUTTONDOWN); // TODO: Distinguish with double-click WM_LBUTTONDBLCLK
1478  ::SendNotifyMessage(notifyItem->hWnd,
1479  notifyItem->uCallbackMessage,
1480  notifyItem->uID,
1481  WM_LBUTTONUP);
1482  }
1483 
1484  return 0;
1485 }
#define WM_LBUTTONDOWN
Definition: winuser.h:1766
CNotifyToolbar Toolbar
Definition: syspager.cpp:193
BOOL IsWindow() const
Definition: atlwin.h:941
TItemData * GetItemData(int index)
Definition: rosctrls.h:436
int32_t INT
Definition: typedefs.h:58
WPARAM wParam
Definition: combotst.c:138
#define FALSE
Definition: types.h:117
#define BN_CLICKED
Definition: winuser.h:1915
BOOL SendNotifyMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1150
UINT uCallbackMessage
Definition: shellapi.h:229
#define WM_LBUTTONUP
Definition: winuser.h:1767
#define HIWORD(l)
Definition: typedefs.h:247
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82

◆ OnCopyData()

LRESULT CSysPagerWnd::OnCopyData ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1537 of file syspager.cpp.

1538 {
1540  if (cpData->dwData == TABDMC_NOTIFY)
1541  {
1542  /* A taskbar NotifyIcon notification */
1543  PTRAYNOTIFYDATAW pData = (PTRAYNOTIFYDATAW)cpData->lpData;
1544  if (pData->dwSignature == NI_NOTIFY_SIG)
1545  return NotifyIcon(pData->dwMessage, &pData->nid);
1546  }
1547  else if (cpData->dwData == TABDMC_LOADINPROC)
1548  {
1549  FIXME("Taskbar Load In Proc\n");
1550  }
1551 
1552  return FALSE;
1553 }
if(dx==0 &&dy==0)
Definition: linetemp.h:174
ULONG_PTR dwData
Definition: winuser.h:2991
#define FALSE
Definition: types.h:117
#define TABDMC_NOTIFY
Definition: undocshell.h:714
#define FIXME(fmt,...)
Definition: debug.h:111
BOOL NotifyIcon(DWORD dwMessage, _In_ CONST NOTIFYICONDATA *iconData)
Definition: syspager.cpp:1329
struct tagCOPYDATASTRUCT * PCOPYDATASTRUCT
#define TABDMC_LOADINPROC
Definition: undocshell.h:715
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
LPARAM lParam
Definition: combotst.c:139

◆ OnCreate()

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

Definition at line 1289 of file syspager.cpp.

1290 {
1293 
1294  HWND hWndTop = GetAncestor(m_hWnd, GA_ROOT);
1295 
1297 
1298  TOOLINFOW ti = { 0 };
1299  ti.cbSize = TTTOOLINFOW_V1_SIZE;
1300  ti.uFlags = TTF_TRACK | TTF_IDISHWND;
1301  ti.uId = reinterpret_cast<UINT_PTR>(Toolbar.m_hWnd);
1302  ti.hwnd = m_hWnd;
1303  ti.lpszText = NULL;
1304  ti.lParam = NULL;
1305 
1306  BOOL ret = m_Balloons.AddTool(&ti);
1307  if (!ret)
1308  {
1309  WARN("AddTool failed, LastError=%d (probably meaningless unless non-zero)\n", GetLastError());
1310  }
1311 
1313 
1314  // Explicitly request running applications to re-register their systray icons
1316  RegisterWindowMessageW(L"TaskbarCreated"),
1317  0, 0);
1318 
1319  return TRUE;
1320 }
#define GA_ROOT
Definition: winuser.h:2779
HWND WINAPI GetAncestor(_In_ HWND, _In_ UINT)
void Initialize(HWND hWndParent, CBalloonQueue *queue)
Definition: syspager.cpp:1225
CNotifyToolbar Toolbar
Definition: syspager.cpp:193
#define TRUE
Definition: types.h:120
CBalloonQueue m_BalloonQueue
Definition: syspager.cpp:195
#define WARN(fmt,...)
Definition: debug.h:112
BOOL AddTool(IN CONST TTTOOLINFOW *pInfo)
Definition: rosctrls.h:637
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
#define TTS_CLOSE
Definition: commctrl.h:1762
#define TTS_BALLOON
Definition: commctrl.h:1761
#define TTTOOLINFOW_V1_SIZE
Definition: commctrl.h:1721
#define L(x)
Definition: ntvdm.h:50
BOOL WINAPI SendNotifyMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
unsigned int BOOL
Definition: ntddk_ex.h:94
#define TTF_IDISHWND
Definition: commctrl.h:1764
#define TOOLINFOW
Definition: commctrl.h:1715
CTooltips m_Balloons
Definition: syspager.cpp:194
void Init(HWND hwndParent, CNotifyToolbar *toolbar, CTooltips *balloons)
Definition: syspager.cpp:510
#define TTF_TRACK
Definition: commctrl.h:1768
int ret
HWND m_hWnd
Definition: atlwin.h:267
HWND Create(HWND hWndParent, DWORD dwStyles=WS_POPUP|TTS_NOPREFIX, DWORD dwExStyles=WS_EX_TOPMOST)
Definition: rosctrls.h:616
UINT WINAPI RegisterWindowMessageW(_In_ LPCWSTR)
#define NULL
Definition: types.h:112
bool Initialize(_In_ HWND hWndParent)
Definition: syspager.cpp:285
#define HWND_BROADCAST
Definition: winuser.h:1194
#define TTS_NOPREFIX
Definition: commctrl.h:1758

◆ OnCtxMenu()

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

Definition at line 1514 of file syspager.cpp.

1515 {
1516  bHandled = TRUE;
1517  return 0;
1518 }
#define TRUE
Definition: types.h:120

◆ OnCustomDraw()

LRESULT CSysPagerWnd::OnCustomDraw ( INT  uCode,
LPNMHDR  hdr,
BOOL bHandled 
)

Definition at line 1424 of file syspager.cpp.

1425 {
1426  NMCUSTOMDRAW * cdraw = (NMCUSTOMDRAW *) hdr;
1427  switch (cdraw->dwDrawStage)
1428  {
1429  case CDDS_PREPAINT:
1430  return CDRF_NOTIFYITEMDRAW;
1431 
1432  case CDDS_ITEMPREPAINT:
1434  }
1435  return TRUE;
1436 }
char hdr[14]
Definition: iptest.cpp:33
#define TRUE
Definition: types.h:120
#define TBCDRF_NOOFFSET
Definition: commctrl.h:1035
#define CDDS_ITEMPREPAINT
Definition: commctrl.h:285
#define TBCDRF_NOEDGES
Definition: commctrl.h:1033
#define CDRF_NOTIFYITEMDRAW
Definition: commctrl.h:275
#define TBCDRF_NOETCHEDEFFECT
Definition: commctrl.h:1037
#define TBCDRF_NOMARK
Definition: commctrl.h:1036
#define CDDS_PREPAINT
Definition: commctrl.h:280
#define TBCDRF_NOBACKGROUND
Definition: commctrl.h:1040

◆ OnDestroy()

LRESULT CSysPagerWnd::OnDestroy ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1322 of file syspager.cpp.

1323 {
1326  return TRUE;
1327 }
#define TRUE
Definition: types.h:120
CBalloonQueue m_BalloonQueue
Definition: syspager.cpp:195
void Deinit()
Definition: syspager.cpp:517
void Uninitialize()
Definition: syspager.cpp:306

◆ OnEraseBackground()

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

Definition at line 1272 of file syspager.cpp.

1273 {
1274  HDC hdc = (HDC) wParam;
1275 
1276  if (!IsAppThemed())
1277  {
1278  bHandled = FALSE;
1279  return 0;
1280  }
1281 
1282  RECT rect;
1283  GetClientRect(&rect);
1285 
1286  return TRUE;
1287 }
#define TRUE
Definition: types.h:120
static HDC
Definition: imagelist.c:92
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
#define FALSE
Definition: types.h:117
BOOL WINAPI IsAppThemed(void)
Definition: system.c:596
BOOL GetClientRect(LPRECT lpRect) const
Definition: atlwin.h:535
HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
Definition: draw.c:72
HDC hdc
Definition: main.c:9
HWND m_hWnd
Definition: atlwin.h:267

◆ OnGetInfoTip()

LRESULT CSysPagerWnd::OnGetInfoTip ( INT  uCode,
LPNMHDR  hdr,
BOOL bHandled 
)

Definition at line 1417 of file syspager.cpp.

1418 {
1419  NMTBGETINFOTIPW * nmtip = (NMTBGETINFOTIPW *) hdr;
1420  GetTooltipText(nmtip->lParam, nmtip->pszText, nmtip->cchTextMax);
1421  return TRUE;
1422 }
char hdr[14]
Definition: iptest.cpp:33
#define TRUE
Definition: types.h:120
static VOID GetTooltipText(LPARAM data, LPTSTR szTip, DWORD cchTip)
Definition: syspager.cpp:1159

◆ OnGetMinimumSize()

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

Definition at line 1564 of file syspager.cpp.

1565 {
1567  return 0;
1568 }
WPARAM wParam
Definition: combotst.c:138
unsigned int BOOL
Definition: ntddk_ex.h:94
void GetSize(IN BOOL IsHorizontal, IN PSIZE size)
Definition: syspager.cpp:1382
LPARAM lParam
Definition: combotst.c:139

◆ OnSettingChanged()

LRESULT CSysPagerWnd::OnSettingChanged ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1555 of file syspager.cpp.

1556 {
1557  if (wParam == SPI_SETNONCLIENTMETRICS)
1558  {
1560  }
1561  return 0;
1562 }
CNotifyToolbar Toolbar
Definition: syspager.cpp:193
WPARAM wParam
Definition: combotst.c:138
VOID ResizeImagelist()
Definition: syspager.cpp:994

◆ OnSize()

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

Definition at line 1487 of file syspager.cpp.

1488 {
1489  LRESULT Ret = TRUE;
1490  SIZE szClient;
1491  szClient.cx = LOWORD(lParam);
1492  szClient.cy = HIWORD(lParam);
1493 
1494  Ret = DefWindowProc(uMsg, wParam, lParam);
1495 
1496  if (Toolbar)
1497  {
1498  Toolbar.SetWindowPos(NULL, 0, 0, szClient.cx, szClient.cy, SWP_NOZORDER);
1499  Toolbar.AutoSize();
1500 
1501  RECT rc;
1502  Toolbar.GetClientRect(&rc);
1503 
1504  SIZE szBar = { rc.right - rc.left, rc.bottom - rc.top };
1505 
1506  INT xOff = (szClient.cx - szBar.cx) / 2;
1507  INT yOff = (szClient.cy - szBar.cy) / 2;
1508 
1509  Toolbar.SetWindowPos(NULL, xOff, yOff, szBar.cx, szBar.cy, SWP_NOZORDER);
1510  }
1511  return Ret;
1512 }
CNotifyToolbar Toolbar
Definition: syspager.cpp:193
#define TRUE
Definition: types.h:120
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define SWP_NOZORDER
Definition: winuser.h:1237
LONG right
Definition: windef.h:308
int32_t INT
Definition: typedefs.h:58
WPARAM wParam
Definition: combotst.c:138
LRESULT DefWindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1606
LONG cx
Definition: windef.h:334
DWORD AutoSize()
Definition: rosctrls.h:378
#define NULL
Definition: types.h:112
#define HIWORD(l)
Definition: typedefs.h:247
LONG bottom
Definition: windef.h:309
LONG_PTR LRESULT
Definition: windef.h:209
LONG cy
Definition: windef.h:335
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82

◆ OnTimer()

LRESULT CSysPagerWnd::OnTimer ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 1527 of file syspager.cpp.

1528 {
1530  {
1531  bHandled = TRUE;
1532  }
1533 
1534  return 0;
1535 }
#define TRUE
Definition: types.h:120
CBalloonQueue m_BalloonQueue
Definition: syspager.cpp:195
WPARAM wParam
Definition: combotst.c:138
bool OnTimer(int timerId)
Definition: syspager.cpp:525

Member Data Documentation

◆ m_BalloonQueue

CBalloonQueue CSysPagerWnd::m_BalloonQueue
private

Definition at line 195 of file syspager.cpp.

Referenced by OnBalloonPop(), OnCreate(), OnDestroy(), and OnTimer().

◆ m_Balloons

CTooltips CSysPagerWnd::m_Balloons
private

Definition at line 194 of file syspager.cpp.

Referenced by OnCreate().

◆ Toolbar

CNotifyToolbar CSysPagerWnd::Toolbar
private

Definition at line 193 of file syspager.cpp.

Referenced by GetSize(), NotifyIcon(), OnCommand(), OnCreate(), OnSettingChanged(), and OnSize().


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