ReactOS 0.4.15-dev-7906-g1b85a5f
CTrayWindow Class Reference
Inheritance diagram for CTrayWindow:
Collaboration diagram for CTrayWindow:

Classes

struct  MINIMIZE_INFO
 

Public Member Functions

 CTrayWindow ()
 
virtual ~CTrayWindow ()
 
HRESULT ExecResourceCmd (int id)
 
LRESULT DoExitWindows ()
 
DWORD WINAPI RunFileDlgThread ()
 
void DisplayRunFileDlg ()
 
DWORD WINAPI TrayPropertiesThread ()
 
HWND STDMETHODCALLTYPE DisplayProperties ()
 
VOID OpenCommonStartMenuDirectory (IN HWND hWndOwner, IN LPCTSTR lpOperation)
 
VOID OpenTaskManager (IN HWND hWndOwner)
 
VOID ToggleDesktop ()
 
BOOL STDMETHODCALLTYPE ExecContextMenuCmd (IN UINT uiCmd)
 
VOID HideStartMenu ()
 
LRESULT HandleHotKey (DWORD id)
 
LRESULT HandleCommand (UINT uCommand)
 
UINT TrackMenu (IN HMENU hMenu, IN POINT *ppt OPTIONAL, IN HWND hwndExclude OPTIONAL, IN BOOL TrackUp, IN BOOL IsContextMenu)
 
HRESULT TrackCtxMenu (IN IContextMenu *contextMenu, IN POINT *ppt OPTIONAL, IN HWND hwndExclude OPTIONAL, IN BOOL TrackUp, IN PVOID Context OPTIONAL)
 
void UpdateFonts ()
 
HMONITOR GetScreenRectFromRect (IN OUT RECT *pRect, IN DWORD dwFlags)
 
HMONITOR GetMonitorFromRect (IN const RECT *pRect)
 
HMONITOR GetScreenRect (IN HMONITOR hMonitor, IN OUT RECT *pRect)
 
VOID AdjustSizerRect (RECT *rc, DWORD pos)
 
VOID MakeTrayRectWithSize (IN DWORD Position, IN const SIZE *pTraySize, IN OUT RECT *pRect)
 
VOID GetTrayRectFromScreenRect (IN DWORD Position, IN const RECT *pScreen, IN const SIZE *pTraySize OPTIONAL, OUT RECT *pRect)
 
BOOL IsPosHorizontal ()
 
HMONITOR CalculateValidSize (IN DWORD Position, IN OUT RECT *pRect)
 
DWORD GetDraggingRectFromPt (IN POINT pt, OUT RECT *pRect, OUT HMONITOR *phMonitor)
 
DWORD GetDraggingRectFromRect (IN OUT RECT *pRect, OUT HMONITOR *phMonitor)
 
VOID ChangingWinPos (IN OUT LPWINDOWPOS pwp)
 
VOID ApplyClipping (IN BOOL Clip)
 
VOID ResizeWorkArea ()
 
VOID CheckTrayWndPosition ()
 
VOID RegLoadSettings ()
 
VOID AlignControls (IN PRECT prcClient OPTIONAL)
 
void FitToRebar (PRECT pRect)
 
void PopupStartMenu ()
 
void ProcessMouseTracking ()
 
void ProcessAutoHide ()
 
LRESULT EraseBackgroundWithTheme (HDC hdc)
 
int DrawSizerWithTheme (IN HRGN hRgn)
 
HRESULT STDMETHODCALLTYPE Open ()
 
HRESULT STDMETHODCALLTYPE Close ()
 
HWND STDMETHODCALLTYPE GetHWND ()
 
BOOL STDMETHODCALLTYPE IsSpecialHWND (IN HWND hWnd)
 
BOOL STDMETHODCALLTYPE IsHorizontal ()
 
BOOL STDMETHODCALLTYPE Lock (IN BOOL bLock)
 
BOOL STDMETHODCALLTYPE IsTaskWnd (HWND hWnd)
 
HRESULT STDMETHODCALLTYPE QueryContextMenu (HMENU hPopup, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
 
HRESULT STDMETHODCALLTYPE InvokeCommand (LPCMINVOKECOMMANDINFO lpici)
 
HRESULT STDMETHODCALLTYPE GetCommandString (UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax)
 
LRESULT OnCreate (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnDestroy (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnThemeChanged (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSettingChanged (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnEraseBackground (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnDisplayChange (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCopyData (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
void DrawShowDesktopButton ()
 
LRESULT OnNcPaint (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCtlColorBtn (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNcHitTest (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnMoving (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSizing (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnWindowPosChanging (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSize (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnEnterSizeMove (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnExitSizeMove (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSysChar (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNcLButtonDown (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNcRButtonUp (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnContextMenu (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNotify (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
BOOL CheckShowDesktopButtonClick (LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNcLButtonDblClick (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNcLButtonUp (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnAppTrayDestroy (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnOpenStartMenu (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnDoExitWindows (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSysCommand (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnGetTaskSwitch (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
void RestoreMinimizedNonTaskWnds (BOOL bDestroyed, HWND hwndActive)
 
LRESULT OnPulse (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnHotkey (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
VOID MinimizeAll (BOOL bShowDesktop=FALSE)
 
VOID ShowDesktop ()
 
VOID RestoreAll ()
 
LRESULT OnCommand (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnMouseMove (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnTimer (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNcActivate (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNcCalcSize (INT code, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnInitMenuPopup (INT code, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnRebarAutoSize (INT code, LPNMHDR nmhdr, BOOL &bHandled)
 
LRESULT OnTaskbarSettingsChanged (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
 if (m_StartMenuBand !=NULL)
 
VOID TrayProcessMessages ()
 
VOID TrayMessageLoop ()
 
virtual ULONG STDMETHODCALLTYPE GetState ()
 
virtual HRESULT STDMETHODCALLTYPE GetTrayWindow (OUT HWND *phWndTray)
 
virtual HRESULT STDMETHODCALLTYPE RegisterDesktopWindow (IN HWND hWndDesktop)
 
virtual HRESULT STDMETHODCALLTYPE Unknown (IN DWORD dwUnknown1, IN DWORD dwUnknown2)
 
virtual HRESULT RaiseStartButton ()
 
HRESULT WINAPI GetWindow (HWND *phwnd)
 
HRESULT WINAPI ContextSensitiveHelp (BOOL fEnterMode)
 
void _Init ()
 
- 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< CTrayWindow, 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 ()
 
HRESULT QueryContextMenu ([in] HMENU hmenu, [in] UINT indexMenu, [in] UINT idCmdFirst, [in] UINT idCmdLast, [in] UINT uFlags)
 
HRESULT InvokeCommand ([in] LPCMINVOKECOMMANDINFO lpici)
 
HRESULT GetCommandString ([in] UINT_PTR idCmd, [in] UINT uType, [out] UINT *pwReserved, [out, size_is(cchMax)] LPSTR pszName, [in] UINT cchMax)
 

Static Public Member Functions

static DWORD WINAPI s_RunFileDlgThread (IN OUT PVOID pParam)
 
static DWORD WINAPI s_TrayPropertiesThread (IN OUT PVOID pParam)
 
static BOOL IsDialog (HWND hwnd)
 
static BOOL CALLBACK MinimizeWindowsProc (HWND hwnd, LPARAM lParam)
 
- Static Public Member Functions inherited from ATL::CComCoClass< CTrayWindow >
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< CTrayWindow, 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

CComPtr< ITrayBandSite > m_TrayBandSite
 
union {
   DWORD   Flags
 
   struct {
      DWORD   InSizeMove: 1
 
      DWORD   IsDragging: 1
 
      DWORD   NewPosSize: 1
 
      DWORD   IgnorePulse: 1
 
   } 
 
}; 
 
- 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
 

Private Attributes

CStartButton m_StartButton
 
CTrayShowDesktopButton m_ShowDesktopButton
 
CComPtr< IMenuBandm_StartMenuBand
 
CComPtr< IMenuPopupm_StartMenuPopup
 
CComPtr< IDeskBandm_TaskBand
 
CComPtr< IContextMenum_ContextMenu
 
HTHEME m_Theme
 
HFONT m_Font
 
HWND m_DesktopWnd
 
HWND m_Rebar
 
HWND m_TaskSwitch
 
HWND m_TrayNotify
 
CComPtr< IUnknownm_TrayNotifyInstance
 
DWORD m_Position
 
HMONITOR m_Monitor
 
HMONITOR m_PreviousMonitor
 
DWORD m_DraggingPosition
 
HMONITOR m_DraggingMonitor
 
RECT m_TrayRects [4]
 
SIZE m_TraySize
 
HWND m_TrayPropertiesOwner
 
HWND m_RunFileDlgOwner
 
UINT m_AutoHideState
 
SIZE m_AutoHideOffset
 
TRACKMOUSEEVENT m_MouseTrackingInfo
 
HDPA m_ShellServices
 

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
 
- Public Types inherited from IContextMenu
typedef IContextMenuLPCONTEXTMENU
 
typedef struct IContextMenu::tagCMINVOKECOMMANDINFO CMINVOKECOMMANDINFO
 
typedef struct IContextMenu::tagCMINVOKECOMMANDINFOLPCMINVOKECOMMANDINFO
 
typedef struct IContextMenu::tagCMInvokeCommandInfoEx CMINVOKECOMMANDINFOEX
 
typedef struct IContextMenu::tagCMInvokeCommandInfoExLPCMINVOKECOMMANDINFOEX
 
- Static Public Attributes inherited from ATL::CWindow
static RECT rcDefault
 
- Static Public Attributes inherited from IContextMenu
static const WCHAR CMDSTR_NEWFOLDERW [] = {'N','e','w','F','o','l','d','e','r',0}
 
static const WCHAR CMDSTR_VIEWLISTW [] = {'V','i','e','w','L','i','s','t',0}
 
static const WCHAR CMDSTR_VIEWDETAILSW [] = {'V','i','e','w','D','e','t','a','i','l','s',0}
 

Detailed Description

Definition at line 517 of file traywnd.cpp.

Constructor & Destructor Documentation

◆ CTrayWindow()

CTrayWindow::CTrayWindow ( )
inline

Definition at line 580 of file traywnd.cpp.

580 :
583 m_Theme(NULL),
584 m_Font(NULL),
586 m_Rebar(NULL),
589 m_Position(0),
598 Flags(0)
599 {
605 }
CTrayShowDesktopButton m_ShowDesktopButton
Definition: traywnd.cpp:527
DWORD m_DraggingPosition
Definition: traywnd.cpp:548
HWND m_TaskSwitch
Definition: traywnd.cpp:540
DWORD Flags
Definition: traywnd.cpp:568
HWND m_Rebar
Definition: traywnd.cpp:539
HMONITOR m_Monitor
Definition: traywnd.cpp:546
DWORD IgnorePulse
Definition: traywnd.cpp:575
CStartButton m_StartButton
Definition: traywnd.cpp:526
DWORD m_Position
Definition: traywnd.cpp:545
HTHEME m_Theme
Definition: traywnd.cpp:534
TRACKMOUSEEVENT m_MouseTrackingInfo
Definition: traywnd.cpp:559
HMONITOR m_PreviousMonitor
Definition: traywnd.cpp:547
HDPA m_ShellServices
Definition: traywnd.cpp:561
SIZE m_TraySize
Definition: traywnd.cpp:552
RECT m_TrayRects[4]
Definition: traywnd.cpp:551
HMONITOR m_DraggingMonitor
Definition: traywnd.cpp:549
UINT m_AutoHideState
Definition: traywnd.cpp:557
HWND m_TrayPropertiesOwner
Definition: traywnd.cpp:554
SIZE m_AutoHideOffset
Definition: traywnd.cpp:558
HWND m_RunFileDlgOwner
Definition: traywnd.cpp:555
HFONT m_Font
Definition: traywnd.cpp:536
HWND m_DesktopWnd
Definition: traywnd.cpp:538
HWND m_TrayNotify
Definition: traywnd.cpp:541
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define ZeroMemory
Definition: winbase.h:1712

◆ ~CTrayWindow()

virtual CTrayWindow::~CTrayWindow ( )
inlinevirtual

Definition at line 607 of file traywnd.cpp.

608 {
609 if (m_ShellServices != NULL)
610 {
613 }
614
615 if (m_Font != NULL)
616 {
618 m_Font = NULL;
619 }
620
621 if (m_Theme)
622 {
624 m_Theme = NULL;
625 }
626
628 }
HRESULT ShutdownShellServices(HDPA hdpa)
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
Definition: system.c:950
pKey DeleteObject()
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)

Member Function Documentation

◆ _Init()

void CTrayWindow::_Init ( )
inline

Definition at line 3721 of file traywnd.cpp.

3722 {
3723 m_Position = (DWORD) -1;
3724 }
#define DWORD
Definition: nt_native.h:44

◆ AdjustSizerRect()

VOID CTrayWindow::AdjustSizerRect ( RECT rc,
DWORD  pos 
)
inline

Definition at line 1332 of file traywnd.cpp.

1333 {
1335 SIZE size;
1336
1337 if (pos > ABE_BOTTOM)
1338 pos = ABE_BOTTOM;
1339
1340 HRESULT hr = GetThemePartSize(m_Theme, NULL, iSizerPart[pos], 0, NULL, TS_TRUE, &size);
1342 return;
1343
1344 switch (pos)
1345 {
1346 case ABE_TOP:
1347 rc->bottom -= size.cy;
1348 break;
1349 case ABE_BOTTOM:
1350 rc->top += size.cy;
1351 break;
1352 case ABE_LEFT:
1353 rc->right -= size.cx;
1354 break;
1355 case ABE_RIGHT:
1356 rc->left += size.cx;
1357 break;
1358 }
1359 }
@ TS_TRUE
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
HRESULT WINAPI GetThemePartSize(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, RECT *prc, THEMESIZE eSize, SIZE *psz)
Definition: draw.c:1777
GLsizeiptr size
Definition: glext.h:5919
#define ABE_BOTTOM
Definition: shellapi.h:20
#define ABE_RIGHT
Definition: shellapi.h:19
#define ABE_TOP
Definition: shellapi.h:18
#define ABE_LEFT
Definition: shellapi.h:17
HRESULT hr
Definition: shlfolder.c:183
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
@ TBP_SIZINGBARRIGHT
Definition: vssym32.h:562
@ TBP_SIZINGBARBOTTOM
Definition: vssym32.h:561
@ TBP_SIZINGBARLEFT
Definition: vssym32.h:564
@ TBP_SIZINGBARTOP
Definition: vssym32.h:563

Referenced by Lock(), and OnNcCalcSize().

◆ AlignControls()

VOID CTrayWindow::AlignControls ( IN PRECT prcClient  OPTIONAL)
inline

Definition at line 1871 of file traywnd.cpp.

1872 {
1873 RECT rcClient;
1874 SIZE TraySize, StartSize;
1875 POINT ptTrayNotify = { 0, 0 };
1876 BOOL Horizontal;
1877 HDWP dwp;
1878
1880 if (prcClient != NULL)
1881 {
1882 rcClient = *prcClient;
1883 }
1884 else
1885 {
1886 if (!GetClientRect(&rcClient))
1887 {
1888 ERR("Could not get client rect lastErr=%d\n", GetLastError());
1889 return;
1890 }
1891 }
1892
1893 Horizontal = IsPosHorizontal();
1894
1895 /* We're about to resize/move the start button, the rebar control and
1896 the tray notification control */
1897 dwp = BeginDeferWindowPos(4);
1898 if (dwp == NULL)
1899 {
1900 ERR("BeginDeferWindowPos failed. lastErr=%d\n", GetLastError());
1901 return;
1902 }
1903
1904 /* Limit the Start button width to the client width, if necessary */
1905 StartSize = m_StartButton.GetSize();
1906 if (StartSize.cx > rcClient.right)
1907 StartSize.cx = rcClient.right;
1908
1909 HWND hwndTaskToolbar = ::GetWindow(m_TaskSwitch, GW_CHILD);
1910 if (hwndTaskToolbar)
1911 {
1912 DWORD size = SendMessageW(hwndTaskToolbar, TB_GETBUTTONSIZE, 0, 0);
1913
1914 /* Themed button covers Edge area as well */
1915 StartSize.cy = HIWORD(size) + (m_Theme ? GetSystemMetrics(SM_CYEDGE) : 0);
1916 }
1917
1918 if (m_StartButton.m_hWnd != NULL)
1919 {
1920 /* Resize and reposition the button */
1921 dwp = m_StartButton.DeferWindowPos(dwp,
1922 NULL,
1923 0,
1924 0,
1925 StartSize.cx,
1926 StartSize.cy,
1928 if (dwp == NULL)
1929 {
1930 ERR("DeferWindowPos for start button failed. lastErr=%d\n", GetLastError());
1931 return;
1932 }
1933 }
1934
1936 {
1937 // Get rectangle from rcClient
1938 RECT rc = rcClient;
1939 INT cxyShowDesktop = m_ShowDesktopButton.WidthOrHeight();
1940 if (Horizontal)
1941 {
1942 rc.left = rc.right - cxyShowDesktop;
1943 rc.right += 5; // excessive
1944 }
1945 else
1946 {
1947 rc.top = rc.bottom - cxyShowDesktop;
1948 rc.bottom += 5; // excessive
1949 }
1950
1951 /* Resize and reposition the button */
1953 rc.left, rc.top,
1954 rc.right - rc.left, rc.bottom - rc.top,
1956
1957 // Adjust rcClient
1958 if (Horizontal)
1959 rcClient.right -= cxyShowDesktop + ::GetSystemMetrics(SM_CXEDGE);
1960 else
1961 rcClient.bottom -= cxyShowDesktop + ::GetSystemMetrics(SM_CYEDGE);
1962 }
1963
1964 /* Determine the size that the tray notification window needs */
1965 if (Horizontal)
1966 {
1967 TraySize.cx = 0;
1968 TraySize.cy = rcClient.bottom;
1969 }
1970 else
1971 {
1972 TraySize.cx = rcClient.right;
1973 TraySize.cy = 0;
1974 }
1975
1976 if (m_TrayNotify != NULL &&
1979 (WPARAM)Horizontal,
1980 (LPARAM)&TraySize))
1981 {
1982 /* Move the tray notification window to the desired location */
1983 if (Horizontal)
1984 ptTrayNotify.x = rcClient.right - TraySize.cx;
1985 else
1986 ptTrayNotify.y = rcClient.bottom - TraySize.cy;
1987
1988 dwp = ::DeferWindowPos(dwp,
1990 NULL,
1991 ptTrayNotify.x,
1992 ptTrayNotify.y,
1993 TraySize.cx,
1994 TraySize.cy,
1996 if (dwp == NULL)
1997 {
1998 ERR("DeferWindowPos for notification area failed. lastErr=%d\n", GetLastError());
1999 return;
2000 }
2001 }
2002
2003 /* Resize/Move the rebar control */
2004 if (m_Rebar != NULL)
2005 {
2006 POINT ptRebar = { 0, 0 };
2007 SIZE szRebar;
2008
2009 SetWindowStyle(m_Rebar, CCS_VERT, Horizontal ? 0 : CCS_VERT);
2010
2011 if (Horizontal)
2012 {
2013 ptRebar.x = StartSize.cx + GetSystemMetrics(SM_CXSIZEFRAME);
2014 szRebar.cx = ptTrayNotify.x - ptRebar.x;
2015 szRebar.cy = rcClient.bottom;
2016 }
2017 else
2018 {
2019 ptRebar.y = StartSize.cy + GetSystemMetrics(SM_CYSIZEFRAME);
2020 szRebar.cx = rcClient.right;
2021 szRebar.cy = ptTrayNotify.y - ptRebar.y;
2022 }
2023
2024 dwp = ::DeferWindowPos(dwp,
2025 m_Rebar,
2026 NULL,
2027 ptRebar.x,
2028 ptRebar.y,
2029 szRebar.cx,
2030 szRebar.cy,
2032 }
2033
2034 if (dwp != NULL)
2035 EndDeferWindowPos(dwp);
2036
2037 if (m_TaskSwitch != NULL)
2038 {
2039 /* Update the task switch window configuration */
2041 }
2042 }
#define TSWM_UPDATETASKBARPOS
Definition: precomp.h:381
#define TNWM_GETMINIMUMSIZE
Definition: precomp.h:367
#define ERR(fmt,...)
Definition: debug.h:110
HDWP DeferWindowPos(HDWP hWinPosInfo, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags)
Definition: atlwin.h:456
HWND m_hWnd
Definition: atlwin.h:273
SIZE GetSize()
Definition: traywnd.cpp:218
VOID UpdateSize()
Definition: traywnd.cpp:223
INT WidthOrHeight() const
Definition: traywnd.cpp:339
BOOL IsPosHorizontal()
Definition: traywnd.cpp:1407
HRESULT WINAPI GetWindow(HWND *phwnd)
Definition: traywnd.cpp:3708
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetWindowStyle(hwnd, val)
Definition: utility.h:153
#define TB_GETBUTTONSIZE
Definition: commctrl.h:1160
#define CCS_VERT
Definition: commctrl.h:2249
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
int32_t INT
Definition: typedefs.h:58
#define HIWORD(l)
Definition: typedefs.h:247
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define SWP_NOACTIVATE
Definition: winuser.h:1242
#define SM_CYEDGE
Definition: winuser.h:1009
#define SM_CXEDGE
Definition: winuser.h:1008
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define SendMessage
Definition: winuser.h:5843
#define SM_CXSIZEFRAME
Definition: winuser.h:993
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define GW_CHILD
Definition: winuser.h:763
#define SWP_NOZORDER
Definition: winuser.h:1247
#define SM_CYSIZEFRAME
Definition: winuser.h:995
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HDWP WINAPI BeginDeferWindowPos(_In_ int)

Referenced by OnSettingChanged(), OnSize(), OnTaskbarSettingsChanged(), and Open().

◆ ApplyClipping()

VOID CTrayWindow::ApplyClipping ( IN BOOL  Clip)
inline

Definition at line 1683 of file traywnd.cpp.

1684 {
1685 RECT rcClip, rcWindow;
1686 HRGN hClipRgn;
1687
1688 if (GetWindowRect(&rcWindow))
1689 {
1690 /* Disable clipping on systems with only one monitor */
1692 Clip = FALSE;
1693
1694 if (Clip)
1695 {
1696 rcClip = rcWindow;
1697
1698 GetScreenRect(m_Monitor, &rcClip);
1699
1700 if (!IntersectRect(&rcClip, &rcClip, &rcWindow))
1701 {
1702 rcClip = rcWindow;
1703 }
1704
1705 OffsetRect(&rcClip,
1706 -rcWindow.left,
1707 -rcWindow.top);
1708
1709 hClipRgn = CreateRectRgnIndirect(&rcClip);
1710 }
1711 else
1712 hClipRgn = NULL;
1713
1714 /* Set the clipping region or make sure the window isn't clipped
1715 by disabling it explicitly. */
1716 SetWindowRgn(hClipRgn, TRUE);
1717 }
1718 }
HMONITOR GetScreenRect(IN HMONITOR hMonitor, IN OUT RECT *pRect)
Definition: traywnd.cpp:1294
#define FALSE
Definition: types.h:117
HRGN WINAPI CreateRectRgnIndirect(_In_ LPCRECT)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI SetWindowRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define SM_CMONITORS
Definition: winuser.h:1040

Referenced by CheckTrayWndPosition(), Lock(), OnEnterSizeMove(), and OnSize().

◆ CalculateValidSize()

HMONITOR CTrayWindow::CalculateValidSize ( IN DWORD  Position,
IN OUT RECT pRect 
)
inline

Definition at line 1412 of file traywnd.cpp.

1415 {
1416 RECT rcScreen;
1417 //BOOL Horizontal;
1418 HMONITOR hMon;
1419 SIZE szMax, szWnd;
1420
1421 //Horizontal = IsPosHorizontal();
1422
1423 szWnd.cx = pRect->right - pRect->left;
1424 szWnd.cy = pRect->bottom - pRect->top;
1425
1426 rcScreen = *pRect;
1427 hMon = GetScreenRectFromRect(
1428 &rcScreen,
1429 MONITOR_DEFAULTTONEAREST);
1430
1431 /* Calculate the maximum size of the tray window and limit the window
1432 size to half of the screen's size. */
1433 szMax.cx = (rcScreen.right - rcScreen.left) / 2;
1434 szMax.cy = (rcScreen.bottom - rcScreen.top) / 2;
1435 if (szWnd.cx > szMax.cx)
1436 szWnd.cx = szMax.cx;
1437 if (szWnd.cy > szMax.cy)
1438 szWnd.cy = szMax.cy;
1439
1440 /* FIXME - calculate */
1441
1443 &rcScreen,
1444 &szWnd,
1445 pRect);
1446
1447 return hMon;
1448 }
HMONITOR GetScreenRectFromRect(IN OUT RECT *pRect, IN DWORD dwFlags)
Definition: traywnd.cpp:1242
VOID GetTrayRectFromScreenRect(IN DWORD Position, IN const RECT *pScreen, IN const SIZE *pTraySize OPTIONAL, OUT RECT *pRect)
Definition: traywnd.cpp:1386
static COORD Position
Definition: mouse.c:34

Referenced by FitToRebar().

◆ ChangingWinPos()

VOID CTrayWindow::ChangingWinPos ( IN OUT LPWINDOWPOS  pwp)
inline

Definition at line 1589 of file traywnd.cpp.

1590 {
1591 RECT rcTray;
1592
1593 if (IsDragging)
1594 {
1595 rcTray.left = pwp->x;
1596 rcTray.top = pwp->y;
1597 rcTray.right = rcTray.left + pwp->cx;
1598 rcTray.bottom = rcTray.top + pwp->cy;
1599
1600 if (!EqualRect(&rcTray,
1602 {
1603 /* Recalculate the rectangle, the user dragged the tray
1604 window to another monitor or the window was somehow else
1605 moved or resized */
1607 &rcTray,
1609 //m_TrayRects[DraggingPosition] = rcTray;
1610 }
1611
1612 //Monitor = CalculateValidSize(DraggingPosition,
1613 // &rcTray);
1614
1619 IsDragging = FALSE;
1620
1621 m_TrayRects[m_Position] = rcTray;
1622 goto ChangePos;
1623 }
1624 else if (GetWindowRect(&rcTray))
1625 {
1626 if (InSizeMove)
1627 {
1628 if (!(pwp->flags & SWP_NOMOVE))
1629 {
1630 rcTray.left = pwp->x;
1631 rcTray.top = pwp->y;
1632 }
1633
1634 if (!(pwp->flags & SWP_NOSIZE))
1635 {
1636 rcTray.right = rcTray.left + pwp->cx;
1637 rcTray.bottom = rcTray.top + pwp->cy;
1638 }
1639
1641
1642 if (!(pwp->flags & (SWP_NOMOVE | SWP_NOSIZE)))
1643 {
1644 SIZE szWnd;
1645
1646 szWnd.cx = pwp->cx;
1647 szWnd.cy = pwp->cy;
1648
1649 MakeTrayRectWithSize(m_Position, &szWnd, &rcTray);
1650 }
1651
1652 m_TrayRects[m_Position] = rcTray;
1653 }
1654 else if (m_Position != (DWORD)-1)
1655 {
1656 /* If the user isn't resizing the tray window we need to make sure the
1657 new size or position is valid. this is to prevent changes to the window
1658 without user interaction. */
1659 rcTray = m_TrayRects[m_Position];
1660
1662 {
1663 rcTray.left += m_AutoHideOffset.cx;
1664 rcTray.right += m_AutoHideOffset.cx;
1665 rcTray.top += m_AutoHideOffset.cy;
1666 rcTray.bottom += m_AutoHideOffset.cy;
1667 }
1668
1669 }
1670
1671ChangePos:
1672 m_TraySize.cx = rcTray.right - rcTray.left;
1673 m_TraySize.cy = rcTray.bottom - rcTray.top;
1674
1675 pwp->flags &= ~(SWP_NOMOVE | SWP_NOSIZE);
1676 pwp->x = rcTray.left;
1677 pwp->y = rcTray.top;
1678 pwp->cx = m_TraySize.cx;
1679 pwp->cy = m_TraySize.cy;
1680 }
1681 }
TaskbarSettings g_TaskbarSettings
Definition: settings.cpp:23
DWORD InSizeMove
Definition: traywnd.cpp:572
DWORD IsDragging
Definition: traywnd.cpp:573
VOID MakeTrayRectWithSize(IN DWORD Position, IN const SIZE *pTraySize, IN OUT RECT *pRect)
Definition: traywnd.cpp:1361
DWORD GetDraggingRectFromRect(IN OUT RECT *pRect, OUT HMONITOR *phMonitor)
Definition: traywnd.cpp:1571
TW_STRUCKRECTS2 sr
Definition: precomp.h:225
DWORD AutoHide
Definition: precomp.h:204
DWORD Position
Definition: precomp.h:210
#define SWP_NOMOVE
Definition: winuser.h:1244
#define SWP_NOSIZE
Definition: winuser.h:1245
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)

Referenced by OnWindowPosChanging().

◆ CheckShowDesktopButtonClick()

BOOL CTrayWindow::CheckShowDesktopButtonClick ( LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3135 of file traywnd.cpp.

3136 {
3138 if (m_ShowDesktopButton.PtInButton(pt)) // Did you click the button?
3139 {
3141 bHandled = TRUE;
3142 return TRUE;
3143 }
3144
3145 return FALSE;
3146 }
BOOL PtInButton(POINT pt)
Definition: traywnd.cpp:412
LPARAM lParam
Definition: combotst.c:139
#define pt(x, y)
Definition: drawing.c:79
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299

Referenced by OnNcLButtonUp().

◆ CheckTrayWndPosition()

VOID CTrayWindow::CheckTrayWndPosition ( )
inline

Definition at line 1772 of file traywnd.cpp.

1773 {
1774 /* Force the rebar bands to resize */
1776 IID_IDeskBand,
1778 0,
1779 NULL,
1780 NULL);
1781
1782 /* Calculate the size of the taskbar based on the rebar */
1784
1785 /* Move the tray window */
1786 /* The handler of WM_WINDOWPOSCHANGING will override whatever size
1787 * and position we use here with m_TrayRects */
1791 }
VOID ResizeWorkArea()
Definition: traywnd.cpp:1720
void FitToRebar(PRECT pRect)
Definition: traywnd.cpp:2044
CComPtr< ITrayBandSite > m_TrayBandSite
Definition: traywnd.cpp:564
VOID ApplyClipping(IN BOOL Clip)
Definition: traywnd.cpp:1683
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1083
@ DBID_BANDINFOCHANGED
Definition: shobjidl.idl:2452
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)

Referenced by OnDisplayChange(), OnSettingChanged(), OnTaskbarSettingsChanged(), and Open().

◆ Close()

HRESULT STDMETHODCALLTYPE CTrayWindow::Close ( )
inline

Definition at line 2399 of file traywnd.cpp.

2400 {
2401 if (m_hWnd != NULL)
2402 {
2405 0,
2406 0);
2407 }
2408
2409 return S_OK;
2410 }
#define S_OK
Definition: intsafe.h:52
#define WM_APP_TRAYDESTROY
Definition: traywnd.cpp:29

◆ ContextSensitiveHelp()

HRESULT WINAPI CTrayWindow::ContextSensitiveHelp ( BOOL  fEnterMode)
inline

Implements IOleWindow.

Definition at line 3716 of file traywnd.cpp.

3717 {
3718 return E_NOTIMPL;
3719 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ DisplayProperties()

HWND STDMETHODCALLTYPE CTrayWindow::DisplayProperties ( )
inline

Definition at line 775 of file traywnd.cpp.

776 {
777 HWND hTrayProp;
778
780 {
782 if (hTrayProp != NULL &&
783 hTrayProp != m_TrayPropertiesOwner)
784 {
785 SetForegroundWindow(hTrayProp);
786 return NULL;
787 }
788 }
789
791 return NULL;
792 }
HWND GetLastActivePopup() const
Definition: atlwin.h:676
static DWORD WINAPI s_TrayPropertiesThread(IN OUT PVOID pParam)
Definition: traywnd.cpp:768
#define CloseHandle
Definition: compat.h:739
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
BOOL WINAPI SetForegroundWindow(_In_ HWND)

Referenced by ExecContextMenuCmd(), and HandleCommand().

◆ DisplayRunFileDlg()

void CTrayWindow::DisplayRunFileDlg ( )
inline

Definition at line 722 of file traywnd.cpp.

723 {
724 HWND hRunDlg;
726 {
728 if (hRunDlg != NULL &&
729 hRunDlg != m_RunFileDlgOwner)
730 {
731 SetForegroundWindow(hRunDlg);
732 return;
733 }
734 }
735
737 }
static DWORD WINAPI s_RunFileDlgThread(IN OUT PVOID pParam)
Definition: traywnd.cpp:716

Referenced by HandleCommand(), and HandleHotKey().

◆ DoExitWindows()

LRESULT CTrayWindow::DoExitWindows ( )
inline

Definition at line 662 of file traywnd.cpp.

663 {
664 /* Display the ReactOS Shutdown Dialog */
666
667 /*
668 * If the user presses CTRL+ALT+SHIFT while exiting
669 * the shutdown dialog, exit the shell cleanly.
670 */
671 if ((GetKeyState(VK_CONTROL) & 0x8000) &&
672 (GetKeyState(VK_SHIFT) & 0x8000) &&
673 (GetKeyState(VK_MENU) & 0x8000))
674 {
675 PostMessage(WM_QUIT, 0, 0);
676 }
677 return 0;
678 }
void WINAPI ExitWindowsDialog(HWND hWndOwner)
Definition: dialogs.cpp:1608
#define WM_QUIT
Definition: winuser.h:1623
#define VK_CONTROL
Definition: winuser.h:2203
#define PostMessage
Definition: winuser.h:5832
#define VK_SHIFT
Definition: winuser.h:2202
SHORT WINAPI GetKeyState(_In_ int)
#define VK_MENU
Definition: winuser.h:2204

Referenced by HandleCommand(), OnDoExitWindows(), and OnSysCommand().

◆ DrawShowDesktopButton()

void CTrayWindow::DrawShowDesktopButton ( )
inline

Definition at line 2721 of file traywnd.cpp.

2722 {
2724 return;
2725 // Get the rectangle in window coordinates
2726 RECT rcButton, rcWnd;
2727 GetWindowRect(&rcWnd);
2729 ::OffsetRect(&rcButton, -rcWnd.left, -rcWnd.top);
2730
2732 m_ShowDesktopButton.OnDraw(hdc, &rcButton); // Draw the button
2733 ReleaseDC(hdc);
2734 }
BOOL GetWindowRect(LPRECT lpRect) const
Definition: atlwin.h:816
BOOL IsWindow() const
Definition: atlwin.h:947
VOID OnDraw(HDC hdc, LPRECT prc)
Definition: traywnd.cpp:483
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:92
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define DCX_CACHE
Definition: winuser.h:2114
#define DCX_WINDOW
Definition: winuser.h:2113
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)

Referenced by OnNcActivate(), and OnNcPaint().

◆ DrawSizerWithTheme()

int CTrayWindow::DrawSizerWithTheme ( IN HRGN  hRgn)
inline

Definition at line 2314 of file traywnd.cpp.

2315 {
2316 HDC hdc;
2317 RECT rect;
2319 SIZE size;
2320
2322
2325 return 0;
2326
2328 OffsetRect(&rect, -rect.left, -rect.top);
2329
2330 hdc = GetWindowDC();
2331
2332 switch (m_Position)
2333 {
2334 case ABE_LEFT:
2335 rect.left = rect.right - size.cx;
2336 break;
2337 case ABE_TOP:
2338 rect.top = rect.bottom - size.cy;
2339 break;
2340 case ABE_RIGHT:
2341 rect.right = rect.left + size.cx;
2342 break;
2343 case ABE_BOTTOM:
2344 default:
2345 rect.bottom = rect.top + size.cy;
2346 break;
2347 }
2348
2349 DrawThemeBackground(m_Theme, hdc, iSizerPart[m_Position], 0, &rect, 0);
2350
2351 ReleaseDC(hdc);
2352 return 0;
2353 }
HDC GetWindowDC()
Definition: atlwin.h:784
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
Definition: draw.c:128
#define ASSERT(a)
Definition: mode.c:44
& rect
Definition: startmenu.cpp:1413

Referenced by OnNcPaint().

◆ EraseBackgroundWithTheme()

LRESULT CTrayWindow::EraseBackgroundWithTheme ( HDC  hdc)
inline

Definition at line 2298 of file traywnd.cpp.

2299 {
2300 RECT rect;
2302
2304
2305 if (m_Theme)
2306 {
2308 DrawThemeBackground(m_Theme, hdc, iSBkgndPart[m_Position], 0, &rect, 0);
2309 }
2310
2311 return 0;
2312 }
@ TBP_BACKGROUNDLEFT
Definition: vssym32.h:560
@ TBP_BACKGROUNDRIGHT
Definition: vssym32.h:558
@ TBP_BACKGROUNDTOP
Definition: vssym32.h:559
@ TBP_BACKGROUNDBOTTOM
Definition: vssym32.h:557

Referenced by OnEraseBackground().

◆ ExecContextMenuCmd()

BOOL STDMETHODCALLTYPE CTrayWindow::ExecContextMenuCmd ( IN UINT  uiCmd)
inline

Definition at line 834 of file traywnd.cpp.

835 {
836 switch (uiCmd)
837 {
840 break;
841
844 TEXT("open"));
845 break;
846
849 TEXT("explore"));
850 break;
851
852 case ID_LOCKTASKBAR:
854 break;
855
858 break;
859
862 break;
863
865 ShowDesktop();
866 break;
867
870 if (g_Arrangement == NONE)
871 {
873 }
877 break;
878
881 if (g_Arrangement == NONE)
882 {
884 }
888 break;
889
892 if (g_Arrangement == NONE)
893 {
895 }
899 break;
900
903 break;
904
906 //FIXME: Use SHRunControlPanel
907 ShellExecuteW(m_hWnd, NULL, L"timedate.cpl", NULL, NULL, SW_NORMAL);
908 break;
909
911 RestoreAll();
912 break;
913
914 default:
915 TRACE("ITrayWindow::ExecContextMenuCmd(%u): Unhandled Command ID!\n", uiCmd);
916 return FALSE;
917 }
918
919 return TRUE;
920 }
HINSTANCE hExplorerInstance
Definition: explorer.cpp:24
#define ID_SHELL_CMD_OPEN_TASKMGR
Definition: resource.h:210
#define ID_SHELL_CMD_CUST_NOTIF
Definition: resource.h:216
#define ID_SHELL_CMD_UNDO_ACTION
Definition: resource.h:211
#define ID_SHELL_CMD_PROPERTIES
Definition: resource.h:206
#define ID_SHELL_CMD_TILE_WND_H
Definition: resource.h:214
#define ID_SHELL_CMD_CASCADE_WND
Definition: resource.h:215
#define ID_SHELL_CMD_RESTORE_ALL
Definition: resource.h:218
#define ID_SHELL_CMD_TILE_WND_V
Definition: resource.h:213
#define ID_LOCKTASKBAR
Definition: resource.h:209
#define ID_SHELL_CMD_SHOW_DESKTOP
Definition: resource.h:212
#define ID_SHELL_CMD_EXPLORE_ALL_USERS
Definition: resource.h:208
#define ID_SHELL_CMD_ADJUST_DAT
Definition: resource.h:217
#define ID_SHELL_CMD_OPEN_ALL_USERS
Definition: resource.h:207
VOID OpenTaskManager(IN HWND hWndOwner)
Definition: traywnd.cpp:812
VOID ShowDesktop()
Definition: traywnd.cpp:3312
LRESULT HandleCommand(UINT uCommand)
Definition: traywnd.cpp:973
VOID RestoreAll()
Definition: traywnd.cpp:3317
HWND STDMETHODCALLTYPE DisplayProperties()
Definition: traywnd.cpp:775
VOID OpenCommonStartMenuDirectory(IN HWND hWndOwner, IN LPCTSTR lpOperation)
Definition: traywnd.cpp:794
#define TEXT(s)
Definition: k32.h:26
VOID ShowCustomizeNotifyIcons(HINSTANCE hInst, HWND hExplorer)
#define L(x)
Definition: ntvdm.h:50
#define ABN_WINDOWARRANGE
Definition: shellapi.h:75
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2402
#define TRACE(s)
Definition: solgame.cpp:4
void appbar_notify_all(HMONITOR hMon, UINT uMsg, HWND hwndExclude, LPARAM lParam)
Definition: appbar.cpp:78
@ TILED
Definition: traywnd.cpp:61
@ NONE
Definition: traywnd.cpp:61
@ CASCADED
Definition: traywnd.cpp:61
VOID RestoreWindowPos()
Definition: traywnd.cpp:90
enum @102 g_Arrangement
VOID BackupWindowPos()
Definition: traywnd.cpp:85
#define TRAYCMD_LOCK_TASKBAR
Definition: undocshell.h:843
WORD WINAPI CascadeWindows(_In_opt_ HWND hwndParent, _In_ UINT wHow, _In_opt_ CONST RECT *lpRect, _In_ UINT cKids, _In_reads_opt_(cKids) const HWND FAR *lpKids)
WORD WINAPI TileWindows(_In_opt_ HWND hwndParent, _In_ UINT wHow, _In_opt_ CONST RECT *lpRect, _In_ UINT cKids, _In_reads_opt_(cKids) const HWND FAR *lpKids)
#define MDITILE_SKIPDISABLED
Definition: winuser.h:2187
#define MDITILE_HORIZONTAL
Definition: winuser.h:2188
#define MDITILE_VERTICAL
Definition: winuser.h:2189
#define SW_NORMAL
Definition: winuser.h:769

◆ ExecResourceCmd()

HRESULT CTrayWindow::ExecResourceCmd ( int  id)
inline

Definition at line 638 of file traywnd.cpp.

639 {
640 WCHAR szCommand[256];
641 WCHAR *pszParameters;
642
644 id,
645 szCommand,
646 _countof(szCommand)))
647 {
648 return E_FAIL;
649 }
650
651 pszParameters = wcschr(szCommand, L'>');
652 if (pszParameters)
653 {
654 *pszParameters = 0;
655 pszParameters++;
656 }
657
658 ShellExecuteW(m_hWnd, NULL, szCommand, pszParameters, NULL, SW_SHOWNORMAL);
659 return S_OK;
660 }
#define E_FAIL
Definition: ddrawi.h:102
#define wcschr
Definition: compat.h:17
#define _countof(array)
Definition: sndvol32.h:68
#define SW_SHOWNORMAL
Definition: winuser.h:770
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by HandleCommand(), and HandleHotKey().

◆ FitToRebar()

void CTrayWindow::FitToRebar ( PRECT  pRect)
inline

Definition at line 2044 of file traywnd.cpp.

2045 {
2046 /* Get the rect of the rebar */
2047 RECT rebarRect, taskbarRect, clientRect;
2048 ::GetWindowRect(m_Rebar, &rebarRect);
2049 ::GetWindowRect(m_hWnd, &taskbarRect);
2050 ::GetClientRect(m_hWnd, &clientRect);
2051 OffsetRect(&rebarRect, -taskbarRect.left, -taskbarRect.top);
2052
2053 /* Calculate the difference of size of the taskbar and the rebar */
2054 SIZE margins;
2055 margins.cx = taskbarRect.right - taskbarRect.left - clientRect.right + clientRect.left;
2056 margins.cy = taskbarRect.bottom - taskbarRect.top - clientRect.bottom + clientRect.top;
2057
2058 /* Calculate the new size of the rebar and make it resize, then change the new taskbar size */
2059 switch (m_Position)
2060 {
2061 case ABE_TOP:
2062 rebarRect.bottom = rebarRect.top + pRect->bottom - pRect->top - margins.cy;
2064 pRect->bottom = pRect->top + rebarRect.bottom - rebarRect.top + margins.cy;
2065 break;
2066 case ABE_BOTTOM:
2067 rebarRect.top = rebarRect.bottom - (pRect->bottom - pRect->top - margins.cy);
2069 pRect->top = pRect->bottom - (rebarRect.bottom - rebarRect.top + margins.cy);
2070 break;
2071 case ABE_LEFT:
2072 rebarRect.right = rebarRect.left + (pRect->right - pRect->left - margins.cx);
2074 pRect->right = pRect->left + (rebarRect.right - rebarRect.left + margins.cx);
2075 break;
2076 case ABE_RIGHT:
2077 rebarRect.left = rebarRect.right - (pRect->right - pRect->left - margins.cx);
2079 pRect->left = pRect->right - (rebarRect.right - rebarRect.left + margins.cx);
2080 break;
2081 }
2082
2084 }
static RECT margins
Definition: print.c:55
HMONITOR CalculateValidSize(IN DWORD Position, IN OUT RECT *pRect)
Definition: traywnd.cpp:1412
#define RBSTR_CHANGERECT
Definition: commctrl.h:1596
#define RB_SIZETORECT
Definition: commctrl.h:1598

Referenced by CheckTrayWndPosition(), OnExitSizeMove(), and OnSizing().

◆ GetCommandString()

HRESULT STDMETHODCALLTYPE CTrayWindow::GetCommandString ( UINT_PTR  idCmd,
UINT  uType,
UINT pwReserved,
LPSTR  pszName,
UINT  cchMax 
)
inline

Implements IContextMenu.

Definition at line 2522 of file traywnd.cpp.

2527 {
2528 if (!m_ContextMenu)
2529 return E_INVALIDARG;
2530
2531 return m_ContextMenu->GetCommandString(idCmd, uType, pwReserved, pszName, cchMax);
2532 }
UINT cchMax
CComPtr< IContextMenu > m_ContextMenu
Definition: traywnd.cpp:533
#define E_INVALIDARG
Definition: ddrawi.h:101

◆ GetDraggingRectFromPt()

DWORD CTrayWindow::GetDraggingRectFromPt ( IN POINT  pt,
OUT RECT pRect,
OUT HMONITOR phMonitor 
)
inline

Definition at line 1469 of file traywnd.cpp.

1473 {
1474 HMONITOR hMon, hMonNew;
1475 DWORD PosH, PosV, Pos;
1476 SIZE DeltaPt, ScreenOffset;
1477 RECT rcScreen;
1478
1479 rcScreen.left = 0;
1480 rcScreen.top = 0;
1481
1482 /* Determine the screen rectangle */
1483 hMon = MonitorFromPoint(pt, MONITOR_DEFAULTTONULL);
1484 if (hMon != NULL)
1485 {
1487
1488 mi.cbSize = sizeof(mi);
1489 if (!GetMonitorInfo(hMon, &mi))
1490 {
1491 hMon = NULL;
1492 goto GetPrimaryScreenRect;
1493 }
1494
1495 /* make left top corner of the screen zero based to
1496 make calculations easier */
1497 pt.x -= mi.rcMonitor.left;
1498 pt.y -= mi.rcMonitor.top;
1499
1500 ScreenOffset.cx = mi.rcMonitor.left;
1501 ScreenOffset.cy = mi.rcMonitor.top;
1502 rcScreen.right = mi.rcMonitor.right - mi.rcMonitor.left;
1503 rcScreen.bottom = mi.rcMonitor.bottom - mi.rcMonitor.top;
1504 }
1505 else
1506 {
1507GetPrimaryScreenRect:
1508 ScreenOffset.cx = 0;
1509 ScreenOffset.cy = 0;
1512 }
1513
1514 /* Calculate the nearest screen border */
1515 if (pt.x < rcScreen.right / 2)
1516 {
1517 DeltaPt.cx = pt.x;
1518 PosH = ABE_LEFT;
1519 }
1520 else
1521 {
1522 DeltaPt.cx = rcScreen.right - pt.x;
1523 PosH = ABE_RIGHT;
1524 }
1525
1526 if (pt.y < rcScreen.bottom / 2)
1527 {
1528 DeltaPt.cy = pt.y;
1529 PosV = ABE_TOP;
1530 }
1531 else
1532 {
1533 DeltaPt.cy = rcScreen.bottom - pt.y;
1534 PosV = ABE_BOTTOM;
1535 }
1536
1537 Pos = (DeltaPt.cx * rcScreen.bottom < DeltaPt.cy * rcScreen.right) ? PosH : PosV;
1538
1539 /* Fix the screen origin to be relative to the primary monitor again */
1540 OffsetRect(&rcScreen,
1541 ScreenOffset.cx,
1542 ScreenOffset.cy);
1543
1544 RECT rcPos = m_TrayRects[Pos];
1545
1546 hMonNew = GetMonitorFromRect(&rcPos);
1547 if (hMon != hMonNew)
1548 {
1549 SIZE szTray;
1550
1551 /* Recalculate the rectangle, we're dragging to another monitor.
1552 We don't need to recalculate the rect on single monitor systems. */
1553 szTray.cx = rcPos.right - rcPos.left;
1554 szTray.cy = rcPos.bottom - rcPos.top;
1555
1556 GetTrayRectFromScreenRect(Pos, &rcScreen, &szTray, pRect);
1557 hMon = hMonNew;
1558 }
1559 else
1560 {
1561 /* The user is dragging the tray window on the same monitor. We don't need
1562 to recalculate the rectangle */
1563 *pRect = rcPos;
1564 }
1565
1566 *phMonitor = hMon;
1567
1568 return Pos;
1569 }
HMONITOR GetMonitorFromRect(IN const RECT *pRect)
Definition: traywnd.cpp:1269
ush Pos
Definition: deflate.h:92
HMONITOR WINAPI MonitorFromPoint(POINT, DWORD)
RECT rcMonitor
Definition: winuser.h:3785
DWORD cbSize
Definition: winuser.h:3784
static MONITORINFO mi
Definition: win.c:7338
#define GetMonitorInfo
Definition: winuser.h:5791
#define SM_CYSCREEN
Definition: winuser.h:960
#define SM_CXSCREEN
Definition: winuser.h:959

Referenced by GetDraggingRectFromRect(), and OnMoving().

◆ GetDraggingRectFromRect()

DWORD CTrayWindow::GetDraggingRectFromRect ( IN OUT RECT pRect,
OUT HMONITOR phMonitor 
)
inline

Definition at line 1571 of file traywnd.cpp.

1574 {
1575 POINT pt;
1576
1577 /* Calculate the center of the rectangle. We call
1578 GetDraggingRectFromPt to calculate a valid
1579 dragging rectangle */
1580 pt.x = pRect->left + ((pRect->right - pRect->left) / 2);
1581 pt.y = pRect->top + ((pRect->bottom - pRect->top) / 2);
1582
1583 return GetDraggingRectFromPt(
1584 pt,
1585 pRect,
1586 phMonitor);
1587 }
DWORD GetDraggingRectFromPt(IN POINT pt, OUT RECT *pRect, OUT HMONITOR *phMonitor)
Definition: traywnd.cpp:1469

Referenced by ChangingWinPos().

◆ GetHWND()

HWND STDMETHODCALLTYPE CTrayWindow::GetHWND ( )
inline

Definition at line 2412 of file traywnd.cpp.

2413 {
2414 return m_hWnd;
2415 }

◆ GetMonitorFromRect()

HMONITOR CTrayWindow::GetMonitorFromRect ( IN const RECT pRect)
inline

Definition at line 1269 of file traywnd.cpp.

1271 {
1272 HMONITOR hMon;
1273
1274 /* In case the monitor sizes or saved sizes differ a bit (probably
1275 not a lot, only so the tray window overlaps into another monitor
1276 now), minimize the risk that we determine a wrong monitor by
1277 using the center point of the tray window if we can't determine
1278 it using the rectangle. */
1279 hMon = MonitorFromRect(pRect, MONITOR_DEFAULTTONULL);
1280 if (hMon == NULL)
1281 {
1282 POINT pt;
1283
1284 pt.x = pRect->left + ((pRect->right - pRect->left) / 2);
1285 pt.y = pRect->top + ((pRect->bottom - pRect->top) / 2);
1286
1287 /* be less error-prone, find the nearest monitor */
1288 hMon = MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST);
1289 }
1290
1291 return hMon;
1292 }
HMONITOR WINAPI MonitorFromRect(LPCRECT, DWORD)

Referenced by GetDraggingRectFromPt(), GetScreenRect(), and RegLoadSettings().

◆ GetScreenRect()

HMONITOR CTrayWindow::GetScreenRect ( IN HMONITOR  hMonitor,
IN OUT RECT pRect 
)
inline

Definition at line 1294 of file traywnd.cpp.

1297 {
1298 HMONITOR hMon = NULL;
1299
1300 if (hMonitor != NULL)
1301 {
1303
1304 mi.cbSize = sizeof(mi);
1305 if (!GetMonitorInfo(hMonitor, &mi))
1306 {
1307 /* Hm, the monitor is gone? Try to find a monitor where it
1308 could be located now */
1309 hMon = GetMonitorFromRect(pRect);
1310 if (hMon == NULL ||
1311 !GetMonitorInfo(hMon, &mi))
1312 {
1313 hMon = NULL;
1314 goto GetPrimaryRect;
1315 }
1316 }
1317
1318 *pRect = mi.rcMonitor;
1319 }
1320 else
1321 {
1322GetPrimaryRect:
1323 pRect->left = 0;
1324 pRect->top = 0;
1325 pRect->right = GetSystemMetrics(SM_CXSCREEN);
1326 pRect->bottom = GetSystemMetrics(SM_CYSCREEN);
1327 }
1328
1329 return hMon;
1330 }

Referenced by ApplyClipping(), and ResizeWorkArea().

◆ GetScreenRectFromRect()

HMONITOR CTrayWindow::GetScreenRectFromRect ( IN OUT RECT pRect,
IN DWORD  dwFlags 
)
inline

Definition at line 1242 of file traywnd.cpp.

1245 {
1247 HMONITOR hMon;
1248
1249 mi.cbSize = sizeof(mi);
1250 hMon = MonitorFromRect(pRect, dwFlags);
1251 if (hMon != NULL &&
1252 GetMonitorInfo(hMon, &mi))
1253 {
1254 *pRect = mi.rcMonitor;
1255 }
1256 else
1257 {
1258 pRect->left = 0;
1259 pRect->top = 0;
1260 pRect->right = GetSystemMetrics(SM_CXSCREEN);
1261 pRect->bottom = GetSystemMetrics(SM_CYSCREEN);
1262
1263 hMon = NULL;
1264 }
1265
1266 return hMon;
1267 }
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

Referenced by CalculateValidSize(), and RegLoadSettings().

◆ GetState()

virtual ULONG STDMETHODCALLTYPE CTrayWindow::GetState ( )
inlinevirtual

Definition at line 3674 of file traywnd.cpp.

3675 {
3676 /* FIXME: Return ABS_ flags? */
3677 TRACE("IShellDesktopTray::GetState() unimplemented!\n");
3678 return 0;
3679 }

◆ GetTrayRectFromScreenRect()

VOID CTrayWindow::GetTrayRectFromScreenRect ( IN DWORD  Position,
IN const RECT pScreen,
IN const SIZE *pTraySize  OPTIONAL,
OUT RECT pRect 
)
inline

Definition at line 1386 of file traywnd.cpp.

1390 {
1391 if (pTraySize == NULL)
1392 pTraySize = &m_TraySize;
1393
1394 *pRect = *pScreen;
1395
1396 if(!m_Theme)
1397 {
1398 /* Move the border outside of the screen */
1399 InflateRect(pRect,
1402 }
1403
1404 MakeTrayRectWithSize(Position, pTraySize, pRect);
1405 }
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)

Referenced by CalculateValidSize(), GetDraggingRectFromPt(), and RegLoadSettings().

◆ GetTrayWindow()

virtual HRESULT STDMETHODCALLTYPE CTrayWindow::GetTrayWindow ( OUT HWND phWndTray)
inlinevirtual

Definition at line 3681 of file traywnd.cpp.

3682 {
3683 TRACE("IShellDesktopTray::GetTrayWindow(0x%p)\n", phWndTray);
3684 *phWndTray = m_hWnd;
3685 return S_OK;
3686 }

◆ GetWindow()

HRESULT WINAPI CTrayWindow::GetWindow ( HWND phwnd)
inline

Implements IOleWindow.

Definition at line 3708 of file traywnd.cpp.

3709 {
3710 if (!phwnd)
3711 return E_INVALIDARG;
3712 *phwnd = m_hWnd;
3713 return S_OK;
3714 }

Referenced by AlignControls(), IsTaskWnd(), and MinimizeWindowsProc().

◆ HandleCommand()

LRESULT CTrayWindow::HandleCommand ( UINT  uCommand)
inline

Definition at line 973 of file traywnd.cpp.

974 {
975 switch (uCommand)
976 {
978 // TODO:
979 break;
983 break;
985 LogoffWindowsDialog(m_hWnd); // FIXME: Maybe handle it in a similar way as DoExitWindows?
986 break;
987 case TRAYCMD_CASCADE:
989 break;
990 case TRAYCMD_TILE_H:
992 break;
993 case TRAYCMD_TILE_V:
995 break;
998 break;
1000 ShellExecuteW(m_hWnd, NULL, L"timedate.cpl", NULL, NULL, SW_NORMAL);
1001 break;
1004 break;
1006 MinimizeAll();
1007 break;
1009 RestoreAll();
1010 break;
1012 ShowDesktop();
1013 break;
1016 break;
1018 break;
1021 {
1024 }
1025 break;
1028 break;
1030 // TODO:
1031 break;
1033 DoExitWindows();
1034 break;
1036 // TODO:
1037 break;
1039 // TODO:
1040 break;
1042 // TODO:
1043 break;
1044 case IDM_SEARCH:
1047 break;
1050 break;
1051
1052 default:
1053 break;
1054 }
1055
1056 return FALSE;
1057 }
#define IDM_SEARCH
Definition: resource.h:71
#define IDS_HELP_COMMAND
Definition: resource.h:103
VOID ToggleDesktop()
Definition: traywnd.cpp:822
HRESULT ExecResourceCmd(int id)
Definition: traywnd.cpp:638
VOID HideStartMenu()
Definition: traywnd.cpp:922
VOID MinimizeAll(BOOL bShowDesktop=FALSE)
Definition: traywnd.cpp:3294
LRESULT DoExitWindows()
Definition: traywnd.cpp:662
void DisplayRunFileDlg()
Definition: traywnd.cpp:722
EXTERN_C int WINAPI LogoffWindowsDialog(HWND hWndOwner)
Definition: dialogs.cpp:1545
EXTERN_C BOOL WINAPI SHFindComputer(LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSavedSearch)
Definition: utils.cpp:740
BOOL WINAPI SHFindFiles(PCIDLIST_ABSOLUTE pidlFolder, PCIDLIST_ABSOLUTE pidlSaveFile)
Definition: shellord.c:2262
@ REST_CLASSICSHELL
Definition: shlobj.h:1665
DWORD WINAPI SHRestricted(RESTRICTIONS rest)
Definition: shpolicy.c:146
#define TRAYCMD_CONTROL_PANEL
Definition: undocshell.h:845
#define TRAYCMD_STARTMENU
Definition: undocshell.h:829
#define TRAYCMD_LOCK_DESKTOP
Definition: undocshell.h:848
#define TRAYCMD_DATE_AND_TIME
Definition: undocshell.h:836
#define TRAYCMD_SEARCH_COMPUTERS
Definition: undocshell.h:851
#define TRAYCMD_TASKBAR_PROPERTIES
Definition: undocshell.h:837
#define TRAYCMD_SHOW_DESKTOP
Definition: undocshell.h:840
#define TRAYCMD_TILE_V
Definition: undocshell.h:834
#define TRAYCMD_SEARCH_FILES
Definition: undocshell.h:850
#define TRAYCMD_CUSTOMIZE_TASKBAR
Definition: undocshell.h:842
#define TRAYCMD_TILE_H
Definition: undocshell.h:833
#define TRAYCMD_TOGGLE_DESKTOP
Definition: undocshell.h:835
#define TRAYCMD_RUN_DIALOG
Definition: undocshell.h:830
#define TRAYCMD_LOGOFF_DIALOG
Definition: undocshell.h:831
#define TRAYCMD_CASCADE
Definition: undocshell.h:832
#define TRAYCMD_SHOW_TASK_MGR
Definition: undocshell.h:841
#define TRAYCMD_RESTORE_ALL
Definition: undocshell.h:839
#define TRAYCMD_SHUTDOWN_DIALOG
Definition: undocshell.h:846
#define TRAYCMD_PRINTERS_AND_FAXES
Definition: undocshell.h:847
#define TRAYCMD_MINIMIZE_ALL
Definition: undocshell.h:838
#define TRAYCMD_SWITCH_USER_DIALOG
Definition: undocshell.h:849
#define TRAYCMD_HELP_AND_SUPPORT
Definition: undocshell.h:844

Referenced by ExecContextMenuCmd(), and OnCommand().

◆ HandleHotKey()

LRESULT CTrayWindow::HandleHotKey ( DWORD  id)
inline

Definition at line 927 of file traywnd.cpp.

928 {
929 switch (id)
930 {
931 case IDHK_RUN:
934 break;
935 case IDHK_HELP:
937 break;
938 case IDHK_EXPLORE:
939 //FIXME: We don't support this yet:
940 //ShellExecuteW(0, L"explore", NULL, NULL, NULL, 1);
941 ShellExecuteW(0, NULL, L"explorer.exe", L"/e ,", NULL, 1);
942 break;
943 case IDHK_FIND:
945 break;
948 break;
950 //FIXME: Use SHRunControlPanel
951 ShellExecuteW(m_hWnd, NULL, L"sysdm.cpl", NULL, NULL, SW_NORMAL);
952 break;
953 case IDHK_NEXT_TASK:
954 break;
955 case IDHK_PREV_TASK:
956 break;
958 MinimizeAll();
959 break;
960 case IDHK_RESTORE_ALL:
961 RestoreAll();
962 break;
963 case IDHK_DESKTOP:
965 break;
966 case IDHK_PAGER:
967 break;
968 }
969
970 return 0;
971 }
#define IDHK_NEXT_TASK
Definition: traywnd.cpp:53
#define IDHK_RUN
Definition: traywnd.cpp:46
#define IDHK_DESKTOP
Definition: traywnd.cpp:56
#define IDHK_EXPLORE
Definition: traywnd.cpp:50
#define IDHK_MINIMIZE_ALL
Definition: traywnd.cpp:47
#define IDHK_RESTORE_ALL
Definition: traywnd.cpp:48
#define IDHK_SYS_PROPERTIES
Definition: traywnd.cpp:55
#define IDHK_PREV_TASK
Definition: traywnd.cpp:54
#define IDHK_FIND
Definition: traywnd.cpp:51
#define IDHK_HELP
Definition: traywnd.cpp:49
#define IDHK_FIND_COMPUTER
Definition: traywnd.cpp:52
#define IDHK_PAGER
Definition: traywnd.cpp:57

Referenced by OnHotkey().

◆ HideStartMenu()

VOID CTrayWindow::HideStartMenu ( )
inline

Definition at line 922 of file traywnd.cpp.

923 {
924 m_StartMenuPopup->OnSelect(MPOS_CANCELLEVEL);
925 }
CComPtr< IMenuPopup > m_StartMenuPopup
Definition: traywnd.cpp:530

Referenced by HandleCommand(), HandleHotKey(), OnOpenStartMenu(), and OnSettingChanged().

◆ if()

CTrayWindow::if ( m_StartMenuBand = NULL)
inline

Definition at line 3558 of file traywnd.cpp.

3559 {
3560 MSG Msg;
3561 LRESULT lRet;
3562
3563 Msg.hwnd = m_hWnd;
3564 Msg.message = uMsg;
3565 Msg.wParam = wParam;
3566 Msg.lParam = lParam;
3567
3568 if (m_StartMenuBand->TranslateMenuMessage(&Msg, &lRet) == S_OK)
3569 {
3570 return lRet;
3571 }
3572
3573 wParam = Msg.wParam;
3574 lParam = Msg.lParam;
3575 }
CComPtr< IMenuBand > m_StartMenuBand
Definition: traywnd.cpp:529
struct @1632 Msg[]
WPARAM wParam
Definition: combotst.c:138
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
LONG_PTR LRESULT
Definition: windef.h:209

◆ InvokeCommand()

HRESULT STDMETHODCALLTYPE CTrayWindow::InvokeCommand ( LPCMINVOKECOMMANDINFO  lpici)
inline

Implements IContextMenu.

Definition at line 2514 of file traywnd.cpp.

2515 {
2516 if (!m_ContextMenu)
2517 return E_INVALIDARG;
2518
2519 return m_ContextMenu->InvokeCommand(lpici);
2520 }

◆ IsDialog()

static BOOL CTrayWindow::IsDialog ( HWND  hwnd)
inlinestatic

Definition at line 3259 of file traywnd.cpp.

3260 {
3261 WCHAR szClass[32];
3262 GetClassNameW(hwnd, szClass, _countof(szClass));
3263 return wcscmp(szClass, L"#32770") == 0;
3264 }
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
int WINAPI GetClassNameW(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPWSTR lpClassName, _In_ int nMaxCount)

Referenced by MinimizeWindowsProc().

◆ IsHorizontal()

BOOL STDMETHODCALLTYPE CTrayWindow::IsHorizontal ( )
inline

Definition at line 2423 of file traywnd.cpp.

2424 {
2425 return IsPosHorizontal();
2426 }

◆ IsPosHorizontal()

BOOL CTrayWindow::IsPosHorizontal ( )
inline

Definition at line 1407 of file traywnd.cpp.

1408 {
1409 return m_Position == ABE_TOP || m_Position == ABE_BOTTOM;
1410 }

Referenced by AlignControls(), and IsHorizontal().

◆ IsSpecialHWND()

BOOL STDMETHODCALLTYPE CTrayWindow::IsSpecialHWND ( IN HWND  hWnd)
inline

Definition at line 2417 of file traywnd.cpp.

2418 {
2419 return (m_hWnd == hWnd ||
2421 }
HWND hWnd
Definition: settings.c:17

Referenced by IsTaskWnd().

◆ IsTaskWnd()

BOOL STDMETHODCALLTYPE CTrayWindow::IsTaskWnd ( HWND  hWnd)
inline

Definition at line 2481 of file traywnd.cpp.

2482 {
2484 {
2486 if (((exStyle & WS_EX_APPWINDOW) || ::GetWindow(hWnd, GW_OWNER) == NULL) &&
2487 !(exStyle & WS_EX_TOOLWINDOW))
2488 {
2489 return TRUE;
2490 }
2491 }
2492 return FALSE;
2493 }
BOOL IsWindowVisible() const
Definition: atlwin.h:958
BOOL STDMETHODCALLTYPE IsSpecialHWND(IN HWND hWnd)
Definition: traywnd.cpp:2417
#define GetWindowLongPtr
Definition: treelist.c:73
#define GW_OWNER
Definition: winuser.h:766
#define WS_EX_APPWINDOW
Definition: winuser.h:383
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
#define GWL_EXSTYLE
Definition: winuser.h:851

Referenced by RestoreMinimizedNonTaskWnds().

◆ Lock()

BOOL STDMETHODCALLTYPE CTrayWindow::Lock ( IN BOOL  bLock)
inline

Definition at line 2428 of file traywnd.cpp.

2429 {
2430 BOOL bPrevLock = g_TaskbarSettings.bLock;
2431
2432 if (g_TaskbarSettings.bLock != bLock)
2433 {
2434 g_TaskbarSettings.bLock = bLock;
2435
2436 if (m_TrayBandSite != NULL)
2437 {
2438 if (!SUCCEEDED(m_TrayBandSite->Lock(bLock)))
2439 {
2440 /* Reset?? */
2441 g_TaskbarSettings.bLock = bPrevLock;
2442 return bPrevLock;
2443 }
2444 }
2445
2446 if (m_Theme)
2447 {
2448 /* Update cached tray sizes */
2449 for(DWORD Pos = ABE_LEFT; Pos <= ABE_BOTTOM; Pos++)
2450 {
2451 RECT rcGripper = {0};
2452 AdjustSizerRect(&rcGripper, Pos);
2453
2455 {
2456 m_TrayRects[Pos].top += rcGripper.top;
2457 m_TrayRects[Pos].left += rcGripper.left;
2458 m_TrayRects[Pos].bottom += rcGripper.bottom;
2459 m_TrayRects[Pos].right += rcGripper.right;
2460 }
2461 else
2462 {
2463 m_TrayRects[Pos].top -= rcGripper.top;
2464 m_TrayRects[Pos].left -= rcGripper.left;
2465 m_TrayRects[Pos].bottom -= rcGripper.bottom;
2466 m_TrayRects[Pos].right -= rcGripper.right;
2467 }
2468 }
2469 }
2473 }
2474
2475 return bPrevLock;
2476 }
VOID AdjustSizerRect(RECT *rc, DWORD pos)
Definition: traywnd.cpp:1332
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define SWP_FRAMECHANGED
Definition: winuser.h:1240
#define SWP_NOOWNERZORDER
Definition: winuser.h:1249

◆ MakeTrayRectWithSize()

VOID CTrayWindow::MakeTrayRectWithSize ( IN DWORD  Position,
IN const SIZE pTraySize,
IN OUT RECT pRect 
)
inline

Definition at line 1361 of file traywnd.cpp.

1364 {
1365 switch (Position)
1366 {
1367 case ABE_LEFT:
1368 pRect->right = pRect->left + pTraySize->cx;
1369 break;
1370
1371 case ABE_TOP:
1372 pRect->bottom = pRect->top + pTraySize->cy;
1373 break;
1374
1375 case ABE_RIGHT:
1376 pRect->left = pRect->right - pTraySize->cx;
1377 break;
1378
1379 case ABE_BOTTOM:
1380 default:
1381 pRect->top = pRect->bottom - pTraySize->cy;
1382 break;
1383 }
1384 }

Referenced by ChangingWinPos(), and GetTrayRectFromScreenRect().

◆ MinimizeAll()

VOID CTrayWindow::MinimizeAll ( BOOL  bShowDesktop = FALSE)
inline

Definition at line 3294 of file traywnd.cpp.

3295 {
3296 IgnorePulse = TRUE;
3298
3299 MINIMIZE_INFO info;
3300 info.hwndDesktop = GetDesktopWindow();;
3301 info.hTrayWnd = FindWindowW(L"Shell_TrayWnd", NULL);
3302 info.hwndProgman = FindWindowW(L"Progman", NULL);
3303 info.pMinimizedAll = &g_MinimizedAll;
3304 info.bShowDesktop = bShowDesktop;
3306
3310 }
HWND SetFocus()
Definition: atlwin.h:1198
static BOOL CALLBACK MinimizeWindowsProc(HWND hwnd, LPARAM lParam)
Definition: traywnd.cpp:3266
CSimpleArray< MINWNDPOS > g_MinimizedAll
Definition: traywnd.cpp:185
#define TIMER_IGNOREPULSERESET_TIMEOUT
Definition: traywnd.cpp:2623
#define TIMER_ID_IGNOREPULSERESET
Definition: traywnd.cpp:2622
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:656
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)
HWND WINAPI FindWindowW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)

Referenced by HandleCommand(), HandleHotKey(), and ShowDesktop().

◆ MinimizeWindowsProc()

static BOOL CALLBACK CTrayWindow::MinimizeWindowsProc ( HWND  hwnd,
LPARAM  lParam 
)
inlinestatic

Definition at line 3266 of file traywnd.cpp.

3267 {
3268 MINIMIZE_INFO *info = (MINIMIZE_INFO *)lParam;
3269 if (hwnd == info->hwndDesktop || hwnd == info->hTrayWnd || hwnd == info->hwndProgman)
3270 return TRUE; // Ignore special windows
3271
3272 if (!info->bShowDesktop)
3273 {
3275 return TRUE;
3276 HWND hwndOwner = ::GetWindow(hwnd, GW_OWNER);
3277 if (hwndOwner && !::IsWindowEnabled(hwndOwner))
3278 return TRUE;
3279 }
3280
3281 if (CanBeMinimized(hwnd))
3282 {
3283 MINWNDPOS mwp = { hwnd, { sizeof(mwp.wndpl) } };
3284 if (::GetWindowPlacement(hwnd, &mwp.wndpl) && // Save the position and status
3286 {
3287 info->pMinimizedAll->Add(mwp);
3288 }
3289 }
3290
3291 return TRUE;
3292 }
BOOL IsWindowEnabled() const
Definition: atlwin.h:952
static BOOL IsDialog(HWND hwnd)
Definition: traywnd.cpp:3259
WINDOWPLACEMENT wndpl
Definition: traywnd.cpp:183
BOOL CanBeMinimized(HWND hwnd)
Definition: traywnd.cpp:102
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)
BOOL WINAPI ShowWindowAsync(_In_ HWND, _In_ int)
#define SW_SHOWMINNOACTIVE
Definition: winuser.h:777

Referenced by MinimizeAll().

◆ OnAppTrayDestroy()

LRESULT CTrayWindow::OnAppTrayDestroy ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3164 of file traywnd.cpp.

3165 {
3166 DestroyWindow();
3167 return TRUE;
3168 }
BOOL DestroyWindow()
Definition: atlwin.h:462

◆ OnCommand()

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

Definition at line 3333 of file traywnd.cpp.

3334 {
3335 LRESULT Ret = FALSE;
3336
3338 {
3339 return FALSE;
3340 }
3341
3342 if (m_TrayBandSite == NULL || FAILED_UNEXPECTEDLY(m_TrayBandSite->ProcessMessage(m_hWnd, uMsg, wParam, lParam, &Ret)))
3343 {
3344 return HandleCommand(LOWORD(wParam));
3345 }
3346 return Ret;
3347 }
#define LOWORD(l)
Definition: pedump.c:82

◆ OnContextMenu()

LRESULT CTrayWindow::OnContextMenu ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3033 of file traywnd.cpp.

3034 {
3035 LRESULT Ret = FALSE;
3036 POINT pt, *ppt = NULL;
3037 HWND hWndExclude = NULL;
3038
3039 /* Check if the administrator has forbidden access to context menus */
3041 return FALSE;
3042
3043 pt.x = (SHORT) LOWORD(lParam);
3044 pt.y = (SHORT) HIWORD(lParam);
3045
3046 if (pt.x != -1 || pt.y != -1)
3047 ppt = &pt;
3048 else
3049 hWndExclude = m_StartButton.m_hWnd;
3050
3052 {
3053 /* Make sure we can't track the context menu if the start
3054 menu is currently being shown */
3056 {
3057 CComPtr<IContextMenu> ctxMenu;
3059 TrackCtxMenu(ctxMenu, ppt, hWndExclude, m_Position == ABE_BOTTOM, this);
3060 }
3061 }
3062 else
3063 {
3064 /* See if the context menu should be handled by the task band site */
3065 if (ppt != NULL && m_TrayBandSite != NULL)
3066 {
3067 HWND hWndAtPt;
3068 POINT ptClient = *ppt;
3069
3070 /* Convert the coordinates to client-coordinates */
3071 ::MapWindowPoints(NULL, m_hWnd, &ptClient, 1);
3072
3073 hWndAtPt = ChildWindowFromPoint(ptClient);
3074 if (hWndAtPt != NULL &&
3075 (hWndAtPt == m_Rebar || ::IsChild(m_Rebar, hWndAtPt)))
3076 {
3077 /* Check if the user clicked on the task switch window */
3078 ptClient = *ppt;
3079 ::MapWindowPoints(NULL, m_Rebar, &ptClient, 1);
3080
3082 if (hWndAtPt == m_TaskSwitch)
3083 goto HandleTrayContextMenu;
3084
3085 /* Forward the message to the task band site */
3086 m_TrayBandSite->ProcessMessage(m_hWnd, uMsg, wParam, lParam, &Ret);
3087 }
3088 else
3089 goto HandleTrayContextMenu;
3090 }
3091 else
3092 {
3093HandleTrayContextMenu:
3094 /* Tray the default tray window context menu */
3095 TrackCtxMenu(this, ppt, NULL, FALSE, this);
3096 }
3097 }
3098 return Ret;
3099 }
HRESULT CStartMenuBtnCtxMenu_CreateInstance(ITrayWindow *TrayWnd, IN HWND hWndOwner, IContextMenu **ppCtxMenu)
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1116
HRESULT TrackCtxMenu(IN IContextMenu *contextMenu, IN POINT *ppt OPTIONAL, IN HWND hwndExclude OPTIONAL, IN BOOL TrackUp, IN PVOID Context OPTIONAL)
Definition: traywnd.cpp:1131
short SHORT
Definition: pedump.c:59
@ REST_NOTRAYCONTEXTMENU
Definition: shlobj.h:1653
HWND WINAPI ChildWindowFromPoint(_In_ HWND, _In_ POINT)
#define BM_GETSTATE
Definition: winuser.h:1920
HWND WINAPI ChildWindowFromPointEx(_In_ HWND, _In_ POINT, _In_ UINT)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define CWP_SKIPDISABLED
Definition: winuser.h:209
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)
#define BST_PUSHED
Definition: winuser.h:201
#define CWP_SKIPINVISIBLE
Definition: winuser.h:208

Referenced by OnNcRButtonUp().

◆ OnCopyData()

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

Definition at line 2706 of file traywnd.cpp.

2707 {
2708 COPYDATASTRUCT *pCopyData = (COPYDATASTRUCT *)lParam;
2709 switch (pCopyData->dwData)
2710 {
2711 case TABDMC_APPBAR:
2712 return appbar_message(pCopyData);
2713 case TABDMC_NOTIFY:
2714 case TABDMC_LOADINPROC:
2715 return ::SendMessageW(m_TrayNotify, uMsg, wParam, lParam);
2716 }
2717 return FALSE;
2718 }
ULONG_PTR dwData
Definition: winuser.h:3001
LRESULT appbar_message(COPYDATASTRUCT *cds)
Definition: appbar.cpp:229
#define TABDMC_APPBAR
Definition: undocshell.h:854
#define TABDMC_LOADINPROC
Definition: undocshell.h:856
#define TABDMC_NOTIFY
Definition: undocshell.h:855

◆ OnCreate()

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

Definition at line 2538 of file traywnd.cpp.

2539 {
2540 HRESULT hRet;
2541
2542 ((ITrayWindow*)this)->AddRef();
2543
2544 SetWindowTheme(m_hWnd, L"TaskBar", NULL);
2545
2546 /* Create the Start button */
2548
2549 /* Create the 'Show Desktop' button if necessary */
2552
2553 /* Load the saved tray window settings */
2555
2556 /* Create and initialize the start menu */
2560
2561 /* Create the task band */
2563 if (FAILED_UNEXPECTEDLY(hRet))
2564 return FALSE;
2565
2566 /* Create the rebar band site. This actually creates the rebar and the tasks toolbar. */
2568 if (FAILED_UNEXPECTEDLY(hRet))
2569 return FALSE;
2570
2571 /* Create the tray notification window */
2573 if (FAILED_UNEXPECTEDLY(hRet))
2574 return FALSE;
2575
2576 /* Get the hwnd of the rebar */
2578 if (FAILED_UNEXPECTEDLY(hRet))
2579 return FALSE;
2580
2581 /* Get the hwnd of the tasks toolbar */
2583 if (FAILED_UNEXPECTEDLY(hRet))
2584 return FALSE;
2585
2586 /* Get the hwnd of the tray notification window */
2588 if (FAILED_UNEXPECTEDLY(hRet))
2589 return FALSE;
2590
2591 SetWindowTheme(m_Rebar, L"TaskBar", NULL);
2592
2593 UpdateFonts();
2594
2596
2598 {
2601 }
2602
2603 /* Set the initial lock state in the band site */
2605
2618
2619 return TRUE;
2620 }
IMenuPopup * CreateStartMenu(IN ITrayWindow *Tray, OUT IMenuBand **ppMenuBand, IN HBITMAP hbmBanner OPTIONAL, IN BOOL bSmallIcons)
Definition: startmnu.cpp:50
HRESULT CTrayNotifyWnd_CreateInstance(HWND hwndParent, REFIID riid, void **ppv)
Definition: trayntfy.cpp:372
HRESULT CTrayBandSite_CreateInstance(IN ITrayWindow *tray, IN IDeskBand *pTaskBand, OUT ITrayBandSite **pBandSite)
Definition: tbsite.cpp:715
HRESULT InitShellServices(HDPA *phdpa)
HRESULT CTaskBand_CreateInstance(IN ITrayWindow *Tray, HWND hWndStartButton, REFIID riid, void **ppv)
Definition: taskband.cpp:346
#define IDB_STARTMENU
Definition: resource.h:44
HWND Create(HWND hwndParent)
Definition: traywnd.cpp:275
HRESULT DoCreate(HWND hwndParent)
Definition: traywnd.cpp:346
CComPtr< IDeskBand > m_TaskBand
Definition: traywnd.cpp:532
VOID RegLoadSettings()
Definition: traywnd.cpp:1793
CComPtr< IUnknown > m_TrayNotifyInstance
Definition: traywnd.cpp:543
void UpdateFonts()
Definition: traywnd.cpp:1211
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1332
#define MOD_SHIFT
Definition: imm.h:186
#define MOD_CONTROL
Definition: imm.h:185
ULONG AddRef()
static HBITMAP
Definition: button.c:44
BOOL bShowDesktopButton
Definition: precomp.h:224
DWORD SmSmallIcons
Definition: precomp.h:206
#define AUTOHIDE_DELAY_HIDE
Definition: traywnd.cpp:34
#define AUTOHIDE_HIDING
Definition: traywnd.cpp:44
#define TIMER_ID_AUTOHIDE
Definition: traywnd.cpp:31
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Definition: uxthemesupp.c:69
#define VK_TAB
Definition: winuser.h:2199
#define MOD_WIN
Definition: winuser.h:2644
#define VK_F1
Definition: winuser.h:2255
#define VK_PAUSE
Definition: winuser.h:2205
BOOL WINAPI RegisterHotKey(_In_opt_ HWND, _In_ int, _In_ UINT, _In_ UINT)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HBITMAP WINAPI LoadBitmapW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2163
#define IID_PPV_ARG(Itype, ppType)

◆ OnCtlColorBtn()

LRESULT CTrayWindow::OnCtlColorBtn ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 2752 of file traywnd.cpp.

2753 {
2756 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define TRANSPARENT
Definition: wingdi.h:950
#define HOLLOW_BRUSH
Definition: wingdi.h:899
int WINAPI SetBkMode(_In_ HDC, _In_ int)
Definition: dc.c:1056

◆ OnDestroy()

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

Definition at line 2625 of file traywnd.cpp.

2626 {
2628 return 0;
2629 }

◆ OnDisplayChange()

LRESULT CTrayWindow::OnDisplayChange ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 2695 of file traywnd.cpp.

2696 {
2697 /* Load the saved tray window settings */
2699
2700 /* Move the tray window to the right position and resize it if necessary */
2702
2703 return TRUE;
2704 }
VOID CheckTrayWndPosition()
Definition: traywnd.cpp:1772

◆ OnDoExitWindows()

LRESULT CTrayWindow::OnDoExitWindows ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3185 of file traywnd.cpp.

3186 {
3187 /*
3188 * TWM_DOEXITWINDOWS is send by the CDesktopBrowser to us
3189 * to show the shutdown dialog. Also a WM_CLOSE message sent
3190 * by apps should show the dialog.
3191 */
3192 return DoExitWindows();
3193 }

◆ OnEnterSizeMove()

LRESULT CTrayWindow::OnEnterSizeMove ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 2879 of file traywnd.cpp.

2880 {
2881 InSizeMove = TRUE;
2882 IsDragging = FALSE;
2884 {
2885 /* Remove the clipping on multi monitor systems while dragging around */
2887 }
2888 return TRUE;
2889 }

◆ OnEraseBackground()

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

Definition at line 2682 of file traywnd.cpp.

2683 {
2684 HDC hdc = (HDC) wParam;
2685
2686 if (!m_Theme)
2687 {
2688 bHandled = FALSE;
2689 return 0;
2690 }
2691
2693 }
LRESULT EraseBackgroundWithTheme(HDC hdc)
Definition: traywnd.cpp:2298

◆ OnExitSizeMove()

LRESULT CTrayWindow::OnExitSizeMove ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 2891 of file traywnd.cpp.

2892 {
2893 InSizeMove = FALSE;
2895 {
2897
2898 /* Apply clipping */
2900 }
2901 return TRUE;
2902 }
#define WM_SIZE
Definition: winuser.h:1611
#define SIZE_RESTORED
Definition: winuser.h:2505

◆ OnGetTaskSwitch()

LRESULT CTrayWindow::OnGetTaskSwitch ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3206 of file traywnd.cpp.

3207 {
3208 bHandled = TRUE;
3209 return (LRESULT)m_TaskSwitch;
3210 }

◆ OnHotkey()

LRESULT CTrayWindow::OnHotkey ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3245 of file traywnd.cpp.

3246 {
3247 return HandleHotKey(wParam);
3248 }
LRESULT HandleHotKey(DWORD id)
Definition: traywnd.cpp:927

◆ OnInitMenuPopup()

LRESULT CTrayWindow::OnInitMenuPopup ( INT  code,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3419 of file traywnd.cpp.

3420 {
3421 HMENU hMenu = (HMENU)wParam;
3423 {
3427 if (g_Arrangement != NONE)
3428 {
3431 MENUITEMINFOW mii = { sizeof(mii) };
3433 mii.fMask = MIIM_TYPE;
3434 mii.fType = MFT_STRING;
3435 mii.dwTypeData = const_cast<LPWSTR>(&strCaption[0]);
3437 }
3438 else
3439 {
3441 }
3442 }
3443 else
3444 {
3450 g_WindowPosBackup.RemoveAll();
3451 }
3452 return 0;
3453 }
#define IDS_TRAYWND_UNDO_TILE
Definition: resource.h:107
#define IDS_TRAYWND_UNDO_CASCADE
Definition: resource.h:106
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
LPWSTR dwTypeData
Definition: winuser.h:3269
CSimpleArray< WINDOWPOSBACKUPDATA > g_WindowPosBackup
Definition: traywnd.cpp:68
static BOOL IsThereAnyEffectiveWindow(BOOL bMustBeInMonitor)
Definition: traywnd.cpp:166
#define MF_BYCOMMAND
Definition: winuser.h:202
BOOL WINAPI SetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define MF_ENABLED
Definition: winuser.h:128
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
#define MFT_STRING
Definition: winuser.h:746
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define MIIM_TYPE
Definition: winuser.h:725
#define MF_GRAYED
Definition: winuser.h:129
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ OnMouseMove()

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

Definition at line 3349 of file traywnd.cpp.

3350 {
3351 POINT pt;
3355
3357 {
3359 }
3360
3361 return TRUE;
3362 }
#define TIMER_ID_MOUSETRACK
Definition: traywnd.cpp:32
#define MOUSETRACK_INTERVAL
Definition: traywnd.cpp:33
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2670

◆ OnMoving()

LRESULT CTrayWindow::OnMoving ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 2810 of file traywnd.cpp.

2811 {
2812 POINT ptCursor;
2813 PRECT pRect = (PRECT) lParam;
2814
2815 /* We need to ensure that an application can not accidently
2816 move the tray window (using SetWindowPos). However, we still
2817 need to be able to move the window in case the user wants to
2818 drag the tray window to another position or in case the user
2819 wants to resize the tray window. */
2820 if (!g_TaskbarSettings.bLock && GetCursorPos(&ptCursor))
2821 {
2822 IsDragging = TRUE;
2824 }
2825 else
2826 {
2827 *pRect = m_TrayRects[m_Position];
2828 }
2829 return TRUE;
2830 }
#define PRECT
Definition: precomp.h:27

◆ OnNcActivate()

LRESULT CTrayWindow::OnNcActivate ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3382 of file traywnd.cpp.

3383 {
3385 DrawShowDesktopButton(); // We have to draw non-client area
3386 bHandled = TRUE;
3387 return ret;
3388 }
void DrawShowDesktopButton()
Definition: traywnd.cpp:2721
#define DefWindowProc
Definition: ros2win.h:31
int ret

◆ OnNcCalcSize()

LRESULT CTrayWindow::OnNcCalcSize ( INT  code,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3390 of file traywnd.cpp.

3391 {
3392 RECT *rc = NULL;
3393 /* Ignore WM_NCCALCSIZE if we are not themed or locked */
3395 {
3396 bHandled = FALSE;
3397 return 0;
3398 }
3399 if(!wParam)
3400 {
3401 rc = (RECT*)wParam;
3402 }
3403 else
3404 {
3406 if(prms->lppos->flags & SWP_NOSENDCHANGING)
3407 {
3408 bHandled = FALSE;
3409 return 0;
3410 }
3411 rc = &prms->rgrc[0];
3412 }
3413
3415
3416 return 0;
3417 }
UINT flags
Definition: winuser.h:3594
PWINDOWPOS lppos
Definition: winuser.h:3599
#define SWP_NOSENDCHANGING
Definition: winuser.h:1251

◆ OnNcHitTest()

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

Definition at line 2758 of file traywnd.cpp.

2759 {
2760 RECT rcClient;
2761 POINT pt;
2762
2764 {
2765 /* The user may not be able to resize the tray window.
2766 Pretend like the window is not sizeable when the user
2767 clicks on the border. */
2768 return HTBORDER;
2769 }
2770
2772 if (GetClientRect(&rcClient) &&
2773 (MapWindowPoints(NULL, (LPPOINT) &rcClient, 2) != 0 || GetLastError() == ERROR_SUCCESS))
2774 {
2775 pt.x = (SHORT) LOWORD(lParam);
2776 pt.y = (SHORT) HIWORD(lParam);
2777
2778 if (PtInRect(&rcClient, pt))
2779 {
2780 /* The user is trying to drag the tray window */
2781 return HTCAPTION;
2782 }
2783
2784 /* Depending on the position of the tray window, allow only
2785 changing the border next to the monitor working area */
2786 switch (m_Position)
2787 {
2788 case ABE_TOP:
2789 if (pt.y > rcClient.bottom)
2790 return HTBOTTOM;
2791 break;
2792 case ABE_LEFT:
2793 if (pt.x > rcClient.right)
2794 return HTRIGHT;
2795 break;
2796 case ABE_RIGHT:
2797 if (pt.x < rcClient.left)
2798 return HTLEFT;
2799 break;
2800 case ABE_BOTTOM:
2801 default:
2802 if (pt.y < rcClient.top)
2803 return HTTOP;
2804 break;
2805 }
2806 }
2807 return HTBORDER;
2808 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define SetLastError(x)
Definition: compat.h:752
#define HTCAPTION
Definition: winuser.h:2476
#define HTBOTTOM
Definition: winuser.h:2493
#define HTBORDER
Definition: winuser.h:2497
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
#define HTRIGHT
Definition: winuser.h:2489
#define HTTOP
Definition: winuser.h:2490
#define HTLEFT
Definition: winuser.h:2487

◆ OnNcLButtonDblClick()

LRESULT CTrayWindow::OnNcLButtonDblClick ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3148 of file traywnd.cpp.

3149 {
3150 /* Let the clock handle the double-click */
3152
3153 /* We "handle" this message so users can't cause a weird maximize/restore
3154 window animation when double-clicking the tray window! */
3155 return TRUE;
3156 }

◆ OnNcLButtonDown()

LRESULT CTrayWindow::OnNcLButtonDown ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 2967 of file traywnd.cpp.

2968 {
2969 /* This handler implements the trick that makes the start button to
2970 get pressed when the user clicked left or below the button */
2971
2973 WINDOWINFO wi = {sizeof(WINDOWINFO)};
2974
2975 bHandled = FALSE;
2976
2977 RECT rcStartBtn;
2978 m_StartButton.GetWindowRect(&rcStartBtn);
2979
2980 GetWindowInfo(m_hWnd, &wi);
2981
2982 switch (m_Position)
2983 {
2984 case ABE_TOP:
2985 case ABE_LEFT:
2986 {
2987 if (pt.x > rcStartBtn.right || pt.y > rcStartBtn.bottom)
2988 return 0;
2989 break;
2990 }
2991 case ABE_RIGHT:
2992 {
2993 if (pt.x < rcStartBtn.left || pt.y > rcStartBtn.bottom)
2994 return 0;
2995
2996 if (rcStartBtn.right + (int)wi.cxWindowBorders * 2 + 1 < wi.rcWindow.right &&
2997 pt.x > rcStartBtn.right)
2998 {
2999 return 0;
3000 }
3001 break;
3002 }
3003 case ABE_BOTTOM:
3004 {
3005 if (pt.x > rcStartBtn.right || pt.y < rcStartBtn.top)
3006 return 0;
3007
3008 if (rcStartBtn.bottom + (int)wi.cyWindowBorders * 2 + 1 < wi.rcWindow.bottom &&
3009 pt.y > rcStartBtn.bottom)
3010 {
3011 return 0;
3012 }
3013
3014 break;
3015 }
3016 }
3017
3018 bHandled = TRUE;
3020 return 0;
3021 }
void PopupStartMenu()
Definition: traywnd.cpp:2086
UINT cxWindowBorders
Definition: winuser.h:3772
UINT cyWindowBorders
Definition: winuser.h:3773
RECT rcWindow
Definition: winuser.h:3767
BOOL WINAPI GetWindowInfo(_In_ HWND, _Inout_ PWINDOWINFO)
struct tagWINDOWINFO WINDOWINFO

◆ OnNcLButtonUp()

LRESULT CTrayWindow::OnNcLButtonUp ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3158 of file traywnd.cpp.

3159 {
3161 return FALSE;
3162 }
BOOL CheckShowDesktopButtonClick(LPARAM lParam, BOOL &bHandled)
Definition: traywnd.cpp:3135

◆ OnNcPaint()

LRESULT CTrayWindow::OnNcPaint ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 2736 of file traywnd.cpp.

2737 {
2738 DefWindowProc(uMsg, wParam, lParam);
2739 bHandled = TRUE;
2740
2742 {
2743 DrawShowDesktopButton(); // We have to draw non-client area
2744 return 0;
2745 }
2746
2747 DrawSizerWithTheme((HRGN) wParam);
2748 DrawShowDesktopButton(); // We have to draw non-client area
2749 return 0;
2750 }
int DrawSizerWithTheme(IN HRGN hRgn)
Definition: traywnd.cpp:2314

◆ OnNcRButtonUp()

LRESULT CTrayWindow::OnNcRButtonUp ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3023 of file traywnd.cpp.

3024 {
3025 /* We want the user to be able to get a context menu even on the nonclient
3026 area (including the sizing border)! */
3027 uMsg = WM_CONTEXTMENU;
3028 wParam = (WPARAM) m_hWnd;
3029
3030 return OnContextMenu(uMsg, wParam, lParam, bHandled);
3031 }
LRESULT OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: traywnd.cpp:3033
#define WM_CONTEXTMENU
Definition: richedit.h:64

◆ OnNotify()

LRESULT CTrayWindow::OnNotify ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3101 of file traywnd.cpp.

3102 {
3103 LRESULT Ret = FALSE;
3104 /* FIXME: We can't check with IsChild whether the hwnd is somewhere inside
3105 the rebar control! But we shouldn't forward messages that the band
3106 site doesn't handle, such as other controls (start button, tray window */
3107
3108 HRESULT hr = E_FAIL;
3109
3110 if (m_TrayBandSite)
3111 {
3112 hr = m_TrayBandSite->ProcessMessage(m_hWnd, uMsg, wParam, lParam, &Ret);
3113 if (SUCCEEDED(hr))
3114 return Ret;
3115 }
3116
3117 if (m_TrayBandSite == NULL || FAILED(hr))
3118 {
3119 const NMHDR *nmh = (const NMHDR *) lParam;
3120
3121 if (nmh->hwndFrom == m_TrayNotify)
3122 {
3123 switch (nmh->code)
3124 {
3125 case NTNWM_REALIGN:
3126 /* Cause all controls to be aligned */
3128 break;
3129 }
3130 }
3131 }
3132 return Ret;
3133 }
#define NTNWM_REALIGN
Definition: precomp.h:370
#define FAILED(hr)
Definition: intsafe.h:51
UINT code
Definition: winuser.h:3159
HWND hwndFrom
Definition: winuser.h:3157

◆ OnOpenStartMenu()

LRESULT CTrayWindow::OnOpenStartMenu ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3170 of file traywnd.cpp.

3171 {
3172 HWND hwndStartMenu;
3173 HRESULT hr = IUnknown_GetWindow(m_StartMenuPopup, &hwndStartMenu);
3175 return FALSE;
3176
3177 if (::IsWindowVisible(hwndStartMenu))
3178 HideStartMenu();
3179 else
3181
3182 return TRUE;
3183 }

◆ OnPulse()

LRESULT CTrayWindow::OnPulse ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3233 of file traywnd.cpp.

3234 {
3235 if (IgnorePulse)
3236 return 0;
3237
3239 IgnorePulse = TRUE;
3242 return 0;
3243 }
void RestoreMinimizedNonTaskWnds(BOOL bDestroyed, HWND hwndActive)
Definition: traywnd.cpp:3212

◆ OnRebarAutoSize()

LRESULT CTrayWindow::OnRebarAutoSize ( INT  code,
LPNMHDR  nmhdr,
BOOL bHandled 
)
inline

Definition at line 3455 of file traywnd.cpp.

3456 {
3457#if 0
3458 LPNMRBAUTOSIZE as = (LPNMRBAUTOSIZE) nmhdr;
3459
3460 if (!as->fChanged)
3461 return 0;
3462
3463 RECT rc;
3464 ::GetWindowRect(m_hWnd, &rc);
3465
3466 SIZE szWindow = {
3467 rc.right - rc.left,
3468 rc.bottom - rc.top };
3469 SIZE szTarget = {
3470 as->rcTarget.right - as->rcTarget.left,
3471 as->rcTarget.bottom - as->rcTarget.top };
3472 SIZE szActual = {
3473 as->rcActual.right - as->rcActual.left,
3474 as->rcActual.bottom - as->rcActual.top };
3475
3476 SIZE borders = {
3477 szWindow.cx - szTarget.cx,
3478 szWindow.cy - szTarget.cx,
3479 };
3480
3481 switch (m_Position)
3482 {
3483 case ABE_LEFT:
3484 szWindow.cx = szActual.cx + borders.cx;
3485 break;
3486 case ABE_TOP:
3487 szWindow.cy = szActual.cy + borders.cy;
3488 break;
3489 case ABE_RIGHT:
3490 szWindow.cx = szActual.cx + borders.cx;
3491 rc.left = rc.right - szWindow.cy;
3492 break;
3493 case ABE_BOTTOM:
3494 szWindow.cy = szActual.cy + borders.cy;
3495 rc.top = rc.bottom - szWindow.cy;
3496 break;
3497 }
3498
3499 SetWindowPos(NULL, rc.left, rc.top, szWindow.cx, szWindow.cy, SWP_NOACTIVATE | SWP_NOZORDER);
3500#else
3501 bHandled = FALSE;
3502#endif
3503 return 0;
3504 }
struct tagNMRBAUTOSIZE * LPNMRBAUTOSIZE

◆ OnSettingChanged()

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

Definition at line 2651 of file traywnd.cpp.

2652 {
2653 if (wParam == SPI_SETNONCLIENTMETRICS)
2654 {
2657 UpdateFonts();
2660 }
2661
2662 if (m_StartMenuPopup && lstrcmpiW((LPCWSTR)lParam, L"TraySettings") == 0)
2663 {
2664 HideStartMenu();
2665
2667#if 1 // FIXME: Please re-use the start menu
2668 /* Re-create the start menu */
2672 FIXME("Use UpdateStartMenu\n");
2673#else
2674 // Update the start menu
2676#endif
2677 }
2678
2679 return 0;
2680 }
HRESULT UpdateStartMenu(IN OUT IMenuPopup *pMenuPopup, IN HBITMAP hbmBanner OPTIONAL, IN BOOL bSmallIcons, IN BOOL bRefresh)
Definition: startmnu.cpp:24
#define FIXME(fmt,...)
Definition: debug.h:111
void Release()
Definition: atlcomcli.h:170
VOID AlignControls(IN PRECT prcClient OPTIONAL)
Definition: traywnd.cpp:1871
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

◆ OnSize()

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

Definition at line 2853 of file traywnd.cpp.

2854 {
2855 RECT rcClient;
2856 if (wParam == SIZE_RESTORED && lParam == 0)
2857 {
2859 /* Clip the tray window on multi monitor systems so the edges can't
2860 overlap into another monitor */
2862
2863 if (!GetClientRect(&rcClient))
2864 {
2865 return FALSE;
2866 }
2867 }
2868 else
2869 {
2870 rcClient.left = rcClient.top = 0;
2871 rcClient.right = LOWORD(lParam);
2872 rcClient.bottom = HIWORD(lParam);
2873 }
2874
2875 AlignControls(&rcClient);
2876 return TRUE;
2877 }

◆ OnSizing()

LRESULT CTrayWindow::OnSizing ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 2832 of file traywnd.cpp.

2833 {
2834 PRECT pRect = (PRECT) lParam;
2835
2837 {
2838 FitToRebar(pRect);
2839 }
2840 else
2841 {
2842 *pRect = m_TrayRects[m_Position];
2843 }
2844 return TRUE;
2845 }

◆ OnSysChar()

LRESULT CTrayWindow::OnSysChar ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 2904 of file traywnd.cpp.

2905 {
2906 switch (wParam)
2907 {
2908 case TEXT(' '):
2909 {
2910 /* The user pressed Alt+Space, this usually brings up the system menu of a window.
2911 The tray window needs to handle this specially, since it normally doesn't have
2912 a system menu. */
2913
2914 static const UINT uidDisableItem [] = {
2915 SC_RESTORE,
2916 SC_MOVE,
2917 SC_SIZE,
2920 };
2921 HMENU hSysMenu;
2922 UINT i, uId;
2923
2924 /* temporarily enable the system menu */
2926
2927 hSysMenu = GetSystemMenu(FALSE);
2928 if (hSysMenu != NULL)
2929 {
2930 /* Disable all items that are not relevant */
2931 for (i = 0; i < _countof(uidDisableItem); i++)
2932 {
2933 EnableMenuItem(hSysMenu,
2934 uidDisableItem[i],
2936 }
2937
2938 EnableMenuItem(hSysMenu,
2939 SC_CLOSE,
2940 MF_BYCOMMAND |
2942
2943 /* Display the system menu */
2944 uId = TrackMenu(
2945 hSysMenu,
2946 NULL,
2949 FALSE);
2950 if (uId != 0)
2951 {
2953 }
2954 }
2955
2956 /* revert the system menu window style */
2958 break;
2959 }
2960
2961 default:
2962 bHandled = FALSE;
2963 }
2964 return TRUE;
2965 }
UINT TrackMenu(IN HMENU hMenu, IN POINT *ppt OPTIONAL, IN HWND hwndExclude OPTIONAL, IN BOOL TrackUp, IN BOOL IsContextMenu)
Definition: traywnd.cpp:1060
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: ndis.h:50
#define WS_SYSMENU
Definition: pedump.c:629
@ REST_NOCLOSE
Definition: shlobj.h:1629
#define WM_SYSCOMMAND
Definition: winuser.h:1741
HMENU WINAPI GetSystemMenu(_In_ HWND, _In_ BOOL)
#define SC_SIZE
Definition: winuser.h:2584
#define SC_MINIMIZE
Definition: winuser.h:2586
#define SC_CLOSE
Definition: winuser.h:2592
#define SC_MOVE
Definition: winuser.h:2585
#define SC_RESTORE
Definition: winuser.h:2598
#define SC_MAXIMIZE
Definition: winuser.h:2588

◆ OnSysCommand()

LRESULT CTrayWindow::OnSysCommand ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3195 of file traywnd.cpp.

3196 {
3197 if (wParam == SC_CLOSE)
3198 {
3199 return DoExitWindows();
3200 }
3201
3202 bHandled = FALSE;
3203 return TRUE;
3204 }

◆ OnTaskbarSettingsChanged()

LRESULT CTrayWindow::OnTaskbarSettingsChanged ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 3506 of file traywnd.cpp.

3507 {
3508 TaskbarSettings* newSettings = (TaskbarSettings*)lParam;
3509
3510 /* Propagate the new settings to the children */
3513
3514 /* Toggle autohide */
3515 if (newSettings->sr.AutoHide != g_TaskbarSettings.sr.AutoHide)
3516 {
3517 g_TaskbarSettings.sr.AutoHide = newSettings->sr.AutoHide;
3520 if (!newSettings->sr.AutoHide)
3522 else
3524 }
3525
3526 /* Toggle lock state */
3527 Lock(newSettings->bLock);
3528
3529 /* Toggle OnTop state */
3530 if (newSettings->sr.AlwaysOnTop != g_TaskbarSettings.sr.AlwaysOnTop)
3531 {
3533 HWND hWndInsertAfter = newSettings->sr.AlwaysOnTop ? HWND_TOPMOST : HWND_BOTTOM;
3534 SetWindowPos(hWndInsertAfter, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
3535 }
3536
3537 /* Toggle show desktop button */
3539 {
3543 else if (!m_ShowDesktopButton.IsWindow())
3546 }
3547
3548 /* Adjust taskbar size */
3550
3552 return 0;
3553 }
#define memset(x, y, z)
Definition: compat.h:39
DWORD AlwaysOnTop
Definition: precomp.h:205
#define AUTOHIDE_SHOWN
Definition: traywnd.cpp:43
#define HWND_TOPMOST
Definition: winuser.h:1208
#define SWP_SHOWWINDOW
Definition: winuser.h:1248
#define HWND_BOTTOM
Definition: winuser.h:1205

◆ OnThemeChanged()

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

Definition at line 2631 of file traywnd.cpp.

2632 {
2633 if (m_Theme)
2635
2636 m_Theme = OpenThemeData(m_hWnd, L"TaskBar");
2637
2638 if (m_Theme)
2639 {
2641 }
2642 else
2643 {
2645 }
2647
2648 return TRUE;
2649 }
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist)
Definition: system.c:835
#define WS_BORDER
Definition: pedump.c:625
#define WS_THICKFRAME
Definition: pedump.c:630

◆ OnTimer()

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

Definition at line 3364 of file traywnd.cpp.

3365 {
3367 {
3369 }
3370 else if (wParam == TIMER_ID_AUTOHIDE)
3371 {
3373 }
3375 {
3378 }
3379 return 0;
3380 }
void ProcessMouseTracking()
Definition: traywnd.cpp:2127
void ProcessAutoHide()
Definition: traywnd.cpp:2177

◆ OnWindowPosChanging()

LRESULT CTrayWindow::OnWindowPosChanging ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 2847 of file traywnd.cpp.

2848 {
2850 return TRUE;
2851 }
VOID ChangingWinPos(IN OUT LPWINDOWPOS pwp)
Definition: traywnd.cpp:1589

◆ Open()

HRESULT STDMETHODCALLTYPE CTrayWindow::Open ( )
inline

Definition at line 2362 of file traywnd.cpp.

2363 {
2364 RECT rcWnd;
2365
2366 /* Check if there's already a window created and try to show it.
2367 If it was somehow destroyed just create a new tray window. */
2368 if (m_hWnd != NULL && IsWindow())
2369 {
2370 return S_OK;
2371 }
2372
2375 dwExStyle |= WS_EX_TOPMOST;
2376
2378 if(!m_Theme)
2379 {
2380 dwStyle |= WS_THICKFRAME | WS_BORDER;
2381 }
2382
2383 ZeroMemory(&rcWnd, sizeof(rcWnd));
2384 if (m_Position != (DWORD) -1)
2385 rcWnd = m_TrayRects[m_Position];
2386
2387 if (!Create(NULL, rcWnd, NULL, dwStyle, dwExStyle))
2388 return E_FAIL;
2389
2390 /* Align all controls on the tray window */
2392
2393 /* Move the tray window to the right position and resize it if necessary */
2395
2396 return S_OK;
2397 }
@ Create
Definition: registry.c:563
#define WS_POPUP
Definition: pedump.c:616
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_EX_TOPMOST
Definition: pedump.c:647
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407

◆ OpenCommonStartMenuDirectory()

VOID CTrayWindow::OpenCommonStartMenuDirectory ( IN HWND  hWndOwner,
IN LPCTSTR  lpOperation 
)
inline

Definition at line 794 of file traywnd.cpp.

795 {
796 WCHAR szDir[MAX_PATH];
797
798 if (SHGetSpecialFolderPath(hWndOwner,
799 szDir,
801 FALSE))
802 {
803 ShellExecute(hWndOwner,
804 lpOperation,
805 szDir,
806 NULL,
807 NULL,
809 }
810 }
#define MAX_PATH
Definition: compat.h:34
#define ShellExecute
Definition: shellapi.h:693
#define SHGetSpecialFolderPath
Definition: shlobj.h:1522
#define CSIDL_COMMON_STARTMENU
Definition: shlobj.h:2179

Referenced by ExecContextMenuCmd().

◆ OpenTaskManager()

VOID CTrayWindow::OpenTaskManager ( IN HWND  hWndOwner)
inline

Definition at line 812 of file traywnd.cpp.

813 {
814 ShellExecute(hWndOwner,
815 TEXT("open"),
816 TEXT("taskmgr.exe"),
817 NULL,
818 NULL,
820 }

Referenced by ExecContextMenuCmd(), and HandleCommand().

◆ PopupStartMenu()

void CTrayWindow::PopupStartMenu ( )
inline

Definition at line 2086 of file traywnd.cpp.

2087 {
2088 if (m_StartMenuPopup != NULL)
2089 {
2090 POINTL pt;
2091 RECTL rcExclude;
2092 DWORD dwFlags = 0;
2093
2094 if (m_StartButton.GetWindowRect((RECT*) &rcExclude))
2095 {
2096 switch (m_Position)
2097 {
2098 case ABE_BOTTOM:
2099 pt.x = rcExclude.left;
2100 pt.y = rcExclude.top;
2101 dwFlags |= MPPF_TOP;
2102 break;
2103 case ABE_TOP:
2104 pt.x = rcExclude.left;
2105 pt.y = rcExclude.bottom;
2106 dwFlags |= MPPF_BOTTOM;
2107 break;
2108 case ABE_LEFT:
2109 pt.x = rcExclude.right;
2110 pt.y = rcExclude.top;
2111 dwFlags |= MPPF_RIGHT;
2112 break;
2113 case ABE_RIGHT:
2114 pt.x = rcExclude.left;
2115 pt.y = rcExclude.top;
2116 dwFlags |= MPPF_LEFT;
2117 break;
2118 }
2119
2120 m_StartMenuPopup->Popup(&pt, &rcExclude, dwFlags);
2121
2122 m_StartButton.SendMessageW(BM_SETSTATE, TRUE, 0);
2123 }
2124 }
2125 }
#define BM_SETSTATE
Definition: winuser.h:1923

Referenced by OnNcLButtonDown(), and OnOpenStartMenu().

◆ ProcessAutoHide()

void CTrayWindow::ProcessAutoHide ( )
inline

Definition at line 2177 of file traywnd.cpp.

2178 {
2181
2182 switch (m_AutoHideState)
2183 {
2184 case AUTOHIDE_HIDING:
2185 switch (m_Position)
2186 {
2187 case ABE_LEFT:
2188 m_AutoHideOffset.cy = 0;
2190 if (m_AutoHideOffset.cx < -w)
2192 break;
2193 case ABE_TOP:
2194 m_AutoHideOffset.cx = 0;
2196 if (m_AutoHideOffset.cy < -h)
2198 break;
2199 case ABE_RIGHT:
2200 m_AutoHideOffset.cy = 0;
2202 if (m_AutoHideOffset.cx > w)
2204 break;
2205 case ABE_BOTTOM:
2206 m_AutoHideOffset.cx = 0;
2208 if (m_AutoHideOffset.cy > h)
2210 break;
2211 }
2212
2214 {
2216 break;
2217 }
2218
2219 /* fallthrough */
2220 case AUTOHIDE_HIDDEN:
2221
2222 switch (m_Position)
2223 {
2224 case ABE_LEFT:
2226 m_AutoHideOffset.cy = 0;
2227 break;
2228 case ABE_TOP:
2229 m_AutoHideOffset.cx = 0;
2231 break;
2232 case ABE_RIGHT:
2234 m_AutoHideOffset.cy = 0;
2235 break;
2236 case ABE_BOTTOM:
2237 m_AutoHideOffset.cx = 0;
2239 break;
2240 }
2241
2244 break;
2245
2246 case AUTOHIDE_SHOWING:
2248 {
2250 }
2252 {
2254 }
2255 else
2256 {
2257 m_AutoHideOffset.cx = 0;
2258 }
2259
2261 {
2263 }
2265 {
2267 }
2268 else
2269 {
2270 m_AutoHideOffset.cy = 0;
2271 }
2272
2273 if (m_AutoHideOffset.cx != 0 || m_AutoHideOffset.cy != 0)
2274 {
2276 break;
2277 }
2278
2279 /* fallthrough */
2280 case AUTOHIDE_SHOWN:
2281
2284 break;
2285 }
2286
2288 }
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define AUTOHIDE_SPEED_HIDE
Definition: traywnd.cpp:39
#define AUTOHIDE_SPEED_SHOW
Definition: traywnd.cpp:38
#define AUTOHIDE_SHOWING
Definition: traywnd.cpp:42
#define AUTOHIDE_HIDDEN
Definition: traywnd.cpp:41
#define AUTOHIDE_INTERVAL_ANIMATING
Definition: traywnd.cpp:36

Referenced by OnTimer().

◆ ProcessMouseTracking()

void CTrayWindow::ProcessMouseTracking ( )
inline

Definition at line 2127 of file traywnd.cpp.

2128 {
2129 RECT rcCurrent;
2130 POINT pt;
2131 BOOL over;
2133
2134 GetCursorPos(&pt);
2135 GetWindowRect(&rcCurrent);
2136 over = PtInRect(&rcCurrent, pt);
2137
2139 {
2140 over = TRUE;
2141 }
2142
2143 if (over)
2144 {
2145 if (state == AUTOHIDE_HIDING)
2146 {
2147 TRACE("AutoHide cancelling hide.\n");
2150 }
2151 else if (state == AUTOHIDE_HIDDEN)
2152 {
2153 TRACE("AutoHide starting show.\n");
2156 }
2157 }
2158 else
2159 {
2160 if (state == AUTOHIDE_SHOWING)
2161 {
2162 TRACE("AutoHide cancelling show.\n");
2165 }
2166 else if (state == AUTOHIDE_SHOWN)
2167 {
2168 TRACE("AutoHide starting hide.\n");
2171 }
2172
2174 }
2175 }
static int state
Definition: maze.c:121
#define AUTOHIDE_DELAY_SHOW
Definition: traywnd.cpp:35
#define BST_UNCHECKED
Definition: winuser.h:199

Referenced by OnTimer().

◆ QueryContextMenu()

HRESULT STDMETHODCALLTYPE CTrayWindow::QueryContextMenu ( HMENU  hPopup,
UINT  indexMenu,
UINT  idCmdFirst,
UINT  idCmdLast,
UINT  uFlags 
)
inline

Implements IContextMenu.

Definition at line 2498 of file traywnd.cpp.

2503 {
2504 if (!m_ContextMenu)
2505 {
2508 return hr;
2509 }
2510
2511 return m_ContextMenu->QueryContextMenu(hPopup, indexMenu, idCmdFirst, idCmdLast, uFlags);
2512 }
UINT uFlags
Definition: api.c:59
HRESULT TrayWindowCtxMenuCreator(ITrayWindow *TrayWnd, IN HWND hWndOwner, IContextMenu **ppCtxMenu)
Definition: traywnd.cpp:3870

◆ RaiseStartButton()

virtual HRESULT CTrayWindow::RaiseStartButton ( )
inlinevirtual

Definition at line 3702 of file traywnd.cpp.

3703 {
3704 m_StartButton.SendMessageW(BM_SETSTATE, FALSE, 0);
3705 return S_OK;
3706 }

Referenced by Tray_OnStartMenuDismissed().

◆ RegisterDesktopWindow()

virtual HRESULT STDMETHODCALLTYPE CTrayWindow::RegisterDesktopWindow ( IN HWND  hWndDesktop)
inlinevirtual

Definition at line 3688 of file traywnd.cpp.

3689 {
3690 TRACE("IShellDesktopTray::RegisterDesktopWindow(0x%p)\n", hWndDesktop);
3691
3692 m_DesktopWnd = hWndDesktop;
3693 return S_OK;
3694 }

◆ RegLoadSettings()

VOID CTrayWindow::RegLoadSettings ( )
inline

Definition at line 1793 of file traywnd.cpp.

1794 {
1795 DWORD Pos;
1796 RECT rcScreen;
1797 SIZE WndSize, EdgeSize, DlgFrameSize;
1798 SIZE StartBtnSize = m_StartButton.GetSize();
1799
1800 EdgeSize.cx = GetSystemMetrics(SM_CXEDGE);
1801 EdgeSize.cy = GetSystemMetrics(SM_CYEDGE);
1802 DlgFrameSize.cx = GetSystemMetrics(SM_CXDLGFRAME);
1803 DlgFrameSize.cy = GetSystemMetrics(SM_CYDLGFRAME);
1804
1806 rcScreen = g_TaskbarSettings.sr.Rect;
1807 GetScreenRectFromRect(&rcScreen, MONITOR_DEFAULTTONEAREST);
1808
1810 {
1811 /* Use the minimum size of the taskbar, we'll use the start
1812 button as a minimum for now. Make sure we calculate the
1813 entire window size, not just the client size. However, we
1814 use a thinner border than a standard thick border, so that
1815 the start button and bands are not stuck to the screen border. */
1816 if(!m_Theme)
1817 {
1818 g_TaskbarSettings.sr.Size.cx = StartBtnSize.cx + (2 * (EdgeSize.cx + DlgFrameSize.cx));
1819 g_TaskbarSettings.sr.Size.cy = StartBtnSize.cy + (2 * (EdgeSize.cy + DlgFrameSize.cy));
1820 }
1821 else
1822 {
1823 g_TaskbarSettings.sr.Size.cx = StartBtnSize.cx - EdgeSize.cx;
1824 g_TaskbarSettings.sr.Size.cy = StartBtnSize.cy - EdgeSize.cy;
1827 }
1828 }
1829 /* Determine a minimum tray window rectangle. The "client" height is
1830 zero here since we cannot determine an optimal minimum width when
1831 loaded as a vertical tray window. We just need to make sure the values
1832 loaded from the registry are at least. The windows explorer behaves
1833 the same way, it allows the user to save a zero width vertical tray
1834 window, but not a zero height horizontal tray window. */
1835 if(!m_Theme)
1836 {
1837 WndSize.cx = 2 * (EdgeSize.cx + DlgFrameSize.cx);
1838 WndSize.cy = StartBtnSize.cy + (2 * (EdgeSize.cy + DlgFrameSize.cy));
1839 }
1840 else
1841 {
1842 WndSize.cx = StartBtnSize.cx;
1843 WndSize.cy = StartBtnSize.cy - EdgeSize.cy;
1844 }
1845
1846 if (WndSize.cx < g_TaskbarSettings.sr.Size.cx)
1847 WndSize.cx = g_TaskbarSettings.sr.Size.cx;
1848 if (WndSize.cy < g_TaskbarSettings.sr.Size.cy)
1849 WndSize.cy = g_TaskbarSettings.sr.Size.cy;
1850
1851 /* Save the calculated size */
1852 m_TraySize = WndSize;
1853
1854 /* Calculate all docking rectangles. We need to do this here so they're
1855 initialized and dragging the tray window to another position gives
1856 usable results */
1857 for (Pos = ABE_LEFT; Pos <= ABE_BOTTOM; Pos++)
1858 {
1860 &rcScreen,
1861 &m_TraySize,
1862 &m_TrayRects[Pos]);
1863 // TRACE("m_TrayRects[%d(%d)]: %d,%d,%d,%d\n", Pos, Position, m_TrayRects[Pos].left, m_TrayRects[Pos].top, m_TrayRects[Pos].right, m_TrayRects[Pos].bottom);
1864 }
1865
1866 /* Determine which monitor we are on. It shouldn't matter which docked
1867 position rectangle we use */
1869 }
#define SM_CXDLGFRAME
Definition: winuser.h:966
#define SM_CYDLGFRAME
Definition: winuser.h:968

Referenced by OnCreate(), and OnDisplayChange().

◆ ResizeWorkArea()

VOID CTrayWindow::ResizeWorkArea ( )
inline

Definition at line 1720 of file traywnd.cpp.

1721 {
1722#if !WIN7_DEBUG_MODE
1723 RECT rcTray, rcWorkArea;
1724
1725 /* If monitor has changed then fix the previous monitors work area */
1727 {
1728 GetScreenRect(m_PreviousMonitor, &rcWorkArea);
1729 SystemParametersInfoW(SPI_SETWORKAREA,
1730 1,
1731 &rcWorkArea,
1733 }
1734
1735 rcTray = m_TrayRects[m_Position];
1736
1737 GetScreenRect(m_Monitor, &rcWorkArea);
1739
1740 /* If AutoHide is false then change the workarea to exclude
1741 the area that the taskbar covers. */
1743 {
1744 switch (m_Position)
1745 {
1746 case ABE_TOP:
1747 rcWorkArea.top = rcTray.bottom;
1748 break;
1749 case ABE_LEFT:
1750 rcWorkArea.left = rcTray.right;
1751 break;
1752 case ABE_RIGHT:
1753 rcWorkArea.right = rcTray.left;
1754 break;
1755 case ABE_BOTTOM:
1756 rcWorkArea.bottom = rcTray.top;
1757 break;
1758 }
1759 }
1760
1761 /*
1762 * Resize the current monitor work area. Win32k will also send
1763 * a WM_SIZE message to automatically resize the desktop.
1764 */
1765 SystemParametersInfoW(SPI_SETWORKAREA,
1766 1,
1767 &rcWorkArea,
1769#endif
1770 }
#define SPIF_SENDCHANGE
Definition: winuser.h:1572
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)

Referenced by CheckTrayWndPosition(), Lock(), and OnSize().

◆ RestoreAll()

VOID CTrayWindow::RestoreAll ( )
inline

Definition at line 3317 of file traywnd.cpp.

3318 {
3319 IgnorePulse = TRUE;
3321
3322 for (INT i = g_MinimizedAll.GetSize() - 1; i >= 0; --i)
3323 {
3324 HWND hwnd = g_MinimizedAll[i].hwnd;
3327 }
3328
3331 }
int GetSize() const
Definition: atlsimpcoll.h:104
BOOL IsIconic() const
Definition: atlwin.h:932
BOOL WINAPI SetWindowPlacement(_In_ HWND hWnd, _In_ const WINDOWPLACEMENT *)

Referenced by ExecContextMenuCmd(), HandleCommand(), HandleHotKey(), and ToggleDesktop().

◆ RestoreMinimizedNonTaskWnds()

void CTrayWindow::RestoreMinimizedNonTaskWnds ( BOOL  bDestroyed,
HWND  hwndActive 
)
inline

Definition at line 3212 of file traywnd.cpp.

3213 {
3214 for (INT i = g_MinimizedAll.GetSize() - 1; i >= 0; --i)
3215 {
3216 HWND hwnd = g_MinimizedAll[i].hwnd;
3217 if (!hwnd || hwndActive == hwnd)
3218 continue;
3219
3222 {
3223 ::SetWindowPlacement(hwnd, &g_MinimizedAll[i].wndpl); // Restore
3224 }
3225 }
3226
3228
3229 if (!bDestroyed)
3230 ::SetForegroundWindow(hwndActive);
3231 }
BOOL STDMETHODCALLTYPE IsTaskWnd(HWND hWnd)
Definition: traywnd.cpp:2481

Referenced by OnPulse().

◆ RunFileDlgThread()

DWORD WINAPI CTrayWindow::RunFileDlgThread ( )
inline

Definition at line 680 of file traywnd.cpp.

681 {
682 HWND hwnd;
683 RECT posRect;
684
686
688 WC_STATIC,
689 NULL,
691 posRect.left,
692 posRect.top,
693 posRect.right - posRect.left,
694 posRect.bottom - posRect.top,
695 NULL,
696 NULL,
697 NULL,
698 NULL);
699
701
702 // build the default directory from two environment variables
703 CStringW strDefaultDir, strHomePath;
704 strDefaultDir.GetEnvironmentVariable(L"HOMEDRIVE");
705 strHomePath.GetEnvironmentVariable(L"HOMEPATH");
706 strDefaultDir += strHomePath;
707
709
712
713 return 0;
714 }
BOOL GetEnvironmentVariable(_In_z_ PCXSTR pszVar)
Definition: cstringt.h:658
void WINAPI RunFileDlg(HWND hWndOwner, HICON hIcon, LPCWSTR lpstrDirectory, LPCWSTR lpstrTitle, LPCWSTR lpstrDescription, UINT uFlags)
Definition: dialogs.cpp:409
#define WS_OVERLAPPED
Definition: pedump.c:615
#define WS_DISABLED
Definition: pedump.c:621
#define SS_LEFT
Definition: pedump.c:692
#define WC_STATIC
Definition: commctrl.h:4682
#define RFF_CALCDIRECTORY
Definition: run.h:35
#define CreateWindowEx
Definition: winuser.h:5755

◆ s_RunFileDlgThread()

static DWORD WINAPI CTrayWindow::s_RunFileDlgThread ( IN OUT PVOID  pParam)
inlinestatic

Definition at line 716 of file traywnd.cpp.

717 {
718 CTrayWindow * This = (CTrayWindow*) pParam;
719 return This->RunFileDlgThread();
720 }

Referenced by DisplayRunFileDlg().

◆ s_TrayPropertiesThread()

static DWORD WINAPI CTrayWindow::s_TrayPropertiesThread ( IN OUT PVOID  pParam)
inlinestatic

Definition at line 768 of file traywnd.cpp.

769 {
770 CTrayWindow *This = (CTrayWindow*) pParam;
771
772 return This->TrayPropertiesThread();
773 }

Referenced by DisplayProperties().

◆ ShowDesktop()

VOID CTrayWindow::ShowDesktop ( )
inline

Definition at line 3312 of file traywnd.cpp.

3313 {
3315 }

Referenced by ExecContextMenuCmd(), HandleCommand(), and ToggleDesktop().

◆ ToggleDesktop()

VOID CTrayWindow::ToggleDesktop ( )
inline

Definition at line 822 of file traywnd.cpp.

823 {
825 {
826 ShowDesktop();
827 }
828 else
829 {
830 RestoreAll();
831 }
832 }

Referenced by HandleCommand(), and HandleHotKey().

◆ TrackCtxMenu()

HRESULT CTrayWindow::TrackCtxMenu ( IN IContextMenu contextMenu,
IN POINT *ppt  OPTIONAL,
IN HWND hwndExclude  OPTIONAL,
IN BOOL  TrackUp,
IN PVOID Context  OPTIONAL 
)
inline

Definition at line 1131 of file traywnd.cpp.

1137 {
1138 POINT pt;
1140 RECT rc;
1141 HRESULT hr;
1142 UINT uCommand;
1143 HMENU popup = CreatePopupMenu();
1144
1145 if (popup == NULL)
1146 return E_FAIL;
1147
1148 if (ppt)
1149 {
1150 pt = *ppt;
1151 }
1152 else
1153 {
1154 ::GetWindowRect(m_hWnd, &rc);
1155 pt.x = rc.left;
1156 pt.y = rc.top;
1157 }
1158
1159 TRACE("Before Query\n");
1160 hr = contextMenu->QueryContextMenu(popup, 0, 0, UINT_MAX, CMF_NORMAL);
1162 {
1163 TRACE("Query failed\n");
1164 DestroyMenu(popup);
1165 return hr;
1166 }
1167
1168 TRACE("Before Tracking\n");
1170 if (hwndExclude)
1171 {
1172 ::GetWindowRect(hwndExclude, &rc);
1173 ZeroMemory(&params, sizeof(params));
1174 params.cbSize = sizeof(params);
1175 params.rcExclude = rc;
1176 uCommand = ::TrackPopupMenuEx(popup, TPM_RETURNCMD, pt.x, pt.y, m_hWnd, &params);
1177 }
1178 else
1179 {
1180 uCommand = ::TrackPopupMenuEx(popup, TPM_RETURNCMD, pt.x, pt.y, m_hWnd, NULL);
1181 }
1183
1184 if (uCommand != 0)
1185 {
1186 TRACE("Before InvokeCommand\n");
1187 CMINVOKECOMMANDINFO cmi = { 0 };
1188 cmi.cbSize = sizeof(cmi);
1189 cmi.lpVerb = MAKEINTRESOURCEA(uCommand);
1190 cmi.hwnd = m_hWnd;
1191 hr = contextMenu->InvokeCommand(&cmi);
1192 }
1193 else
1194 {
1195 TRACE("TrackPopupMenu failed. Code=%d, LastError=%d\n", uCommand, GetLastError());
1196 hr = S_FALSE;
1197 }
1198
1199 DestroyMenu(popup);
1200 return hr;
1201 }
GLenum const GLfloat * params
Definition: glext.h:5645
#define UINT_MAX
Definition: limits.h:41
struct IContextMenu::tagCMINVOKECOMMANDINFO CMINVOKECOMMANDINFO
#define S_FALSE
Definition: winerror.h:2357
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:838
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
#define WM_NULL
Definition: winuser.h:1607
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define TPM_RETURNCMD
Definition: winuser.h:2387

Referenced by OnContextMenu().

◆ TrackMenu()

UINT CTrayWindow::TrackMenu ( IN HMENU  hMenu,
IN POINT *ppt  OPTIONAL,
IN HWND hwndExclude  OPTIONAL,
IN BOOL  TrackUp,
IN BOOL  IsContextMenu 
)
inline

Definition at line 1060 of file traywnd.cpp.

1066 {
1067 TPMPARAMS tmp, *ptmp = NULL;
1068 POINT pt;
1069 UINT cmdId;
1070 UINT fuFlags;
1071
1072 if (hwndExclude != NULL)
1073 {
1074 /* Get the client rectangle and map it to screen coordinates */
1075 if (::GetClientRect(hwndExclude,
1076 &tmp.rcExclude) &&
1077 ::MapWindowPoints(hwndExclude,
1078 NULL,
1079 (LPPOINT) &tmp.rcExclude,
1080 2) != 0)
1081 {
1082 ptmp = &tmp;
1083 }
1084 }
1085
1086 if (ppt == NULL)
1087 {
1088 if (ptmp == NULL &&
1089 GetClientRect(&tmp.rcExclude) &&
1091 NULL,
1092 (LPPOINT) &tmp.rcExclude,
1093 2) != 0)
1094 {
1095 ptmp = &tmp;
1096 }
1097
1098 if (ptmp != NULL)
1099 {
1100 /* NOTE: TrackPopupMenuEx will eventually align the track position
1101 for us, no need to take care of it here as long as the
1102 coordinates are somewhere within the exclusion rectangle */
1103 pt.x = ptmp->rcExclude.left;
1104 pt.y = ptmp->rcExclude.top;
1105 }
1106 else
1107 pt.x = pt.y = 0;
1108 }
1109 else
1110 pt = *ppt;
1111
1112 tmp.cbSize = sizeof(tmp);
1113
1114 fuFlags = TPM_RETURNCMD | TPM_VERTICAL;
1115 fuFlags |= (TrackUp ? TPM_BOTTOMALIGN : TPM_TOPALIGN);
1116 if (IsContextMenu)
1117 fuFlags |= TPM_RIGHTBUTTON;
1118 else
1119 fuFlags |= (TrackUp ? TPM_VERNEGANIMATION : TPM_VERPOSANIMATION);
1120
1121 cmdId = TrackPopupMenuEx(hMenu,
1122 fuFlags,
1123 pt.x,
1124 pt.y,
1125 m_hWnd,
1126 ptmp);
1127
1128 return cmdId;
1129 }
RECT rcExclude
Definition: winuser.h:3576
UINT cbSize
Definition: winuser.h:3575
#define TPM_RIGHTBUTTON
Definition: winuser.h:2380
#define TPM_BOTTOMALIGN
Definition: winuser.h:2385
#define TPM_TOPALIGN
Definition: winuser.h:2383
#define TPM_VERTICAL
Definition: winuser.h:2382

Referenced by OnSysChar().

◆ TrayMessageLoop()

VOID CTrayWindow::TrayMessageLoop ( )
inline

Definition at line 3641 of file traywnd.cpp.

3642 {
3643 MSG Msg;
3644 BOOL Ret;
3645
3646 /* FIXME: We should keep a reference here... */
3647
3648 while (true)
3649 {
3650 Ret = GetMessage(&Msg, NULL, 0, 0);
3651
3652 if (!Ret || Ret == -1)
3653 break;
3654
3655 if (m_StartMenuBand == NULL ||
3656 m_StartMenuBand->IsMenuMessage(&Msg) != S_OK)
3657 {
3660 }
3661 }
3662 }
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define GetMessage
Definition: winuser.h:5790
#define DispatchMessage
Definition: winuser.h:5765

Referenced by TrayMessageLoop().

◆ TrayProcessMessages()

VOID CTrayWindow::TrayProcessMessages ( )
inline

Definition at line 3621 of file traywnd.cpp.

3622 {
3623 MSG Msg;
3624
3625 /* FIXME: We should keep a reference here... */
3626
3627 while (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE))
3628 {
3629 if (Msg.message == WM_QUIT)
3630 break;
3631
3632 if (m_StartMenuBand == NULL ||
3633 m_StartMenuBand->IsMenuMessage(&Msg) != S_OK)
3634 {
3637 }
3638 }
3639 }
#define PM_REMOVE
Definition: winuser.h:1196
#define PeekMessage
Definition: winuser.h:5830

Referenced by TrayProcessMessages().

◆ TrayPropertiesThread()

DWORD WINAPI CTrayWindow::TrayPropertiesThread ( )
inline

Definition at line 739 of file traywnd.cpp.

740 {
741 HWND hwnd;
742 RECT posRect;
743
746 WC_STATIC,
747 NULL,
749 posRect.left,
750 posRect.top,
751 posRect.right - posRect.left,
752 posRect.bottom - posRect.top,
753 NULL,
754 NULL,
755 NULL,
756 NULL);
757
759
761
764
765 return 0;
766 }
VOID DisplayTrayProperties(IN HWND hwndOwner, IN HWND hwndTaskbar)
Definition: trayprop.cpp:344

◆ Unknown()

virtual HRESULT STDMETHODCALLTYPE CTrayWindow::Unknown ( IN DWORD  dwUnknown1,
IN DWORD  dwUnknown2 
)
inlinevirtual

Definition at line 3696 of file traywnd.cpp.

3697 {
3698 TRACE("IShellDesktopTray::Unknown(%u,%u) unimplemented!\n", dwUnknown1, dwUnknown2);
3699 return S_OK;
3700 }

◆ UpdateFonts()

void CTrayWindow::UpdateFonts ( )
inline

Definition at line 1211 of file traywnd.cpp.

1212 {
1213 /* There is nothing to do if themes are enabled */
1214 if (m_Theme)
1215 return;
1216
1218
1219 NONCLIENTMETRICS ncm = {sizeof(ncm)};
1220 if (!SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, FALSE))
1221 {
1222 ERR("SPI_GETNONCLIENTMETRICS failed\n");
1223 return;
1224 }
1225
1226 if (m_Font != NULL)
1228
1229 ncm.lfCaptionFont.lfWeight = FW_NORMAL;
1230 m_Font = CreateFontIndirect(&ncm.lfCaptionFont);
1231 if (!m_Font)
1232 {
1233 ERR("CreateFontIndirect failed\n");
1234 return;
1235 }
1236
1240 }
VOID UpdateFont()
Definition: traywnd.cpp:239
#define FW_NORMAL
Definition: wingdi.h:373
#define CreateFontIndirect
Definition: wingdi.h:4444
#define WM_SETFONT
Definition: winuser.h:1650

Referenced by OnCreate(), and OnSettingChanged().

Member Data Documentation

◆ 

union { ... } CTrayWindow::@104

◆ Flags

DWORD CTrayWindow::Flags

Definition at line 568 of file traywnd.cpp.

◆ IgnorePulse

DWORD CTrayWindow::IgnorePulse

Definition at line 575 of file traywnd.cpp.

Referenced by CTrayWindow(), MinimizeAll(), OnPulse(), OnTimer(), and RestoreAll().

◆ InSizeMove

DWORD CTrayWindow::InSizeMove

Definition at line 572 of file traywnd.cpp.

Referenced by ChangingWinPos(), OnEnterSizeMove(), and OnExitSizeMove().

◆ IsDragging

DWORD CTrayWindow::IsDragging

Definition at line 573 of file traywnd.cpp.

Referenced by ChangingWinPos(), OnEnterSizeMove(), and OnMoving().

◆ m_AutoHideOffset

SIZE CTrayWindow::m_AutoHideOffset
private

◆ m_AutoHideState

UINT CTrayWindow::m_AutoHideState
private

◆ m_ContextMenu

CComPtr<IContextMenu> CTrayWindow::m_ContextMenu
private

Definition at line 533 of file traywnd.cpp.

Referenced by GetCommandString(), InvokeCommand(), and QueryContextMenu().

◆ m_DesktopWnd

HWND CTrayWindow::m_DesktopWnd
private

Definition at line 538 of file traywnd.cpp.

Referenced by IsSpecialHWND(), MinimizeAll(), and RegisterDesktopWindow().

◆ m_DraggingMonitor

HMONITOR CTrayWindow::m_DraggingMonitor
private

Definition at line 549 of file traywnd.cpp.

Referenced by ChangingWinPos(), and OnMoving().

◆ m_DraggingPosition

DWORD CTrayWindow::m_DraggingPosition
private

Definition at line 548 of file traywnd.cpp.

Referenced by ChangingWinPos(), and OnMoving().

◆ m_Font

HFONT CTrayWindow::m_Font
private

Definition at line 536 of file traywnd.cpp.

Referenced by UpdateFonts(), and ~CTrayWindow().

◆ m_Monitor

HMONITOR CTrayWindow::m_Monitor
private

Definition at line 546 of file traywnd.cpp.

Referenced by ApplyClipping(), ChangingWinPos(), RegLoadSettings(), and ResizeWorkArea().

◆ m_MouseTrackingInfo

TRACKMOUSEEVENT CTrayWindow::m_MouseTrackingInfo
private

Definition at line 559 of file traywnd.cpp.

Referenced by CTrayWindow().

◆ m_Position

◆ m_PreviousMonitor

HMONITOR CTrayWindow::m_PreviousMonitor
private

Definition at line 547 of file traywnd.cpp.

Referenced by ResizeWorkArea().

◆ m_Rebar

HWND CTrayWindow::m_Rebar
private

Definition at line 539 of file traywnd.cpp.

Referenced by AlignControls(), FitToRebar(), OnContextMenu(), OnCreate(), and UpdateFonts().

◆ m_RunFileDlgOwner

HWND CTrayWindow::m_RunFileDlgOwner
private

Definition at line 555 of file traywnd.cpp.

Referenced by DisplayRunFileDlg(), and RunFileDlgThread().

◆ m_ShellServices

HDPA CTrayWindow::m_ShellServices
private

Definition at line 561 of file traywnd.cpp.

Referenced by OnCreate(), and ~CTrayWindow().

◆ m_ShowDesktopButton

CTrayShowDesktopButton CTrayWindow::m_ShowDesktopButton
private

◆ m_StartButton

◆ m_StartMenuBand

CComPtr<IMenuBand> CTrayWindow::m_StartMenuBand
private

Definition at line 529 of file traywnd.cpp.

Referenced by if(), OnCreate(), OnSettingChanged(), TrayMessageLoop(), and TrayProcessMessages().

◆ m_StartMenuPopup

CComPtr<IMenuPopup> CTrayWindow::m_StartMenuPopup
private

◆ m_TaskBand

CComPtr<IDeskBand> CTrayWindow::m_TaskBand
private

Definition at line 532 of file traywnd.cpp.

Referenced by OnCreate().

◆ m_TaskSwitch

HWND CTrayWindow::m_TaskSwitch
private

◆ m_Theme

◆ m_TrayBandSite

CComPtr<ITrayBandSite> CTrayWindow::m_TrayBandSite

Definition at line 564 of file traywnd.cpp.

Referenced by CheckTrayWndPosition(), Lock(), OnCommand(), OnContextMenu(), OnCreate(), and OnNotify().

◆ m_TrayNotify

HWND CTrayWindow::m_TrayNotify
private

◆ m_TrayNotifyInstance

CComPtr<IUnknown> CTrayWindow::m_TrayNotifyInstance
private

Definition at line 543 of file traywnd.cpp.

Referenced by OnCreate().

◆ m_TrayPropertiesOwner

HWND CTrayWindow::m_TrayPropertiesOwner
private

Definition at line 554 of file traywnd.cpp.

Referenced by DisplayProperties(), and TrayPropertiesThread().

◆ m_TrayRects

◆ m_TraySize

SIZE CTrayWindow::m_TraySize
private

◆ NewPosSize

DWORD CTrayWindow::NewPosSize

Definition at line 574 of file traywnd.cpp.


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