ReactOS 0.4.17-dev-806-gffa4164
CSysPagerWnd Class Reference
Inheritance diagram for CSysPagerWnd:
Collaboration diagram for CSysPagerWnd:

Public Member Functions

 CSysPagerWnd ()
 
virtual ~CSysPagerWnd ()
 
HWND GetTrayNotifyWindow () const
 
HWND GetTaskbarWindow () const
 
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)
 
STDMETHODIMP GetWindow (HWND *phwnd) override
 
STDMETHODIMP ContextSensitiveHelp (BOOL fEnterMode) override
 
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< 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 ()
 
- 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< 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< 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< 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 196 of file syspager.cpp.

Constructor & Destructor Documentation

◆ CSysPagerWnd()

CSysPagerWnd::CSysPagerWnd ( )

Definition at line 1315 of file syspager.cpp.

1315{}

◆ ~CSysPagerWnd()

CSysPagerWnd::~CSysPagerWnd ( )
virtual

Definition at line 1317 of file syspager.cpp.

1317{}

Member Function Documentation

◆ ContextSensitiveHelp()

STDMETHODIMP CSysPagerWnd::ContextSensitiveHelp ( BOOL  fEnterMode)
inlineoverride

Implements IOleWindow.

Definition at line 242 of file syspager.cpp.

243 {
244 return E_NOTIMPL;
245 }
#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 1438 of file syspager.cpp.

1439{
1440 /* Get the ideal height or width */
1441#if 0
1442 /* Unfortunately this doens't work correctly in ros */
1443 Toolbar.GetIdealSize(!IsHorizontal, size);
1444
1445 /* Make the reference dimension an exact multiple of the icon size */
1446 if (IsHorizontal)
1447 size->cy -= size->cy % GetSystemMetrics(SM_CYSMICON);
1448 else
1449 size->cx -= size->cx % GetSystemMetrics(SM_CXSMICON);
1450
1451#else
1452 INT rows = 0;
1453 INT columns = 0;
1454 INT cyButton = GetSystemMetrics(SM_CYSMICON) + 2;
1455 INT cxButton = GetSystemMetrics(SM_CXSMICON) + 2;
1457 {
1458 cyButton = MulDiv(GetSystemMetrics(SM_CYSMICON), 3, 2);
1459 cxButton = MulDiv(GetSystemMetrics(SM_CXSMICON), 3, 2);
1460 }
1461 int VisibleButtonCount = Toolbar.GetVisibleButtonCount();
1462
1463 if (IsHorizontal)
1464 {
1466 rows = max(size->cy / MulDiv(cyButton, 3, 2), 1);
1467 else
1468 rows = max(size->cy / cyButton, 1);
1469 columns = (VisibleButtonCount + rows - 1) / rows;
1470 }
1471 else
1472 {
1473 columns = max(size->cx / cxButton, 1);
1474 rows = (VisibleButtonCount + columns - 1) / columns;
1475 }
1476 size->cx = columns * cxButton;
1477 size->cy = rows * cyButton;
1478#endif
1479}
TaskbarSettings g_TaskbarSettings
Definition: settings.cpp:23
int GetVisibleButtonCount()
Definition: syspager.cpp:677
CNotifyToolbar Toolbar
Definition: syspager.cpp:203
GLsizeiptr size
Definition: glext.h:5919
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
BOOL UseCompactTrayIcons()
Definition: precomp.h:232
#define max(a, b)
Definition: svc.c:63
int32_t INT
Definition: typedefs.h:58
#define SM_CYSMICON
Definition: winuser.h:1024
#define SM_CXSMICON
Definition: winuser.h:1023
int WINAPI GetSystemMetrics(_In_ int)

Referenced by OnGetMinimumSize().

◆ GetTaskbarWindow()

HWND CSysPagerWnd::GetTaskbarWindow ( ) const
inline

Definition at line 212 of file syspager.cpp.

212{ return ::GetParent(GetTrayNotifyWindow()); }
HWND GetTrayNotifyWindow() const
Definition: syspager.cpp:211

Referenced by NotifyIcon().

◆ GetTrayNotifyWindow()

HWND CSysPagerWnd::GetTrayNotifyWindow ( ) const
inline

Definition at line 211 of file syspager.cpp.

211{ return GetParent(); }
CWindow GetParent() const
Definition: atlwin.h:700

◆ GetWindow()

STDMETHODIMP CSysPagerWnd::GetWindow ( HWND phwnd)
inlineoverride

Implements IOleWindow.

Definition at line 233 of file syspager.cpp.

234 {
235 if (!phwnd)
236 return E_INVALIDARG;
237 *phwnd = m_hWnd;
238 return S_OK;
239 }
HWND m_hWnd
Definition: atlwin.h:273
#define E_INVALIDARG
Definition: ddrawi.h:101
#define S_OK
Definition: intsafe.h:52

◆ Initialize()

HRESULT CSysPagerWnd::Initialize ( IN HWND  hWndParent)

Definition at line 1635 of file syspager.cpp.

1636{
1637 /* Create the window. The tray window is going to move it to the correct
1638 position and resize it as needed. */
1640 Create(hWndParent, 0, NULL, dwStyle);
1641 if (!m_hWnd)
1642 return E_FAIL;
1643
1644 SetWindowTheme(m_hWnd, L"TrayNotify", NULL);
1645
1646 return S_OK;
1647}
@ Create
Definition: registry.c:563
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define L(x)
Definition: resources.c:13
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
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Definition: uxthemesupp.c:69

◆ NotifyIcon()

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

Definition at line 1376 of file syspager.cpp.

1377{
1378 BOOL ret = FALSE;
1379
1380 int VisibleButtonCount = Toolbar.GetVisibleButtonCount();
1381
1382 TRACE("NotifyIcon received. Code=%d\n", dwMessage);
1383 switch (dwMessage)
1384 {
1385 case NIM_ADD:
1386 ret = Toolbar.AddButton(iconData);
1387 if (ret == TRUE)
1388 {
1389 (void)AddIconToWatcher(iconData);
1390 }
1391 break;
1392
1393 case NIM_MODIFY:
1394 ret = Toolbar.UpdateButton(iconData);
1395 break;
1396
1397 case NIM_DELETE:
1398 ret = Toolbar.RemoveButton(iconData);
1399 if (ret == TRUE)
1400 {
1401 (void)RemoveIconFromWatcher(iconData);
1402 }
1403 break;
1404
1405 case NIM_SETFOCUS:
1407 {
1409 int index = Toolbar.FindItem(iconData->hWnd, iconData->uID, &pData);
1410 if (index < 0 || (pData->dwState & NIS_HIDDEN))
1412 Toolbar.SetFocus();
1413 Toolbar.SetHotItem(index);
1414 }
1415 ret = TRUE;
1416 break;
1417
1418 case NIM_SETVERSION:
1419 ret = Toolbar.SwitchVersion(iconData);
1420 break;
1421
1422 default:
1423 TRACE("NotifyIcon received with unknown code %d.\n", dwMessage);
1424 return FALSE;
1425 }
1426
1427 if (VisibleButtonCount != Toolbar.GetVisibleButtonCount())
1428 {
1429 /* Ask the parent to resize */
1430 NMHDR nmh = {GetParent(), 0, NTNWM_REALIGN};
1431 // FIXME: This causes the desktop icons to flash (InvalidateRect?)
1432 GetParent().SendMessage(WM_NOTIFY, 0, (LPARAM) &nmh);
1433 }
1434
1435 return ret;
1436}
#define NTNWM_REALIGN
Definition: precomp.h:384
HWND SetFocus()
Definition: atlwin.h:1198
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1116
bool RemoveIconFromWatcher(_In_ CONST NOTIFYICONDATA *iconData)
Definition: syspager.cpp:385
bool AddIconToWatcher(_In_ CONST NOTIFYICONDATA *iconData)
Definition: syspager.cpp:346
BOOL RemoveButton(IN CONST NOTIFYICONDATA *iconData)
Definition: syspager.cpp:958
BOOL UpdateButton(IN CONST NOTIFYICONDATA *iconData)
Definition: syspager.cpp:853
int FindItem(IN HWND hWnd, IN UINT uID, InternalIconData **pdata)
Definition: syspager.cpp:694
BOOL AddButton(IN CONST NOTIFYICONDATA *iconData)
Definition: syspager.cpp:731
BOOL SwitchVersion(IN CONST NOTIFYICONDATA *iconData)
Definition: syspager.cpp:830
int GetFirstVisibleIndex()
Definition: syspager.cpp:682
HWND GetTaskbarWindow() const
Definition: syspager.cpp:212
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
return ret
Definition: mutex.c:147
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint index
Definition: glext.h:6031
LONG_PTR LPARAM
Definition: minwindef.h:175
#define WM_NOTIFY
Definition: richedit.h:61
#define NIM_DELETE
Definition: shellapi.h:96
#define NIM_MODIFY
Definition: shellapi.h:95
#define NIM_ADD
Definition: shellapi.h:94
#define TRACE(s)
Definition: solgame.cpp:4
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
BOOL WINAPI SetForegroundWindow(_In_ HWND)

Referenced by OnCopyData().

◆ OnBalloonPop()

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

Definition at line 1585 of file syspager.cpp.

1586{
1588 bHandled = TRUE;
1589 return 0;
1590}
void CloseCurrent()
Definition: syspager.cpp:596
CBalloonQueue m_BalloonQueue
Definition: syspager.cpp:205

◆ OnCommand()

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

Definition at line 1502 of file syspager.cpp.

1503{
1504 bHandled = FALSE;
1505
1506 /* Handles the BN_CLICKED notifications sent by the CNotifyToolbar member */
1507 if (HIWORD(wParam) != BN_CLICKED)
1508 return 0;
1509
1510 INT iBtn = LOWORD(wParam);
1511 if (iBtn < 0)
1512 return 0;
1513
1514 InternalIconData* notifyItem = Toolbar.GetItemData(iBtn);
1515
1516 if (!::IsWindow(notifyItem->hWnd))
1517 return 0;
1518
1519 // TODO: Improve keyboard handling by looking whether one presses
1520 // on ENTER, etc..., which roughly translates into "double-clicking".
1521
1522 if (notifyItem->GetVersion() >= NOTIFYICON_VERSION)
1523 {
1524 /* Use new-style notifications if the notification icon supports them */
1525 ::SendNotifyMessage(notifyItem->hWnd,
1526 notifyItem->uCallbackMessage,
1527 notifyItem->uID,
1528 NIN_SELECT); // TODO: Distinguish with NIN_KEYSELECT
1529 }
1530 else if (lParam == -1)
1531 {
1532 /*
1533 * Otherwise, and only if the icon was selected via the keyboard,
1534 * simulate right-click mouse messages. This is not needed if the
1535 * selection was done by mouse because in this case the mouse
1536 * messages were already sent.
1537 */
1538 ::SendNotifyMessage(notifyItem->hWnd,
1539 notifyItem->uCallbackMessage,
1540 notifyItem->uID,
1541 WM_LBUTTONDOWN); // TODO: Distinguish with double-click WM_LBUTTONDBLCLK
1542 ::SendNotifyMessage(notifyItem->hWnd,
1543 notifyItem->uCallbackMessage,
1544 notifyItem->uID,
1545 WM_LBUTTONUP);
1546 }
1547
1548 return 0;
1549}
BOOL IsWindow() const
Definition: atlwin.h:947
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
UINT GetVersion() const
Definition: syspager.cpp:32
UINT uCallbackMessage
Definition: shellapi.h:231
#define HIWORD(l)
Definition: typedefs.h:247
#define WM_LBUTTONDOWN
Definition: winuser.h:1804
#define WM_LBUTTONUP
Definition: winuser.h:1805
#define BN_CLICKED
Definition: winuser.h:1954
#define SendNotifyMessage
Definition: winuser.h:6012

◆ OnCopyData()

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

Definition at line 1602 of file syspager.cpp.

1603{
1605 if (cpData->dwData == TABDMC_NOTIFY)
1606 {
1607 /* A taskbar NotifyIcon notification */
1608 PTRAYNOTIFYDATAW pData = (PTRAYNOTIFYDATAW)cpData->lpData;
1609 if (pData->dwSignature == NI_NOTIFY_SIG)
1610 return NotifyIcon(pData->dwMessage, &pData->nid);
1611 }
1612 else if (cpData->dwData == TABDMC_LOADINPROC)
1613 {
1614 FIXME("Taskbar Load In Proc\n");
1615 }
1616
1617 return FALSE;
1618}
#define FIXME(fmt,...)
Definition: precomp.h:53
BOOL NotifyIcon(DWORD dwMessage, _In_ CONST NOTIFYICONDATA *iconData)
Definition: syspager.cpp:1376
if(dx< 0)
Definition: linetemp.h:194
ULONG_PTR dwData
Definition: winuser.h:3109
#define TABDMC_LOADINPROC
Definition: undocshell.h:1026
#define TABDMC_NOTIFY
Definition: undocshell.h:1025
struct tagCOPYDATASTRUCT * PCOPYDATASTRUCT

◆ OnCreate()

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

Definition at line 1336 of file syspager.cpp.

1337{
1340
1341 HWND hWndTop = GetAncestor(m_hWnd, GA_ROOT);
1342
1344
1345 TOOLINFOW ti = { 0 };
1346 ti.cbSize = TTTOOLINFOW_V1_SIZE;
1347 ti.uFlags = TTF_TRACK | TTF_IDISHWND;
1348 ti.uId = reinterpret_cast<UINT_PTR>(Toolbar.m_hWnd);
1349 ti.hwnd = m_hWnd;
1350 ti.lpszText = NULL;
1351 ti.lParam = NULL;
1352
1353 BOOL ret = m_Balloons.AddTool(&ti);
1354 if (!ret)
1355 {
1356 WARN("AddTool failed, LastError=%d (probably meaningless unless non-zero)\n", GetLastError());
1357 }
1358
1360
1361 // Explicitly request running applications to re-register their systray icons
1363 RegisterWindowMessageW(L"TaskbarCreated"),
1364 0, 0);
1365
1366 return TRUE;
1367}
#define WARN(fmt,...)
Definition: precomp.h:61
void Init(HWND hwndParent, CNotifyToolbar *toolbar, CTooltips *balloons)
Definition: syspager.cpp:519
bool Initialize(_In_ HWND hWndParent)
Definition: syspager.cpp:301
void Initialize(HWND hWndParent, CBalloonQueue *queue)
Definition: syspager.cpp:1257
CTooltips m_Balloons
Definition: syspager.cpp:204
BOOL AddTool(IN CONST TTTOOLINFOW *pInfo)
Definition: rosctrls.h:642
HWND Create(HWND hWndParent, DWORD dwStyles=WS_POPUP|TTS_NOPREFIX, DWORD dwExStyles=WS_EX_TOPMOST)
Definition: rosctrls.h:621
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
#define TOOLINFOW
Definition: commctrl.h:1715
#define TTTOOLINFOW_V1_SIZE
Definition: commctrl.h:1721
#define TTF_IDISHWND
Definition: commctrl.h:1764
#define TTS_NOPREFIX
Definition: commctrl.h:1758
#define TTF_TRACK
Definition: commctrl.h:1768
#define TTS_CLOSE
Definition: commctrl.h:1762
#define TTS_BALLOON
Definition: commctrl.h:1761
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
BOOL WINAPI SendNotifyMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GA_ROOT
Definition: winuser.h:2893
#define HWND_BROADCAST
Definition: winuser.h:1215
UINT WINAPI RegisterWindowMessageW(_In_ LPCWSTR)
HWND WINAPI GetAncestor(_In_ HWND, _In_ UINT)
Definition: window.c:929

◆ OnCtxMenu()

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

Definition at line 1579 of file syspager.cpp.

1580{
1581 bHandled = TRUE;
1582 return 0;
1583}

◆ OnCustomDraw()

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

Definition at line 1488 of file syspager.cpp.

1489{
1490 NMCUSTOMDRAW * cdraw = (NMCUSTOMDRAW *) hdr;
1491 switch (cdraw->dwDrawStage)
1492 {
1493 case CDDS_PREPAINT:
1494 return CDRF_NOTIFYITEMDRAW;
1495
1496 case CDDS_ITEMPREPAINT:
1498 }
1499 return TRUE;
1500}
char hdr[14]
Definition: iptest.cpp:33
#define CDDS_ITEMPREPAINT
Definition: commctrl.h:285
#define TBCDRF_NOEDGES
Definition: commctrl.h:1033
#define CDRF_NOTIFYITEMDRAW
Definition: commctrl.h:275
#define TBCDRF_NOOFFSET
Definition: commctrl.h:1035
#define TBCDRF_NOBACKGROUND
Definition: commctrl.h:1040
#define TBCDRF_NOETCHEDEFFECT
Definition: commctrl.h:1037
#define CDDS_PREPAINT
Definition: commctrl.h:280
#define TBCDRF_NOMARK
Definition: commctrl.h:1036

◆ OnDestroy()

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

Definition at line 1369 of file syspager.cpp.

1370{
1373 return TRUE;
1374}
void Deinit()
Definition: syspager.cpp:526
void Uninitialize()
Definition: syspager.cpp:322

◆ OnEraseBackground()

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

Definition at line 1319 of file syspager.cpp.

1320{
1321 HDC hdc = (HDC) wParam;
1322
1323 if (!IsAppThemed())
1324 {
1325 bHandled = FALSE;
1326 return 0;
1327 }
1328
1329 RECT rect;
1332
1333 return TRUE;
1334}
RECT rect
Definition: combotst.c:67
HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
Definition: draw.c:72
BOOL WINAPI IsAppThemed(void)
Definition: system.c:620
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:88
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)

◆ OnGetInfoTip()

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

Definition at line 1481 of file syspager.cpp.

1482{
1483 NMTBGETINFOTIPW * nmtip = (NMTBGETINFOTIPW *) hdr;
1484 GetTooltipText(nmtip->lParam, nmtip->pszText, nmtip->cchTextMax);
1485 return TRUE;
1486}
static VOID GetTooltipText(LPARAM data, LPTSTR szTip, DWORD cchTip)
Definition: syspager.cpp:1191

◆ OnGetMinimumSize()

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

Definition at line 1629 of file syspager.cpp.

1630{
1632 return 0;
1633}
void GetSize(IN BOOL IsHorizontal, IN PSIZE size)
Definition: syspager.cpp:1438

◆ OnSettingChanged()

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

Definition at line 1620 of file syspager.cpp.

1621{
1622 if (wParam == SPI_SETNONCLIENTMETRICS)
1623 {
1625 }
1626 return 0;
1627}
VOID ResizeImagelist()
Definition: syspager.cpp:1015

◆ OnSize()

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

Definition at line 1551 of file syspager.cpp.

1552{
1553 LRESULT Ret = TRUE;
1554 SIZE szClient;
1555 szClient.cx = LOWORD(lParam);
1556 szClient.cy = HIWORD(lParam);
1557
1558 Ret = DefWindowProc(uMsg, wParam, lParam);
1559
1560 if (Toolbar)
1561 {
1562 Toolbar.SetWindowPos(NULL, 0, 0, szClient.cx, szClient.cy, SWP_NOZORDER);
1563 Toolbar.AutoSize();
1564
1565 RECT rc;
1567
1568 SIZE szBar = { rc.right - rc.left, rc.bottom - rc.top };
1569
1570 INT xOff = (szClient.cx - szBar.cx) / 2;
1571 INT yOff = (szClient.cy - szBar.cy) / 2;
1572
1573 Toolbar.SetWindowPos(NULL, xOff, yOff, szBar.cx, szBar.cy, SWP_NOZORDER);
1575 }
1576 return Ret;
1577}
BOOL SetWindowPos(HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
Definition: atlwin.h:1288
BOOL GetClientRect(LPRECT lpRect) const
Definition: atlwin.h:541
void RefreshToolbarMetrics(BOOL bForceRefresh)
Definition: syspager.cpp:1288
LONG_PTR LRESULT
Definition: minwindef.h:176
#define DefWindowProc
Definition: ros2win.h:31
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
LONG right
Definition: windef.h:108
LONG bottom
Definition: windef.h:109
LONG top
Definition: windef.h:107
LONG left
Definition: windef.h:106
#define SWP_NOZORDER
Definition: winuser.h:1258

◆ OnTimer()

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

Definition at line 1592 of file syspager.cpp.

1593{
1595 {
1596 bHandled = TRUE;
1597 }
1598
1599 return 0;
1600}
bool OnTimer(int timerId)
Definition: syspager.cpp:534

Member Data Documentation

◆ m_BalloonQueue

CBalloonQueue CSysPagerWnd::m_BalloonQueue
private

Definition at line 205 of file syspager.cpp.

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

◆ m_Balloons

CTooltips CSysPagerWnd::m_Balloons
private

Definition at line 204 of file syspager.cpp.

Referenced by OnCreate().

◆ Toolbar

CNotifyToolbar CSysPagerWnd::Toolbar
private

Definition at line 203 of file syspager.cpp.

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


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