ReactOS 0.4.15-dev-8231-g29a56f3
CTrayShowDesktopButton Class Reference
Inheritance diagram for CTrayShowDesktopButton:
Collaboration diagram for CTrayShowDesktopButton:

Public Member Functions

 CTrayShowDesktopButton ()
 
INT WidthOrHeight () const
 
HRESULT DoCreate (HWND hwndParent)
 
LRESULT OnClick (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
VOID Click ()
 
LRESULT OnLButtonUp (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSettingChanged (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
VOID OnDraw (HDC hdc, LPRECT prc)
 
LRESULT OnPaint (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
BOOL PtInButton (POINT pt)
 
VOID StartHovering ()
 
LRESULT OnMouseMove (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnTimer (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnDestroy (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
- Public Member Functions inherited from ATL::CWindowImpl< CTrayShowDesktopButton, 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
 

Private Attributes

LONG m_nClickedTime
 
BOOL m_bHovering
 
HTHEME m_hTheme
 

Additional Inherited Members

- Public Types inherited from ATL::CWindowImplRoot< TBase >
enum  { WINSTATE_DESTROYED = 0x00000001 }
 
- Static Public Member Functions inherited from ATL::CWindowImpl< CTrayShowDesktopButton, 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::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 325 of file traywnd.cpp.

Constructor & Destructor Documentation

◆ CTrayShowDesktopButton()

CTrayShowDesktopButton::CTrayShowDesktopButton ( )
inline

Definition at line 335 of file traywnd.cpp.

336 {
337 }
#define FALSE
Definition: types.h:117

Member Function Documentation

◆ Click()

VOID CTrayShowDesktopButton::Click ( )
inline

Definition at line 374 of file traywnd.cpp.

375 {
376 // The actual action can be delayed as an expected behaviour.
378 PostMessage(TSDB_CLICK, 0, 0);
379 }
#define TSDB_CLICK
Definition: traywnd.cpp:371
LONG WINAPI GetMessageTime(void)
Definition: message.c:1361
#define PostMessage
Definition: winuser.h:5841

Referenced by CTrayWindow::CheckShowDesktopButtonClick(), and OnLButtonUp().

◆ DoCreate()

HRESULT CTrayShowDesktopButton::DoCreate ( HWND  hwndParent)
inline

Definition at line 346 of file traywnd.cpp.

347 {
350 if (!m_hWnd)
351 return E_FAIL;
352
353 ::SetWindowTheme(m_hWnd, L"TaskBar", NULL);
354 return S_OK;
355 }
Arabic default style
Definition: afstyles.h:94
@ Create
Definition: registry.c:563
HWND m_hWnd
Definition: atlwin.h:273
static HWND hwndParent
Definition: cryptui.c:300
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:52
#define L(x)
Definition: ntvdm.h:50
#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

Referenced by CTrayWindow::OnCreate(), and CTrayWindow::OnTaskbarSettingsChanged().

◆ OnClick()

LRESULT CTrayShowDesktopButton::OnClick ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 357 of file traywnd.cpp.

358 {
359 // The actual action can be delayed as an expected behaviour.
360 // But a too late action is an unexpected behaviour.
361 LONG nTime0 = m_nClickedTime;
362 LONG nTime1 = ::GetMessageTime();
363 if (nTime1 - nTime0 >= 600) // Ignore after 0.6 sec
364 return 0;
365
366 // Show/Hide Desktop
368 return 0;
369 }
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1116
CWindow GetParent() const
Definition: atlwin.h:700
long LONG
Definition: pedump.c:60
#define TRAYCMD_TOGGLE_DESKTOP
Definition: undocshell.h:836
#define WM_COMMAND
Definition: winuser.h:1740

◆ OnDestroy()

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

Definition at line 461 of file traywnd.cpp.

462 {
463 if (m_hTheme)
464 {
466 m_hTheme = NULL;
467 }
468 return 0;
469 }
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
Definition: system.c:950

◆ OnDraw()

VOID CTrayShowDesktopButton::OnDraw ( HDC  hdc,
LPRECT  prc 
)

Definition at line 483 of file traywnd.cpp.

484{
485 if (m_hTheme)
486 {
487 if (m_bHovering) // Draw a hot button
488 {
489 HTHEME hButtonTheme = ::OpenThemeData(m_hWnd, L"Button");
491 ::CloseThemeData(hButtonTheme);
492 }
493 else // Draw a taskbar background
494 {
496 }
497 }
498 else
499 {
500 RECT rc = *prc;
501 if (m_bHovering) // Draw a hot button
502 {
504 HBRUSH hbrHot = ::CreateSolidBrush(RGB(255, 255, 191));
505 ::FillRect(hdc, &rc, hbrHot);
506 ::DeleteObject(hbrHot);
507 }
508 else // Draw a flattish button
509 {
511 ::InflateRect(&rc, -1, -1);
513 }
514 }
515}
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
Definition: draw.c:128
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist)
Definition: system.c:835
#define RGB(r, g, b)
Definition: precomp.h:71
pKey DeleteObject()
HDC hdc
Definition: main.c:9
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
_Out_ LPRECT prc
Definition: ntgdi.h:1658
@ PBS_NORMAL
Definition: vsstyle.h:86
@ BP_PUSHBUTTON
Definition: vsstyle.h:74
@ TBP_BACKGROUNDTOP
Definition: vssym32.h:559
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
#define DFCS_BUTTONPUSH
Definition: winuser.h:501
BOOL WINAPI DrawFrameControl(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define DFC_BUTTON
Definition: winuser.h:476
#define DFCS_ADJUSTRECT
Definition: winuser.h:509
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define COLOR_3DFACE
Definition: winuser.h:929

Referenced by CTrayWindow::DrawShowDesktopButton(), and OnPaint().

◆ OnLButtonUp()

LRESULT CTrayShowDesktopButton::OnLButtonUp ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 381 of file traywnd.cpp.

382 {
383 Click(); // Left-click
384 return 0;
385 }

◆ OnMouseMove()

LRESULT CTrayShowDesktopButton::OnMouseMove ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 437 of file traywnd.cpp.

438 {
440 return 0;
441 }

◆ OnPaint()

LRESULT CTrayShowDesktopButton::OnPaint ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 400 of file traywnd.cpp.

401 {
402 RECT rc;
403 GetClientRect(&rc);
404
405 PAINTSTRUCT ps;
406 HDC hdc = BeginPaint(&ps);
407 OnDraw(hdc, &rc);
408 EndPaint(&ps);
409 return 0;
410 }
VOID OnDraw(HDC hdc, LPRECT prc)
Definition: traywnd.cpp:483
static HDC
Definition: imagelist.c:92
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)

◆ OnSettingChanged()

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

Definition at line 387 of file traywnd.cpp.

388 {
389 if (m_hTheme)
391
392 m_hTheme = ::OpenThemeData(m_hWnd, L"TaskBar");
394 return 0;
395 }
#define TRUE
Definition: types.h:120
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)

◆ OnTimer()

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

Definition at line 443 of file traywnd.cpp.

444 {
446 return 0;
447
448 POINT pt;
450 if (!PtInButton(pt)) // The end of hovering?
451 {
456 }
457
458 return 0;
459 }
BOOL PostMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1044
BOOL PtInButton(POINT pt)
Definition: traywnd.cpp:412
WPARAM wParam
Definition: combotst.c:138
#define pt(x, y)
Definition: drawing.c:79
#define SHOW_DESKTOP_TIMER_ID
Definition: traywnd.cpp:423
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2701
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define WM_NCPAINT
Definition: winuser.h:1687

◆ PtInButton()

BOOL CTrayShowDesktopButton::PtInButton ( POINT  pt)
inline

Definition at line 412 of file traywnd.cpp.

413 {
414 if (!IsWindow())
415 return FALSE;
416 RECT rc;
417 GetWindowRect(&rc);
419 ::InflateRect(&rc, max(cxEdge, 1), max(cyEdge, 1));
420 return ::PtInRect(&rc, pt);
421 }
BOOL IsWindow() const
Definition: atlwin.h:947
#define max(a, b)
Definition: svc.c:63
int32_t INT
Definition: typedefs.h:58
#define SM_CYEDGE
Definition: winuser.h:1009
#define SM_CXEDGE
Definition: winuser.h:1008
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI GetSystemMetrics(_In_ int)

Referenced by CTrayWindow::CheckShowDesktopButtonClick(), CTrayWindow::OnMouseMove(), and OnTimer().

◆ StartHovering()

VOID CTrayShowDesktopButton::StartHovering ( )
inline

Definition at line 426 of file traywnd.cpp.

427 {
428 if (m_bHovering)
429 return;
430
435 }
#define SHOW_DESKTOP_TIMER_INTERVAL
Definition: traywnd.cpp:424
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)

Referenced by OnMouseMove(), and CTrayWindow::OnMouseMove().

◆ WidthOrHeight()

INT CTrayShowDesktopButton::WidthOrHeight ( ) const
inline

Definition at line 339 of file traywnd.cpp.

340 {
341#define SHOW_DESKTOP_MINIMUM_WIDTH 3
343 return max(cxy, SHOW_DESKTOP_MINIMUM_WIDTH);
344 }
#define SHOW_DESKTOP_MINIMUM_WIDTH

Referenced by CTrayWindow::AlignControls().

Member Data Documentation

◆ m_bHovering

BOOL CTrayShowDesktopButton::m_bHovering
private

Definition at line 329 of file traywnd.cpp.

Referenced by OnDraw(), OnTimer(), and StartHovering().

◆ m_hTheme

HTHEME CTrayShowDesktopButton::m_hTheme
private

Definition at line 330 of file traywnd.cpp.

Referenced by OnDestroy(), OnDraw(), and OnSettingChanged().

◆ m_nClickedTime

LONG CTrayShowDesktopButton::m_nClickedTime
private

Definition at line 328 of file traywnd.cpp.

Referenced by Click(), and OnClick().


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