ReactOS 0.4.16-dev-1408-gbc64f3a
CTaskSwitchWnd Class Reference
Inheritance diagram for CTaskSwitchWnd:
Collaboration diagram for CTaskSwitchWnd:

Classes

struct  tagFULLSCREENDATA
 
struct  tagRUDEAPPDATA
 

Public Types

typedef struct CTaskSwitchWnd::tagRUDEAPPDATA RUDEAPPDATA
 
typedef struct CTaskSwitchWnd::tagRUDEAPPDATAPRUDEAPPDATA
 
typedef struct CTaskSwitchWnd::tagFULLSCREENDATA FULLSCREENDATA
 
typedef struct CTaskSwitchWnd::tagFULLSCREENDATAPFULLSCREENDATA
 
- 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 Member Functions

 CTaskSwitchWnd ()
 
virtual ~CTaskSwitchWnd ()
 
INT GetWndTextFromTaskItem (IN PTASK_ITEM TaskItem, LPWSTR szBuf, DWORD cchBuf)
 
VOID UpdateIndexesAfter (IN INT iIndex, BOOL bInserted)
 
INT UpdateTaskGroupButton (IN PTASK_GROUP TaskGroup)
 
VOID ExpandTaskGroup (IN PTASK_GROUP TaskGroup)
 
HICON GetWndIcon (HWND hwnd)
 
INT UpdateTaskItemButton (IN PTASK_ITEM TaskItem)
 
VOID RemoveIcon (IN PTASK_ITEM TaskItem)
 
PTASK_ITEM FindLastTaskItemOfGroup (IN PTASK_GROUP TaskGroup OPTIONAL, IN PTASK_ITEM NewTaskItem OPTIONAL)
 
INT CalculateTaskItemNewButtonIndex (IN PTASK_ITEM TaskItem)
 
INT AddTaskItemButton (IN OUT PTASK_ITEM TaskItem)
 
BOOL DeleteTaskItemButton (IN OUT PTASK_ITEM TaskItem)
 
PTASK_GROUP AddToTaskGroup (IN HWND hWnd)
 
VOID RemoveTaskFromTaskGroup (IN OUT PTASK_ITEM TaskItem)
 
PTASK_ITEM FindTaskItem (IN HWND hWnd)
 
PTASK_ITEM FindOtherTaskItem (IN HWND hWnd)
 
PTASK_ITEM AllocTaskItem ()
 
VOID FreeTaskItem (IN OUT PTASK_ITEM TaskItem)
 
VOID DeleteTaskItem (IN OUT PTASK_ITEM TaskItem)
 
VOID CheckActivateTaskItem (IN OUT PTASK_ITEM TaskItem)
 
PTASK_ITEM FindTaskItemByIndex (IN INT Index)
 
PTASK_GROUP FindTaskGroupByIndex (IN INT Index)
 
BOOL AddTask (IN HWND hWnd)
 
BOOL ActivateTaskItem (IN OUT PTASK_ITEM TaskItem OPTIONAL)
 
BOOL ActivateTask (IN HWND hWnd)
 
BOOL DeleteTask (IN HWND hWnd)
 
VOID DeleteAllTasks ()
 
VOID FlashTaskItem (IN OUT PTASK_ITEM TaskItem)
 
BOOL FlashTask (IN HWND hWnd)
 
VOID RedrawTaskItem (IN OUT PTASK_ITEM TaskItem)
 
BOOL RedrawTask (IN HWND hWnd)
 
VOID UpdateButtonsSize (IN BOOL bRedrawDisabled)
 
BOOL CALLBACK EnumWindowsProc (IN HWND hWnd)
 
BOOL RefreshWindowList ()
 
LRESULT OnThemeChanged (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCreate (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnDestroy (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
BOOL HandleAppCommand (IN WPARAM wParam, IN LPARAM lParam)
 
LRESULT OnShellHook (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
VOID HandleTaskItemClick (IN OUT PTASK_ITEM TaskItem)
 
VOID HandleTaskGroupClick (IN OUT PTASK_GROUP TaskGroup)
 
BOOL HandleButtonClick (IN WORD wIndex)
 
VOID HandleTaskItemRightClick (IN OUT PTASK_ITEM TaskItem)
 
VOID HandleTaskGroupRightClick (IN OUT PTASK_GROUP TaskGroup)
 
BOOL HandleButtonRightClick (IN WORD wIndex)
 
LRESULT HandleItemPaint (IN OUT NMTBCUSTOMDRAW *nmtbcd)
 
LRESULT HandleToolbarNotification (IN const NMHDR *nmh)
 
void HandleFullScreenApp (_In_opt_ HWND hwndRude)
 
HWND FindRudeApp (_In_opt_ HWND hwndFirstCheck)
 
LRESULT OnWindowPosChanged (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
void OnWindowActivated (_In_ HWND hwndTarget)
 
void OnWindowDestroyed (_In_ HWND hwndTarget)
 
LRESULT OnEraseBackground (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSize (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNcHitTest (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCommand (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnNotify (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnUpdateTaskbarPos (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnTaskbarSettingsChanged (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnContextMenu (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnKludgeItemRect (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnMouseActivate (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnTimer (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSetFont (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSettingChanged (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCopyData (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
HRESULT Initialize (IN HWND hWndParent, IN OUT ITrayWindow *tray)
 
STDMETHODIMP GetWindow (HWND *phwnd) override
 
STDMETHODIMP ContextSensitiveHelp (BOOL fEnterMode) override
 
- 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< CTaskSwitchWnd, 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 ()
 

Static Public Member Functions

static BOOL CALLBACK s_EnumWindowsProc (IN HWND hWnd, IN LPARAM lParam)
 
static BOOL InvokeRegistryAppKeyCommand (UINT uAppCmd)
 
static VOID CALLBACK SendAsyncProc (HWND hwnd, UINT uMsg, DWORD_PTR dwData, LRESULT lResult)
 
static BOOL CALLBACK IsRudeEnumProc (_In_ HWND hwnd, _In_ LPARAM lParam)
 
static BOOL CALLBACK FullScreenEnumProc (_In_ HMONITOR hMonitor, _In_opt_ HDC hDC, _In_ LPRECT prc, _In_ LPARAM lParam)
 
- Static Public Member Functions inherited from ATL::CComCoClass< CTaskSwitchWnd >
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< CTaskSwitchWnd, 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)
 

Private Attributes

CTaskToolbar m_TaskBar
 
CComPtr< ITrayWindow > m_Tray
 
UINT m_ShellHookMsg
 
WORD m_TaskItemCount
 
WORD m_AllocatedTaskItems
 
PTASK_GROUP m_TaskGroups
 
PTASK_ITEM m_TaskItems
 
PTASK_ITEM m_ActiveTaskItem
 
HTHEME m_Theme
 
UINT m_ButtonsPerLine
 
WORD m_ButtonCount
 
HIMAGELIST m_ImageList
 
BOOL m_IsGroupingEnabled
 
BOOL m_IsDestroying
 
INT m_nRudeAppValidationCounter
 
SIZE m_ButtonSize
 
UINT m_uHardErrorMsg
 
CHardErrorThread m_HardErrorThread
 

Additional Inherited Members

- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 
- Public Attributes inherited from ATL::CWindowImplBaseT< TBase, TWinTraits >
WNDPROC m_pfnSuperWindowProc
 
- Public Attributes inherited from ATL::CWindowImplRoot< TBase >
CWndProcThunk m_thunk
 
const _ATL_MSGm_pCurrentMsg
 
DWORD m_dwState
 
- Public Attributes inherited from ATL::CWindow
HWND m_hWnd
 
- Static Public Attributes inherited from ATL::CWindow
static RECT rcDefault
 

Detailed Description

Definition at line 380 of file taskswnd.cpp.

Member Typedef Documentation

◆ FULLSCREENDATA

◆ PFULLSCREENDATA

◆ PRUDEAPPDATA

◆ RUDEAPPDATA

Constructor & Destructor Documentation

◆ CTaskSwitchWnd()

CTaskSwitchWnd::CTaskSwitchWnd ( )
inline

Definition at line 416 of file taskswnd.cpp.

416 :
423 m_Theme(NULL),
425 m_ButtonCount(0),
430 {
433 }
UINT m_ShellHookMsg
Definition: taskswnd.cpp:390
PTASK_ITEM m_ActiveTaskItem
Definition: taskswnd.cpp:397
PTASK_ITEM m_TaskItems
Definition: taskswnd.cpp:396
INT m_nRudeAppValidationCounter
Definition: taskswnd.cpp:408
UINT m_uHardErrorMsg
Definition: taskswnd.cpp:412
BOOL m_IsDestroying
Definition: taskswnd.cpp:406
WORD m_ButtonCount
Definition: taskswnd.cpp:401
HTHEME m_Theme
Definition: taskswnd.cpp:399
PTASK_GROUP m_TaskGroups
Definition: taskswnd.cpp:395
BOOL m_IsGroupingEnabled
Definition: taskswnd.cpp:405
WORD m_AllocatedTaskItems
Definition: taskswnd.cpp:393
HIMAGELIST m_ImageList
Definition: taskswnd.cpp:403
WORD m_TaskItemCount
Definition: taskswnd.cpp:392
UINT m_ButtonsPerLine
Definition: taskswnd.cpp:400
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define L(x)
Definition: resources.c:13
#define ZeroMemory
Definition: winbase.h:1753
UINT WINAPI RegisterWindowMessageW(_In_ LPCWSTR)

◆ ~CTaskSwitchWnd()

virtual CTaskSwitchWnd::~CTaskSwitchWnd ( )
inlinevirtual

Definition at line 434 of file taskswnd.cpp.

434{ }

Member Function Documentation

◆ ActivateTask()

BOOL CTaskSwitchWnd::ActivateTask ( IN HWND  hWnd)
inline

Definition at line 1227 of file taskswnd.cpp.

1228 {
1229 PTASK_ITEM TaskItem;
1230
1231 if (!hWnd)
1232 {
1233 return ActivateTaskItem(NULL);
1234 }
1235
1236 TaskItem = FindTaskItem(hWnd);
1237 if (TaskItem == NULL)
1238 {
1239 TaskItem = FindOtherTaskItem(hWnd);
1240 }
1241
1242 if (TaskItem == NULL)
1243 {
1244 WARN("Activate window 0x%p, could not find task\n", hWnd);
1246 }
1247
1248 return ActivateTaskItem(TaskItem);
1249 }
HWND hWnd
Definition: settings.c:17
#define WARN(fmt,...)
Definition: precomp.h:61
PTASK_ITEM FindOtherTaskItem(IN HWND hWnd)
Definition: taskswnd.cpp:970
BOOL ActivateTaskItem(IN OUT PTASK_ITEM TaskItem OPTIONAL)
Definition: taskswnd.cpp:1216
BOOL RefreshWindowList()
Definition: taskswnd.cpp:1494
PTASK_ITEM FindTaskItem(IN HWND hWnd)
Definition: taskswnd.cpp:953

Referenced by HandleTaskItemRightClick(), and OnShellHook().

◆ ActivateTaskItem()

BOOL CTaskSwitchWnd::ActivateTaskItem ( IN OUT PTASK_ITEM TaskItem  OPTIONAL)
inline

Definition at line 1216 of file taskswnd.cpp.

1217 {
1218 if (TaskItem != NULL)
1219 {
1220 TRACE("Activate window 0x%p on button %d\n", TaskItem->hWnd, TaskItem->Index);
1221 }
1222
1223 CheckActivateTaskItem(TaskItem);
1224 return FALSE;
1225 }
VOID CheckActivateTaskItem(IN OUT PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:1096
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by ActivateTask().

◆ AddTask()

BOOL CTaskSwitchWnd::AddTask ( IN HWND  hWnd)
inline

Definition at line 1187 of file taskswnd.cpp.

1188 {
1189 PTASK_ITEM TaskItem;
1190
1191 if (!::IsWindow(hWnd) || m_Tray->IsSpecialHWND(hWnd))
1192 return FALSE;
1193
1194 TaskItem = FindTaskItem(hWnd);
1195 if (TaskItem == NULL)
1196 {
1197 TRACE("Add window 0x%p\n", hWnd);
1198 TaskItem = AllocTaskItem();
1199 if (TaskItem != NULL)
1200 {
1201 ZeroMemory(TaskItem, sizeof(*TaskItem));
1202 TaskItem->hWnd = hWnd;
1203 TaskItem->Index = -1;
1204 TaskItem->Group = AddToTaskGroup(hWnd);
1205
1206 if (!m_IsDestroying)
1207 {
1208 AddTaskItemButton(TaskItem);
1209 }
1210 }
1211 }
1212
1213 return TaskItem != NULL;
1214 }
BOOL IsWindow() const
Definition: atlwin.h:947
PTASK_GROUP AddToTaskGroup(IN HWND hWnd)
Definition: taskswnd.cpp:863
CComPtr< ITrayWindow > m_Tray
Definition: taskswnd.cpp:388
PTASK_ITEM AllocTaskItem()
Definition: taskswnd.cpp:1011
INT AddTaskItemButton(IN OUT PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:768
PTASK_GROUP Group
Definition: taskswnd.cpp:167

Referenced by EnumWindowsProc(), and OnShellHook().

◆ AddTaskItemButton()

INT CTaskSwitchWnd::AddTaskItemButton ( IN OUT PTASK_ITEM  TaskItem)
inline

Definition at line 768 of file taskswnd.cpp.

769 {
770 WCHAR windowText[255];
771 TBBUTTON tbBtn = { 0 };
772 INT iIndex;
773 HICON icon;
774
775 if (TaskItem->Index >= 0)
776 {
777 return UpdateTaskItemButton(TaskItem);
778 }
779
780 if (TaskItem->Group != NULL &&
781 TaskItem->Group->IsCollapsed)
782 {
783 /* The task group is collapsed, we only need to update the group button */
784 return UpdateTaskGroupButton(TaskItem->Group);
785 }
786
787 icon = GetWndIcon(TaskItem->hWnd);
788 if (!icon)
789 icon = static_cast<HICON>(LoadImageW(NULL, MAKEINTRESOURCEW(OIC_SAMPLE), IMAGE_ICON, 0, 0, LR_SHARED | LR_DEFAULTSIZE));
790 TaskItem->IconIndex = ImageList_ReplaceIcon(m_ImageList, -1, icon);
791
792 tbBtn.iBitmap = TaskItem->IconIndex;
795 tbBtn.dwData = TaskItem->Index;
796
798 {
799 tbBtn.iString = (DWORD_PTR) windowText;
800 }
801
802 /* Find out where to insert the new button */
803 iIndex = CalculateTaskItemNewButtonIndex(TaskItem);
804 ASSERT(iIndex >= 0);
805 tbBtn.idCommand = iIndex;
806
808
809 if (m_TaskBar.InsertButton(iIndex, &tbBtn))
810 {
811 UpdateIndexesAfter(iIndex, TRUE);
812
813 TRACE("Added button %d for hwnd 0x%p\n", iIndex, TaskItem->hWnd);
814
815 TaskItem->Index = iIndex;
817
818 /* Update button sizes and fix the button wrapping */
820 return iIndex;
821 }
822
824
825 return -1;
826 }
WCHAR windowText[1024]
Definition: appswitch.c:48
INT UpdateTaskItemButton(IN PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:612
INT GetWndTextFromTaskItem(IN PTASK_ITEM TaskItem, LPWSTR szBuf, DWORD cchBuf)
Definition: taskswnd.cpp:436
VOID UpdateButtonsSize(IN BOOL bRedrawDisabled)
Definition: taskswnd.cpp:1342
CTaskToolbar m_TaskBar
Definition: taskswnd.cpp:386
VOID UpdateIndexesAfter(IN INT iIndex, BOOL bInserted)
Definition: taskswnd.cpp:496
INT UpdateTaskGroupButton(IN PTASK_GROUP TaskGroup)
Definition: taskswnd.cpp:559
HICON GetWndIcon(HWND hwnd)
Definition: taskswnd.cpp:577
INT CalculateTaskItemNewButtonIndex(IN PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:724
VOID BeginUpdate()
Definition: taskswnd.cpp:320
VOID EndUpdate()
Definition: taskswnd.cpp:325
#define TRUE
Definition: types.h:120
INT WINAPI ImageList_ReplaceIcon(HIMAGELIST himl, INT nIndex, HICON hIcon)
Definition: imagelist.c:2839
#define ASSERT(a)
Definition: mode.c:44
static HICON
Definition: imagelist.c:80
#define BTNS_SHOWTEXT
Definition: commctrl.h:1006
#define TBSTATE_ELLIPSES
Definition: commctrl.h:978
#define TBSTATE_ENABLED
Definition: commctrl.h:974
#define BTNS_CHECK
Definition: commctrl.h:1000
#define BTNS_NOPREFIX
Definition: commctrl.h:1005
#define _countof(array)
Definition: sndvol32.h:70
BYTE fsState
Definition: commctrl.h:951
INT_PTR iString
Definition: commctrl.h:959
int idCommand
Definition: commctrl.h:950
DWORD_PTR dwData
Definition: commctrl.h:958
int iBitmap
Definition: commctrl.h:949
BYTE fsStyle
Definition: commctrl.h:952
#define DWORD_PTR
Definition: treelist.c:76
int32_t INT
Definition: typedefs.h:58
#define IMAGE_ICON
Definition: winuser.h:212
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2540
#define LR_SHARED
Definition: winuser.h:1111
#define LR_DEFAULTSIZE
Definition: winuser.h:1105
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by AddTask().

◆ AddToTaskGroup()

PTASK_GROUP CTaskSwitchWnd::AddToTaskGroup ( IN HWND  hWnd)
inline

Definition at line 863 of file taskswnd.cpp.

864 {
865 DWORD dwProcessId;
866 PTASK_GROUP TaskGroup, *PrevLink;
867
869 &dwProcessId))
870 {
871 TRACE("Cannot get process id of hwnd 0x%p\n", hWnd);
872 return NULL;
873 }
874
875 /* Try to find an existing task group */
876 TaskGroup = m_TaskGroups;
877 PrevLink = &m_TaskGroups;
878 while (TaskGroup != NULL)
879 {
880 if (TaskGroup->dwProcessId == dwProcessId)
881 {
882 TaskGroup->dwTaskCount++;
883 return TaskGroup;
884 }
885
886 PrevLink = &TaskGroup->Next;
887 TaskGroup = TaskGroup->Next;
888 }
889
890 /* Allocate a new task group */
891 TaskGroup = (PTASK_GROUP) HeapAlloc(hProcessHeap,
893 sizeof(*TaskGroup));
894 if (TaskGroup != NULL)
895 {
896 TaskGroup->dwTaskCount = 1;
897 TaskGroup->dwProcessId = dwProcessId;
898 TaskGroup->Index = -1;
899
900 /* Add the task group to the list */
901 *PrevLink = TaskGroup;
902 }
903
904 return TaskGroup;
905 }
HANDLE hProcessHeap
Definition: explorer.cpp:25
#define HeapAlloc
Definition: compat.h:733
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _TASK_GROUP * Next
Definition: taskswnd.cpp:148
DWORD dwTaskCount
Definition: taskswnd.cpp:150
DWORD dwProcessId
Definition: taskswnd.cpp:151
struct _TASK_GROUP * PTASK_GROUP
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)

Referenced by AddTask().

◆ AllocTaskItem()

PTASK_ITEM CTaskSwitchWnd::AllocTaskItem ( )
inline

Definition at line 1011 of file taskswnd.cpp.

1012 {
1014 {
1015 /* We need the most significant bit in 16 bit command IDs to indicate whether it
1016 is a task group or task item. WM_COMMAND limits command IDs to 16 bits! */
1017 return NULL;
1018 }
1019
1021
1022 if (m_TaskItemCount == 0)
1023 {
1025 0,
1027 if (m_TaskItems != NULL)
1028 {
1030 }
1031 else
1032 return NULL;
1033 }
1035 {
1036 PTASK_ITEM NewArray;
1037 SIZE_T NewArrayLength, ActiveTaskItemIndex;
1038
1040
1041 NewArray = (PTASK_ITEM) HeapReAlloc(hProcessHeap,
1042 0,
1044 NewArrayLength * sizeof(*m_TaskItems));
1045 if (NewArray != NULL)
1046 {
1047 if (m_ActiveTaskItem != NULL)
1048 {
1049 /* Fixup the ActiveTaskItem pointer */
1050 ActiveTaskItemIndex = m_ActiveTaskItem - m_TaskItems;
1051 m_ActiveTaskItem = NewArray + ActiveTaskItemIndex;
1052 }
1053 m_AllocatedTaskItems = (WORD) NewArrayLength;
1054 m_TaskItems = NewArray;
1055 }
1056 else
1057 return NULL;
1058 }
1059
1060 return m_TaskItems + m_TaskItemCount++;
1061 }
#define HeapReAlloc
Definition: compat.h:734
unsigned short WORD
Definition: ntddk_ex.h:93
struct _TASK_ITEM * PTASK_ITEM
#define TASK_ITEM_ARRAY_ALLOC
Definition: taskswnd.cpp:32
#define MAX_TASKS_COUNT
Definition: taskswnd.cpp:31
ULONG_PTR SIZE_T
Definition: typedefs.h:80

Referenced by AddTask().

◆ CalculateTaskItemNewButtonIndex()

INT CTaskSwitchWnd::CalculateTaskItemNewButtonIndex ( IN PTASK_ITEM  TaskItem)
inline

Definition at line 724 of file taskswnd.cpp.

725 {
726 PTASK_GROUP TaskGroup;
727 PTASK_ITEM LastTaskItem;
728
729 /* NOTE: This routine assumes that the group is *not* collapsed! */
730
731 TaskGroup = TaskItem->Group;
733 {
734 if (TaskGroup != NULL)
735 {
736 ASSERT(TaskGroup->Index < 0);
737 ASSERT(!TaskGroup->IsCollapsed);
738
739 if (TaskGroup->dwTaskCount > 1)
740 {
741 LastTaskItem = FindLastTaskItemOfGroup(TaskGroup, TaskItem);
742 if (LastTaskItem != NULL)
743 {
744 /* Since the group is expanded the task items must have an index */
745 ASSERT(LastTaskItem->Index >= 0);
746
747 return LastTaskItem->Index + 1;
748 }
749 }
750 }
751 else
752 {
753 /* Find the last NULL group button. NULL groups are added at the end of the
754 task item list when grouping is enabled */
755 LastTaskItem = FindLastTaskItemOfGroup(NULL, TaskItem);
756 if (LastTaskItem != NULL)
757 {
758 ASSERT(LastTaskItem->Index >= 0);
759
760 return LastTaskItem->Index + 1;
761 }
762 }
763 }
764
765 return m_ButtonCount;
766 }
PTASK_ITEM FindLastTaskItemOfGroup(IN PTASK_GROUP TaskGroup OPTIONAL, IN PTASK_ITEM NewTaskItem OPTIONAL)
Definition: taskswnd.cpp:686
DWORD IsCollapsed
Definition: taskswnd.cpp:159

Referenced by AddTaskItemButton().

◆ CheckActivateTaskItem()

VOID CTaskSwitchWnd::CheckActivateTaskItem ( IN OUT PTASK_ITEM  TaskItem)
inline

Definition at line 1096 of file taskswnd.cpp.

1097 {
1098 PTASK_ITEM CurrentTaskItem;
1099 PTASK_GROUP TaskGroup = NULL;
1100
1101 CurrentTaskItem = m_ActiveTaskItem;
1102
1103 if (TaskItem != NULL)
1104 TaskGroup = TaskItem->Group;
1105
1106 if (m_IsGroupingEnabled &&
1107 TaskGroup != NULL &&
1108 TaskGroup->IsCollapsed)
1109 {
1110 /* FIXME */
1111 return;
1112 }
1113
1114 if (CurrentTaskItem != NULL)
1115 {
1116 PTASK_GROUP CurrentTaskGroup;
1117
1118 if (CurrentTaskItem == TaskItem)
1119 return;
1120
1121 CurrentTaskGroup = CurrentTaskItem->Group;
1122
1123 if (m_IsGroupingEnabled &&
1124 CurrentTaskGroup != NULL &&
1125 CurrentTaskGroup->IsCollapsed)
1126 {
1127 if (CurrentTaskGroup == TaskGroup)
1128 return;
1129
1130 /* FIXME */
1131 }
1132 else
1133 {
1135 if (CurrentTaskItem->Index >= 0)
1136 {
1137 UpdateTaskItemButton(CurrentTaskItem);
1138 }
1139 }
1140 }
1141
1142 m_ActiveTaskItem = TaskItem;
1143
1144 if (TaskItem != NULL && TaskItem->Index >= 0)
1145 {
1146 UpdateTaskItemButton(TaskItem);
1147 }
1148 else if (TaskItem == NULL)
1149 {
1150 TRACE("Active TaskItem now NULL\n");
1151 }
1152 }

Referenced by ActivateTaskItem().

◆ ContextSensitiveHelp()

STDMETHODIMP CTaskSwitchWnd::ContextSensitiveHelp ( BOOL  fEnterMode)
inlineoverride

Implements IOleWindow.

Definition at line 2253 of file taskswnd.cpp.

2254 {
2255 return E_NOTIMPL;
2256 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ DeleteAllTasks()

VOID CTaskSwitchWnd::DeleteAllTasks ( )
inline

Definition at line 1268 of file taskswnd.cpp.

1269 {
1270 PTASK_ITEM CurrentTask;
1271
1272 if (m_TaskItemCount > 0)
1273 {
1274 CurrentTask = m_TaskItems + m_TaskItemCount;
1275 do
1276 {
1277 DeleteTaskItem(--CurrentTask);
1278 } while (CurrentTask != m_TaskItems);
1279 }
1280 }
VOID DeleteTaskItem(IN OUT PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:1081

Referenced by OnDestroy().

◆ DeleteTask()

BOOL CTaskSwitchWnd::DeleteTask ( IN HWND  hWnd)
inline

Definition at line 1251 of file taskswnd.cpp.

1252 {
1253 PTASK_ITEM TaskItem;
1254
1255 TaskItem = FindTaskItem(hWnd);
1256 if (TaskItem != NULL)
1257 {
1258 TRACE("Delete window 0x%p on button %d\n", hWnd, TaskItem->Index);
1259 DeleteTaskItem(TaskItem);
1260 return TRUE;
1261 }
1262 //else
1263 //TRACE("Failed to delete window 0x%p\n", hWnd);
1264
1265 return FALSE;
1266 }

Referenced by OnShellHook().

◆ DeleteTaskItem()

VOID CTaskSwitchWnd::DeleteTaskItem ( IN OUT PTASK_ITEM  TaskItem)
inline

Definition at line 1081 of file taskswnd.cpp.

1082 {
1083 if (!m_IsDestroying)
1084 {
1085 /* Delete the task button from the toolbar */
1086 DeleteTaskItemButton(TaskItem);
1087 }
1088
1089 /* Remove the task from it's group */
1090 RemoveTaskFromTaskGroup(TaskItem);
1091
1092 /* Free the task item */
1093 FreeTaskItem(TaskItem);
1094 }
VOID FreeTaskItem(IN OUT PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:1063
VOID RemoveTaskFromTaskGroup(IN OUT PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:907
BOOL DeleteTaskItemButton(IN OUT PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:828

Referenced by DeleteAllTasks(), and DeleteTask().

◆ DeleteTaskItemButton()

BOOL CTaskSwitchWnd::DeleteTaskItemButton ( IN OUT PTASK_ITEM  TaskItem)
inline

Definition at line 828 of file taskswnd.cpp.

829 {
830 PTASK_GROUP TaskGroup;
831 INT iIndex;
832
833 TaskGroup = TaskItem->Group;
834
835 if (TaskItem->Index >= 0)
836 {
837 if ((TaskGroup != NULL && !TaskGroup->IsCollapsed) ||
838 TaskGroup == NULL)
839 {
841
842 RemoveIcon(TaskItem);
843 iIndex = TaskItem->Index;
844 if (m_TaskBar.DeleteButton(iIndex))
845 {
846 TaskItem->Index = -1;
848
849 UpdateIndexesAfter(iIndex, FALSE);
850
851 /* Update button sizes and fix the button wrapping */
853 return TRUE;
854 }
855
857 }
858 }
859
860 return FALSE;
861 }
VOID RemoveIcon(IN PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:658

Referenced by DeleteTaskItem().

◆ EnumWindowsProc()

BOOL CALLBACK CTaskSwitchWnd::EnumWindowsProc ( IN HWND  hWnd)
inline

Definition at line 1477 of file taskswnd.cpp.

1478 {
1479 if (m_Tray->IsTaskWnd(hWnd))
1480 {
1481 TRACE("Adding task for %p...\n", hWnd);
1482 AddTask(hWnd);
1483 }
1484 return TRUE;
1485 }
BOOL AddTask(IN HWND hWnd)
Definition: taskswnd.cpp:1187

◆ ExpandTaskGroup()

VOID CTaskSwitchWnd::ExpandTaskGroup ( IN PTASK_GROUP  TaskGroup)
inline

Definition at line 568 of file taskswnd.cpp.

569 {
570 ASSERT(TaskGroup->dwTaskCount > 0);
571 ASSERT(TaskGroup->IsCollapsed);
572 ASSERT(TaskGroup->Index >= 0);
573
574 /* FIXME: Implement */
575 }

Referenced by RemoveTaskFromTaskGroup().

◆ FindLastTaskItemOfGroup()

PTASK_ITEM CTaskSwitchWnd::FindLastTaskItemOfGroup ( IN PTASK_GROUP TaskGroup  OPTIONAL,
IN PTASK_ITEM NewTaskItem  OPTIONAL 
)
inline

Definition at line 686 of file taskswnd.cpp.

689 {
690 PTASK_ITEM TaskItem, LastTaskItem, FoundTaskItem = NULL;
691 DWORD dwTaskCount;
692
694
695 TaskItem = m_TaskItems;
696 LastTaskItem = TaskItem + m_TaskItemCount;
697
698 dwTaskCount = (TaskGroup != NULL ? TaskGroup->dwTaskCount : MAX_TASKS_COUNT);
699
700 ASSERT(dwTaskCount > 0);
701
702 while (TaskItem != LastTaskItem)
703 {
704 if (TaskItem->Group == TaskGroup)
705 {
706 if ((NewTaskItem != NULL && TaskItem != NewTaskItem) || NewTaskItem == NULL)
707 {
708 FoundTaskItem = TaskItem;
709 }
710
711 if (--dwTaskCount == 0)
712 {
713 /* We found the last task item in the group! */
714 break;
715 }
716 }
717
718 TaskItem++;
719 }
720
721 return FoundTaskItem;
722 }

Referenced by CalculateTaskItemNewButtonIndex().

◆ FindOtherTaskItem()

PTASK_ITEM CTaskSwitchWnd::FindOtherTaskItem ( IN HWND  hWnd)
inline

Definition at line 970 of file taskswnd.cpp.

971 {
972 PTASK_ITEM LastItem, TaskItem;
973 PTASK_GROUP TaskGroup;
974 DWORD dwProcessId;
975
976 if (!GetWindowThreadProcessId(hWnd, &dwProcessId))
977 {
978 return NULL;
979 }
980
981 /* Try to find another task that belongs to the same
982 process as the given window */
983 TaskItem = m_TaskItems;
984 LastItem = TaskItem + m_TaskItemCount;
985 while (TaskItem != LastItem)
986 {
987 TaskGroup = TaskItem->Group;
988 if (TaskGroup != NULL)
989 {
990 if (TaskGroup->dwProcessId == dwProcessId)
991 return TaskItem;
992 }
993 else
994 {
995 DWORD dwProcessIdTask;
996
997 if (GetWindowThreadProcessId(TaskItem->hWnd,
998 &dwProcessIdTask) &&
999 dwProcessIdTask == dwProcessId)
1000 {
1001 return TaskItem;
1002 }
1003 }
1004
1005 TaskItem++;
1006 }
1007
1008 return NULL;
1009 }

Referenced by ActivateTask().

◆ FindRudeApp()

HWND CTaskSwitchWnd::FindRudeApp ( _In_opt_ HWND  hwndFirstCheck)
inline

Definition at line 1976 of file taskswnd.cpp.

1977 {
1978 // Quick check
1979 HMONITOR hMon = MonitorFromWindow(hwndFirstCheck, MONITOR_DEFAULTTONEAREST);
1980 RUDEAPPDATA data = { hMon, NULL, hwndFirstCheck };
1981 if (::IsWindow(hwndFirstCheck) && !IsRudeEnumProc(hwndFirstCheck, (LPARAM)&data))
1982 return hwndFirstCheck;
1983
1984 // Slow check
1986
1987 return data.hwndFound;
1988 }
static BOOL CALLBACK IsRudeEnumProc(_In_ HWND hwnd, _In_ LPARAM lParam)
Definition: taskswnd.cpp:1903
struct CTaskSwitchWnd::tagRUDEAPPDATA RUDEAPPDATA
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
LONG_PTR LPARAM
Definition: windef.h:208
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)

Referenced by OnTimer(), and OnWindowDestroyed().

◆ FindTaskGroupByIndex()

PTASK_GROUP CTaskSwitchWnd::FindTaskGroupByIndex ( IN INT  Index)
inline

Definition at line 1171 of file taskswnd.cpp.

1172 {
1173 PTASK_GROUP CurrentGroup;
1174
1175 CurrentGroup = m_TaskGroups;
1176 while (CurrentGroup != NULL)
1177 {
1178 if (CurrentGroup->Index == Index)
1179 break;
1180
1181 CurrentGroup = CurrentGroup->Next;
1182 }
1183
1184 return CurrentGroup;
1185 }
_In_ WDFCOLLECTION _In_ ULONG Index

Referenced by HandleButtonClick(), HandleButtonRightClick(), and HandleItemPaint().

◆ FindTaskItem()

PTASK_ITEM CTaskSwitchWnd::FindTaskItem ( IN HWND  hWnd)
inline

Definition at line 953 of file taskswnd.cpp.

954 {
955 PTASK_ITEM TaskItem, LastItem;
956
957 TaskItem = m_TaskItems;
958 LastItem = TaskItem + m_TaskItemCount;
959 while (TaskItem != LastItem)
960 {
961 if (TaskItem->hWnd == hWnd)
962 return TaskItem;
963
964 TaskItem++;
965 }
966
967 return NULL;
968 }

Referenced by ActivateTask(), AddTask(), DeleteTask(), FlashTask(), OnKludgeItemRect(), and RedrawTask().

◆ FindTaskItemByIndex()

PTASK_ITEM CTaskSwitchWnd::FindTaskItemByIndex ( IN INT  Index)
inline

Definition at line 1154 of file taskswnd.cpp.

1155 {
1156 PTASK_ITEM TaskItem, LastItem;
1157
1158 TaskItem = m_TaskItems;
1159 LastItem = TaskItem + m_TaskItemCount;
1160 while (TaskItem != LastItem)
1161 {
1162 if (TaskItem->Index == Index)
1163 return TaskItem;
1164
1165 TaskItem++;
1166 }
1167
1168 return NULL;
1169 }

Referenced by HandleButtonClick(), HandleButtonRightClick(), and HandleItemPaint().

◆ FlashTask()

BOOL CTaskSwitchWnd::FlashTask ( IN HWND  hWnd)
inline

Definition at line 1288 of file taskswnd.cpp.

1289 {
1290 PTASK_ITEM TaskItem;
1291
1292 TaskItem = FindTaskItem(hWnd);
1293 if (TaskItem != NULL)
1294 {
1295 TRACE("Flashing window 0x%p on button %d\n", hWnd, TaskItem->Index);
1296 FlashTaskItem(TaskItem);
1297 return TRUE;
1298 }
1299
1300 return FALSE;
1301 }
VOID FlashTaskItem(IN OUT PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:1282

Referenced by OnShellHook().

◆ FlashTaskItem()

VOID CTaskSwitchWnd::FlashTaskItem ( IN OUT PTASK_ITEM  TaskItem)
inline

Definition at line 1282 of file taskswnd.cpp.

1283 {
1284 TaskItem->RenderFlashed = 1;
1285 UpdateTaskItemButton(TaskItem);
1286 }

Referenced by FlashTask().

◆ FreeTaskItem()

VOID CTaskSwitchWnd::FreeTaskItem ( IN OUT PTASK_ITEM  TaskItem)
inline

Definition at line 1063 of file taskswnd.cpp.

1064 {
1065 WORD wIndex;
1066
1067 if (TaskItem == m_ActiveTaskItem)
1069
1070 wIndex = (WORD) (TaskItem - m_TaskItems);
1071 if (wIndex + 1 < m_TaskItemCount)
1072 {
1073 MoveMemory(TaskItem,
1074 TaskItem + 1,
1075 (m_TaskItemCount - wIndex - 1) * sizeof(*TaskItem));
1076 }
1077
1079 }
#define MoveMemory
Definition: winbase.h:1750

Referenced by DeleteTaskItem().

◆ FullScreenEnumProc()

static BOOL CALLBACK CTaskSwitchWnd::FullScreenEnumProc ( _In_ HMONITOR  hMonitor,
_In_opt_ HDC  hDC,
_In_ LPRECT  prc,
_In_ LPARAM  lParam 
)
inlinestatic

Definition at line 1929 of file taskswnd.cpp.

1930 {
1932
1933 BOOL bFullOpening = (pData->hTargetMonitor == hMonitor);
1934 if (!bFullOpening && pData->pRect)
1935 {
1936 RECT rc, rcMon;
1937 SHELL_GetMonitorRect(hMonitor, &rcMon, FALSE);
1938 ::IntersectRect(&rc, &rcMon, pData->pRect);
1939 bFullOpening = ::EqualRect(&rc, &rcMon);
1940 }
1941
1942 // Notify ABN_FULLSCREENAPP to appbars
1943 pData->pTray->NotifyFullScreenToAppBars(hMonitor, bFullOpening);
1944 return TRUE;
1945 }
struct CTaskSwitchWnd::tagFULLSCREENDATA * PFULLSCREENDATA
LPARAM lParam
Definition: combotst.c:139
unsigned int BOOL
Definition: ntddk_ex.h:94
static BOOL SHELL_GetMonitorRect(_In_opt_ HMONITOR hMonitor, _Out_opt_ PRECT prcDest, _In_ BOOL bWorkAreaOnly)
Definition: taskswnd.cpp:42
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)

Referenced by HandleFullScreenApp().

◆ GetWindow()

STDMETHODIMP CTaskSwitchWnd::GetWindow ( HWND phwnd)
inlineoverride

Implements IOleWindow.

Definition at line 2244 of file taskswnd.cpp.

2245 {
2246 if (!phwnd)
2247 return E_INVALIDARG;
2248 *phwnd = m_hWnd;
2249 return S_OK;
2250 }
HWND m_hWnd
Definition: atlwin.h:273
#define E_INVALIDARG
Definition: ddrawi.h:101
#define S_OK
Definition: intsafe.h:52

◆ GetWndIcon()

HICON CTaskSwitchWnd::GetWndIcon ( HWND  hwnd)
inline

Definition at line 577 of file taskswnd.cpp.

578 {
579 HICON hIcon = NULL;
580
581 /* Retrieve icon by sending a message */
582#define GET_ICON(type) \
583 SendMessageTimeout(hwnd, WM_GETICON, (type), 0, SMTO_NOTIMEOUTIFNOTHUNG, 100, (PDWORD_PTR)&hIcon)
584
585 LRESULT bAlive = GET_ICON(g_TaskbarSettings.bSmallIcons ? ICON_SMALL2 : ICON_BIG);
586 if (hIcon)
587 return hIcon;
588
589 if (bAlive)
590 {
591 bAlive = GET_ICON(ICON_SMALL);
592 if (hIcon)
593 return hIcon;
594 }
595
596 if (bAlive)
597 {
599 if (hIcon)
600 return hIcon;
601 }
602#undef GET_ICON
603
604 /* If we failed, retrieve icon from the window class */
606 if (hIcon)
607 return hIcon;
608
610 }
TaskbarSettings g_TaskbarSettings
Definition: settings.cpp:23
HICON hIcon
Definition: msconfig.c:44
BOOL bSmallIcons
Definition: precomp.h:225
#define GET_ICON(type)
#define ICON_BIG
Definition: tnclass.cpp:51
#define ICON_SMALL
Definition: tnclass.cpp:48
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LRESULT
Definition: windef.h:209
#define GCLP_HICONSM
Definition: winuser.h:683
#define GCLP_HICON
Definition: winuser.h:682
#define GetClassLongPtr
Definition: winuser.h:5867

Referenced by AddTaskItemButton(), and UpdateTaskItemButton().

◆ GetWndTextFromTaskItem()

INT CTaskSwitchWnd::GetWndTextFromTaskItem ( IN PTASK_ITEM  TaskItem,
LPWSTR  szBuf,
DWORD  cchBuf 
)
inline

Definition at line 436 of file taskswnd.cpp.

437 {
438 /* Get the window text without sending a message so we don't hang if an
439 application isn't responding! */
440 return InternalGetWindowText(TaskItem->hWnd, szBuf, cchBuf);
441 }
INT WINAPI InternalGetWindowText(_In_ HWND hWnd, _Out_writes_to_(cchMaxCount, return+1) LPWSTR pString, _In_ int cchMaxCount)

Referenced by AddTaskItemButton(), and UpdateTaskItemButton().

◆ HandleAppCommand()

BOOL CTaskSwitchWnd::HandleAppCommand ( IN WPARAM  wParam,
IN LPARAM  lParam 
)
inline

Definition at line 1600 of file taskswnd.cpp.

1601 {
1602 const UINT uAppCmd = GET_APPCOMMAND_LPARAM(lParam);
1603 if (InvokeRegistryAppKeyCommand(uAppCmd))
1604 return TRUE;
1605 switch (uAppCmd)
1606 {
1607 case APPCOMMAND_VOLUME_MUTE:
1608 case APPCOMMAND_VOLUME_DOWN:
1609 case APPCOMMAND_VOLUME_UP:
1610 // TODO: Try IMMDeviceEnumerator::GetDefaultAudioEndpoint first and then fall back to mixer.
1611 FIXME("Call the mixer API to change the global volume\n");
1612 return TRUE;
1613 case APPCOMMAND_BROWSER_SEARCH:
1614 return SHFindFiles(NULL, NULL);
1615 }
1616 return FALSE;
1617 }
#define FIXME(fmt,...)
Definition: precomp.h:53
static BOOL InvokeRegistryAppKeyCommand(UINT uAppCmd)
Definition: taskswnd.cpp:1563
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI SHFindFiles(PCIDLIST_ABSOLUTE pidlFolder, PCIDLIST_ABSOLUTE pidlSaveFile)
Definition: shellord.c:2468

Referenced by OnShellHook().

◆ HandleButtonClick()

BOOL CTaskSwitchWnd::HandleButtonClick ( IN WORD  wIndex)
inline

Definition at line 1740 of file taskswnd.cpp.

1741 {
1742 PTASK_ITEM TaskItem;
1743 PTASK_GROUP TaskGroup;
1744
1746 {
1747 TaskGroup = FindTaskGroupByIndex((INT) wIndex);
1748 if (TaskGroup != NULL && TaskGroup->IsCollapsed)
1749 {
1750 HandleTaskGroupClick(TaskGroup);
1751 return TRUE;
1752 }
1753 }
1754
1755 TaskItem = FindTaskItemByIndex((INT) wIndex);
1756 if (TaskItem != NULL)
1757 {
1758 HandleTaskItemClick(TaskItem);
1759 return TRUE;
1760 }
1761
1762 return FALSE;
1763 }
PTASK_GROUP FindTaskGroupByIndex(IN INT Index)
Definition: taskswnd.cpp:1171
VOID HandleTaskGroupClick(IN OUT PTASK_GROUP TaskGroup)
Definition: taskswnd.cpp:1735
PTASK_ITEM FindTaskItemByIndex(IN INT Index)
Definition: taskswnd.cpp:1154
VOID HandleTaskItemClick(IN OUT PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:1703

Referenced by OnCommand().

◆ HandleButtonRightClick()

BOOL CTaskSwitchWnd::HandleButtonRightClick ( IN WORD  wIndex)
inline

Definition at line 1792 of file taskswnd.cpp.

1793 {
1794 PTASK_ITEM TaskItem;
1795 PTASK_GROUP TaskGroup;
1797 {
1798 TaskGroup = FindTaskGroupByIndex((INT) wIndex);
1799 if (TaskGroup != NULL && TaskGroup->IsCollapsed)
1800 {
1801 HandleTaskGroupRightClick(TaskGroup);
1802 return TRUE;
1803 }
1804 }
1805
1806 TaskItem = FindTaskItemByIndex((INT) wIndex);
1807
1808 if (TaskItem != NULL)
1809 {
1810 HandleTaskItemRightClick(TaskItem);
1811 return TRUE;
1812 }
1813
1814 return FALSE;
1815 }
VOID HandleTaskGroupRightClick(IN OUT PTASK_GROUP TaskGroup)
Definition: taskswnd.cpp:1787
VOID HandleTaskItemRightClick(IN OUT PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:1771

Referenced by OnContextMenu().

◆ HandleFullScreenApp()

void CTaskSwitchWnd::HandleFullScreenApp ( _In_opt_ HWND  hwndRude)
inline

Definition at line 1947 of file taskswnd.cpp.

1948 {
1949 // Notify ABN_FULLSCREENAPP for every monitor
1950 RECT rc;
1952 if (hwndRude && ::GetWindowRect(hwndRude, &rc))
1953 {
1954 Data.pRect = &rc;
1955 Data.hTargetMonitor = ::MonitorFromWindow(hwndRude, MONITOR_DEFAULTTONULL);
1956 }
1957 Data.pTray = m_Tray;
1959
1960 // Make the taskbar bottom or top
1962 HWND hwndTray = m_Tray->GetHWND();
1963 ::SetWindowPos(hwndTray, (hwndRude ? HWND_BOTTOM : HWND_TOP), 0, 0, 0, 0, uFlags);
1964
1965 if (hwndRude)
1966 {
1967 DWORD exstyle = (DWORD)::GetWindowLongPtrW(hwndRude, GWL_EXSTYLE);
1968 if (!(exstyle & WS_EX_TOPMOST) && !SHELL_IsRudeWindowActive(hwndRude))
1969 ::SwitchToThisWindow(hwndRude, TRUE);
1970 }
1971
1972 // FIXME: NIN_BALLOONHIDE
1973 // FIXME: NIN_POPUPCLOSE
1974 }
static BOOL CALLBACK FullScreenEnumProc(_In_ HMONITOR hMonitor, _In_opt_ HDC hDC, _In_ LPRECT prc, _In_ LPARAM lParam)
Definition: taskswnd.cpp:1929
struct CTaskSwitchWnd::tagFULLSCREENDATA FULLSCREENDATA
UINT uFlags
Definition: api.c:59
#define DWORD
Definition: nt_native.h:44
#define WS_EX_TOPMOST
Definition: pedump.c:647
static BOOL SHELL_IsRudeWindowActive(_In_ HWND hWnd)
Definition: taskswnd.cpp:78
VOID WINAPI SwitchToThisWindow(HWND hwnd, BOOL fAltTab)
Definition: window.c:82
#define SWP_NOACTIVATE
Definition: winuser.h:1253
#define GetWindowLongPtrW
Definition: winuser.h:4905
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOMOVE
Definition: winuser.h:1255
BOOL WINAPI EnumDisplayMonitors(_In_opt_ HDC, _In_opt_ LPCRECT, _In_ MONITORENUMPROC, _In_ LPARAM)
#define SWP_NOSIZE
Definition: winuser.h:1256
#define HWND_TOP
Definition: winuser.h:1218
#define SWP_NOOWNERZORDER
Definition: winuser.h:1260
#define HWND_BOTTOM
Definition: winuser.h:1216
#define GWL_EXSTYLE
Definition: winuser.h:862

Referenced by OnTimer(), and OnWindowDestroyed().

◆ HandleItemPaint()

LRESULT CTaskSwitchWnd::HandleItemPaint ( IN OUT NMTBCUSTOMDRAW nmtbcd)
inline

Definition at line 1818 of file taskswnd.cpp.

1819 {
1820 LRESULT Ret = CDRF_DODEFAULT;
1821 PTASK_GROUP TaskGroup;
1822 PTASK_ITEM TaskItem;
1823
1824 TaskItem = FindTaskItemByIndex((INT) nmtbcd->nmcd.dwItemSpec);
1825 TaskGroup = FindTaskGroupByIndex((INT) nmtbcd->nmcd.dwItemSpec);
1826 if (TaskGroup == NULL && TaskItem != NULL)
1827 {
1828 ASSERT(TaskItem != NULL);
1829
1830 if (TaskItem != NULL && ::IsWindow(TaskItem->hWnd))
1831 {
1832 /* Make the entire button flashing if necessary */
1833 if (nmtbcd->nmcd.uItemState & CDIS_MARKED)
1834 {
1835 Ret = TBCDRF_NOBACKGROUND;
1836 if (!m_Theme)
1837 {
1838 SelectObject(nmtbcd->nmcd.hdc, GetSysColorBrush(COLOR_HIGHLIGHT));
1839 Rectangle(nmtbcd->nmcd.hdc,
1840 nmtbcd->nmcd.rc.left,
1841 nmtbcd->nmcd.rc.top,
1842 nmtbcd->nmcd.rc.right,
1843 nmtbcd->nmcd.rc.bottom);
1844 }
1845 else
1846 {
1847 DrawThemeBackground(m_Theme, nmtbcd->nmcd.hdc, TDP_FLASHBUTTON, 0, &nmtbcd->nmcd.rc, 0);
1848 }
1849 nmtbcd->clrText = GetSysColor(COLOR_HIGHLIGHTTEXT);
1850 return Ret;
1851 }
1852 }
1853 }
1854 else if (TaskGroup != NULL)
1855 {
1856 /* FIXME: Implement painting for task groups */
1857 }
1858 return Ret;
1859 }
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
Definition: draw.c:128
#define CDRF_DODEFAULT
Definition: commctrl.h:268
#define TBCDRF_NOBACKGROUND
Definition: commctrl.h:1040
#define CDIS_MARKED
Definition: commctrl.h:298
@ TDP_FLASHBUTTON
Definition: vssym32.h:578
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
DWORD WINAPI GetSysColor(_In_ int)
#define COLOR_HIGHLIGHT
Definition: winuser.h:937
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define COLOR_HIGHLIGHTTEXT
Definition: winuser.h:938

Referenced by HandleToolbarNotification().

◆ HandleTaskGroupClick()

VOID CTaskSwitchWnd::HandleTaskGroupClick ( IN OUT PTASK_GROUP  TaskGroup)
inline

Definition at line 1735 of file taskswnd.cpp.

1736 {
1737 /* TODO: Show task group menu */
1738 }

Referenced by HandleButtonClick().

◆ HandleTaskGroupRightClick()

VOID CTaskSwitchWnd::HandleTaskGroupRightClick ( IN OUT PTASK_GROUP  TaskGroup)
inline

Definition at line 1787 of file taskswnd.cpp.

1788 {
1789 /* TODO: Show task group right click menu */
1790 }

Referenced by HandleButtonRightClick().

◆ HandleTaskItemClick()

VOID CTaskSwitchWnd::HandleTaskItemClick ( IN OUT PTASK_ITEM  TaskItem)
inline

Definition at line 1703 of file taskswnd.cpp.

1704 {
1705 BOOL bIsMinimized;
1706 BOOL bIsActive;
1707
1708 if (::IsWindow(TaskItem->hWnd))
1709 {
1710 bIsMinimized = ::IsIconic(TaskItem->hWnd);
1711 bIsActive = (TaskItem == m_ActiveTaskItem);
1712
1713 TRACE("Active TaskItem %p, selected TaskItem %p\n", m_ActiveTaskItem, TaskItem);
1714 if (m_ActiveTaskItem)
1715 TRACE("Active TaskItem hWnd=%p, TaskItem hWnd %p\n", m_ActiveTaskItem->hWnd, TaskItem->hWnd);
1716
1717 TRACE("Valid button clicked. HWND=%p, IsMinimized=%s, IsActive=%s...\n",
1718 TaskItem->hWnd, bIsMinimized ? "Yes" : "No", bIsActive ? "Yes" : "No");
1719
1720 if (!bIsMinimized && bIsActive)
1721 {
1722 if (!::IsHungAppWindow(TaskItem->hWnd))
1723 ::ShowWindowAsync(TaskItem->hWnd, SW_MINIMIZE);
1724 TRACE("Valid button clicked. App window Minimized.\n");
1725 }
1726 else
1727 {
1728 ::SwitchToThisWindow(TaskItem->hWnd, TRUE);
1729
1730 TRACE("Valid button clicked. App window Restored.\n");
1731 }
1732 }
1733 }
BOOL IsIconic() const
Definition: atlwin.h:932
BOOL WINAPI IsHungAppWindow(HWND hwnd)
Definition: window.c:1845
#define SW_MINIMIZE
Definition: winuser.h:787
BOOL WINAPI ShowWindowAsync(_In_ HWND, _In_ int)

Referenced by HandleButtonClick().

◆ HandleTaskItemRightClick()

VOID CTaskSwitchWnd::HandleTaskItemRightClick ( IN OUT PTASK_ITEM  TaskItem)
inline

Definition at line 1771 of file taskswnd.cpp.

1772 {
1773 POINT pt;
1774 GetCursorPos(&pt);
1775
1776 SetForegroundWindow(TaskItem->hWnd);
1777
1778 ActivateTask(TaskItem->hWnd);
1779
1780 if (GetForegroundWindow() != TaskItem->hWnd)
1781 ERR("HandleTaskItemRightClick detected the window did not become foreground\n");
1782
1783 ::SendMessageCallbackW(TaskItem->hWnd, WM_POPUPSYSTEMMENU, 0, MAKELPARAM(pt.x, pt.y),
1784 SendAsyncProc, (ULONG_PTR)TaskItem);
1785 }
#define ERR(fmt,...)
Definition: precomp.h:57
BOOL ActivateTask(IN HWND hWnd)
Definition: taskswnd.cpp:1227
static VOID CALLBACK SendAsyncProc(HWND hwnd, UINT uMsg, DWORD_PTR dwData, LRESULT lResult)
Definition: taskswnd.cpp:1766
#define pt(x, y)
Definition: drawing.c:79
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define WM_POPUPSYSTEMMENU
Definition: undocuser.h:62
#define MAKELPARAM(l, h)
Definition: winuser.h:4084
HWND WINAPI GetForegroundWindow(void)
Definition: ntwrapper.h:392
BOOL WINAPI SetForegroundWindow(_In_ HWND)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:3032
BOOL WINAPI SendMessageCallbackW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM, _In_ SENDASYNCPROC, _In_ ULONG_PTR)

Referenced by HandleButtonRightClick().

◆ HandleToolbarNotification()

LRESULT CTaskSwitchWnd::HandleToolbarNotification ( IN const NMHDR nmh)
inline

Definition at line 1861 of file taskswnd.cpp.

1862 {
1863 LRESULT Ret = 0;
1864
1865 switch (nmh->code)
1866 {
1867 case NM_CUSTOMDRAW:
1868 {
1869 LPNMTBCUSTOMDRAW nmtbcd = (LPNMTBCUSTOMDRAW) nmh;
1870
1871 switch (nmtbcd->nmcd.dwDrawStage)
1872 {
1873
1874 case CDDS_ITEMPREPAINT:
1875 Ret = HandleItemPaint(nmtbcd);
1876 break;
1877
1878 case CDDS_PREPAINT:
1879 Ret = CDRF_NOTIFYITEMDRAW;
1880 break;
1881
1882 default:
1883 Ret = CDRF_DODEFAULT;
1884 break;
1885 }
1886 break;
1887 }
1888 }
1889
1890 return Ret;
1891 }
LRESULT HandleItemPaint(IN OUT NMTBCUSTOMDRAW *nmtbcd)
Definition: taskswnd.cpp:1818
#define CDDS_ITEMPREPAINT
Definition: commctrl.h:285
#define CDRF_NOTIFYITEMDRAW
Definition: commctrl.h:275
#define NM_CUSTOMDRAW
Definition: commctrl.h:137
#define CDDS_PREPAINT
Definition: commctrl.h:280
struct _NMTBCUSTOMDRAW * LPNMTBCUSTOMDRAW
NMCUSTOMDRAW nmcd
Definition: commctrl.h:1017

Referenced by OnNotify().

◆ Initialize()

HRESULT CTaskSwitchWnd::Initialize ( IN HWND  hWndParent,
IN OUT ITrayWindow *  tray 
)
inline

Definition at line 2231 of file taskswnd.cpp.

2232 {
2233 m_Tray = tray;
2236 if (!m_hWnd)
2237 return E_FAIL;
2238 return S_OK;
2239 }
@ Create
Definition: registry.c:563
#define E_FAIL
Definition: ddrawi.h:102
#define WS_CHILD
Definition: pedump.c:617
#define WS_TABSTOP
Definition: pedump.c:634
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
BOOL bGroupButtons
Definition: precomp.h:221
const WCHAR szRunningApps[]
Definition: taskswnd.cpp:118

◆ InvokeRegistryAppKeyCommand()

static BOOL CTaskSwitchWnd::InvokeRegistryAppKeyCommand ( UINT  uAppCmd)
inlinestatic

Definition at line 1563 of file taskswnd.cpp.

1564 {
1565 BOOL bResult = FALSE;
1566 WCHAR szBuf[MAX_PATH * 2];
1567 wsprintfW(szBuf, L"%s\\AppKey\\%u", REGSTR_PATH_EXPLORER, uAppCmd);
1568 HUSKEY hKey;
1570 return bResult;
1571
1572 DWORD cb = sizeof(szBuf);
1573 if (!bResult && SHRegQueryUSValueW(hKey, L"ShellExecute", NULL, szBuf, &cb, FALSE, NULL, 0) == ERROR_SUCCESS)
1574 {
1575 bResult = TRUE;
1576 }
1577 cb = sizeof(szBuf);
1578 if (!bResult && SHRegQueryUSValueW(hKey, L"Association", NULL, szBuf, &cb, FALSE, NULL, 0) == ERROR_SUCCESS)
1579 {
1580 bResult = TRUE;
1581 cb = _countof(szBuf);
1583 *szBuf = UNICODE_NULL;
1584 }
1585 cb = sizeof(szBuf);
1586 if (!bResult && SHRegQueryUSValueW(hKey, L"RegisteredApp", NULL, szBuf, &cb, FALSE, NULL, 0) == ERROR_SUCCESS)
1587 {
1588 bResult = TRUE;
1590 *szBuf = UNICODE_NULL; // Don't execute again
1591 }
1593
1594 // Note: Tweak UI uses an empty string for its "Do nothing" option.
1595 if (bResult && *szBuf)
1597 return bResult;
1598 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define MAX_PATH
Definition: compat.h:34
LONG WINAPI SHRegCloseUSKey(HUSKEY hUSKey)
Definition: registry.c:3626
LONG WINAPI SHRegQueryUSValueW(HUSKEY hUSKey, const WCHAR *value, DWORD *type, void *data, DWORD *data_len, BOOL ignore_hkcu, void *default_data, DWORD default_data_len)
Definition: registry.c:4019
LONG WINAPI SHRegOpenUSKeyW(const WCHAR *path, REGSAM access_mask, HUSKEY relative_key, HUSKEY *uskey, BOOL ignore_hkcu)
Definition: registry.c:3747
EXTERN_C HRESULT WINAPI SHRunIndirectRegClientCommand(_In_opt_ HWND hWnd, _In_ PCWSTR pszClientType)
Definition: utils.cpp:265
FxAutoRegKey hKey
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
#define KEY_READ
Definition: nt_native.h:1023
#define UNICODE_NULL
#define REGSTR_PATH_EXPLORER
Definition: regstr.h:33
EXTERN_C VOID WINAPI ShellExec_RunDLLW(_In_opt_ HWND hwnd, _In_opt_ HINSTANCE hInstance, _In_ PCWSTR pszCmdLine, _In_ INT nCmdShow)
Definition: shlexec.cpp:3259
@ ASSOCF_NOTRUNCATE
Definition: shlwapi.h:597
@ ASSOCSTR_EXECUTABLE
Definition: shlwapi.h:613
#define AssocQueryString
Definition: shlwapi.h:733
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define SW_SHOW
Definition: winuser.h:786

Referenced by HandleAppCommand().

◆ IsRudeEnumProc()

static BOOL CALLBACK CTaskSwitchWnd::IsRudeEnumProc ( _In_ HWND  hwnd,
_In_ LPARAM  lParam 
)
inlinestatic

Definition at line 1903 of file taskswnd.cpp.

1904 {
1906
1907 HMONITOR hMon = ::MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);
1908 if (!hMon ||
1909 (pData->hTargetMonitor && pData->hTargetMonitor != hMon) ||
1910 !SHELL_IsRudeWindow(hMon, hwnd, (hwnd == pData->hwndFirstCheck)))
1911 {
1912 return TRUE; // Continue
1913 }
1914
1915 pData->hwndFound = hwnd;
1916 return FALSE; // Finish
1917 }
struct CTaskSwitchWnd::tagRUDEAPPDATA * PRUDEAPPDATA
static BOOL SHELL_IsRudeWindow(_In_opt_ HMONITOR hMonitor, _In_ HWND hWnd, _In_ BOOL bDontCheckActive)
Definition: taskswnd.cpp:87

Referenced by FindRudeApp().

◆ OnCommand()

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

Definition at line 2060 of file taskswnd.cpp.

2061 {
2062 LRESULT Ret = TRUE;
2063 if (lParam != 0 && (HWND) lParam == m_TaskBar.m_hWnd)
2064 {
2066 }
2067 return Ret;
2068 }
BOOL HandleButtonClick(IN WORD wIndex)
Definition: taskswnd.cpp:1740
WPARAM wParam
Definition: combotst.c:138
#define LOWORD(l)
Definition: pedump.c:82

◆ OnContextMenu()

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

Definition at line 2117 of file taskswnd.cpp.

2118 {
2119 LRESULT Ret = 0;
2120 INT_PTR iBtn = -1;
2121
2122 if (m_TaskBar.m_hWnd != NULL)
2123 {
2124 POINT pt;
2125
2126 pt.x = GET_X_LPARAM(lParam);
2127 pt.y = GET_Y_LPARAM(lParam);
2128
2130
2131 iBtn = m_TaskBar.HitTest(&pt);
2132 if (iBtn >= 0)
2133 {
2135 }
2136 }
2137 if (iBtn < 0)
2138 {
2139 /* Not on a taskbar button, so forward message to tray */
2140 Ret = SendMessage(m_Tray->GetHWND(), uMsg, wParam, lParam);
2141 }
2142 return Ret;
2143 }
BOOL HandleButtonRightClick(IN WORD wIndex)
Definition: taskswnd.cpp:1792
int32_t INT_PTR
Definition: typedefs.h:64
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
#define SendMessage
Definition: winuser.h:5928
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)

◆ OnCopyData()

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

Definition at line 2215 of file taskswnd.cpp.

2216 {
2218 if (cpData->dwData == m_uHardErrorMsg)
2219 {
2220 /* A hard error balloon message */
2222 ERR("Got balloon data 0x%x, 0x%x, '%S', '%S'\n", pData->Status, pData->dwType, (WCHAR*)((ULONG_PTR)pData + pData->TitleOffset), (WCHAR*)((ULONG_PTR)pData + pData->MessageOffset));
2223 if (pData->cbHeaderSize == sizeof(BALLOON_HARD_ERROR_DATA))
2225 return TRUE;
2226 }
2227
2228 return FALSE;
2229 }
void StartThread(PBALLOON_HARD_ERROR_DATA pData)
Definition: taskswnd.cpp:263
CHardErrorThread m_HardErrorThread
Definition: taskswnd.cpp:413
#define ULONG_PTR
Definition: config.h:101
ULONG_PTR dwData
Definition: winuser.h:3077
struct _BALLOON_HARD_ERROR_DATA * PBALLOON_HARD_ERROR_DATA
struct tagCOPYDATASTRUCT * PCOPYDATASTRUCT

◆ OnCreate()

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

Definition at line 1516 of file taskswnd.cpp.

1517 {
1519 return FALSE;
1520
1521 SetWindowTheme(m_TaskBar.m_hWnd, L"TaskBand", NULL);
1522
1525 ILC_COLOR32 | ILC_MASK, 0, 1000);
1526 m_TaskBar.SetImageList(m_ImageList);
1527
1528 /* Set proper spacing between buttons */
1529 m_TaskBar.UpdateTbButtonSpacing(m_Tray->IsHorizontal(), m_Theme != NULL);
1530
1531 /* Register the shell hook */
1533
1534 TRACE("ShellHookMsg got assigned number %d\n", m_ShellHookMsg);
1535
1536 RegisterShellHook(m_hWnd, 3); /* 1 if no NT! We're targeting NT so we don't care! */
1537
1539
1540 /* Recalculate the button size */
1542
1543#if DUMP_TASKS != 0
1544 SetTimer(hwnd, 1, 5000, NULL);
1545#endif
1546 return TRUE;
1547 }
INT UpdateTbButtonSpacing(IN BOOL bHorizontal, IN BOOL bThemed, IN UINT uiRows=0, IN UINT uiBtnsPerLine=0)
Definition: taskswnd.cpp:288
BOOL Initialize(HWND hWndParent)
Definition: taskswnd.cpp:367
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:814
#define ILC_COLOR32
Definition: commctrl.h:358
#define ILC_MASK
Definition: commctrl.h:351
BOOL WINAPI RegisterShellHook(HWND hWnd, DWORD dwType)
Definition: shellord.c:510
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Definition: uxthemesupp.c:69
#define SM_CYSMICON
Definition: winuser.h:1024
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define SM_CXSMICON
Definition: winuser.h:1023
#define SM_CYICON
Definition: winuser.h:984
#define SM_CXICON
Definition: winuser.h:983
int WINAPI GetSystemMetrics(_In_ int)

◆ OnDestroy()

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

Definition at line 1549 of file taskswnd.cpp.

1550 {
1552
1554
1555 /* Unregister the shell hook */
1557
1560 return TRUE;
1561 }
VOID DeleteAllTasks()
Definition: taskswnd.cpp:1268
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
Definition: system.c:1036
#define TIMER_ID_VALIDATE_RUDE_APP
Definition: taskswnd.cpp:37
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)

◆ OnEraseBackground()

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

Definition at line 2017 of file taskswnd.cpp.

2018 {
2019 HDC hdc = (HDC) wParam;
2020
2021 if (!IsAppThemed())
2022 {
2023 bHandled = FALSE;
2024 return 0;
2025 }
2026
2027 RECT rect;
2030
2031 return TRUE;
2032 }
HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
Definition: draw.c:72
BOOL WINAPI IsAppThemed(void)
Definition: system.c:620
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:88
& rect
Definition: startmenu.cpp:1413
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)

◆ OnKludgeItemRect()

LRESULT CTaskSwitchWnd::OnKludgeItemRect ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 2145 of file taskswnd.cpp.

2146 {
2147 PTASK_ITEM TaskItem = FindTaskItem((HWND) wParam);
2148 if (TaskItem)
2149 {
2150 RECT* prcMinRect = (RECT*) lParam;
2151 RECT rcItem, rcToolbar;
2152 m_TaskBar.GetItemRect(TaskItem->Index, &rcItem);
2153 m_TaskBar.GetWindowRect(&rcToolbar);
2154
2155 OffsetRect(&rcItem, rcToolbar.left, rcToolbar.top);
2156
2157 *prcMinRect = rcItem;
2158 return TRUE;
2159 }
2160 return FALSE;
2161 }
BOOL GetWindowRect(LPRECT lpRect) const
Definition: atlwin.h:816
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)

◆ OnMouseActivate()

LRESULT CTaskSwitchWnd::OnMouseActivate ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 2163 of file taskswnd.cpp.

2164 {
2165 return MA_NOACTIVATE;
2166 }
#define MA_NOACTIVATE
Definition: winuser.h:2522

◆ OnNcHitTest()

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

Definition at line 2049 of file taskswnd.cpp.

2050 {
2051 LRESULT Ret = TRUE;
2052 /* We want the tray window to be draggable everywhere, so make the control
2053 appear transparent */
2054 Ret = DefWindowProc(uMsg, wParam, lParam);
2055 if (Ret != HTVSCROLL && Ret != HTHSCROLL)
2056 Ret = HTTRANSPARENT;
2057 return Ret;
2058 }
#define DefWindowProc
Definition: ros2win.h:31
#define HTVSCROLL
Definition: winuser.h:2501
#define HTHSCROLL
Definition: winuser.h:2500
#define HTTRANSPARENT
Definition: winuser.h:2492

◆ OnNotify()

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

Definition at line 2070 of file taskswnd.cpp.

2071 {
2072 LRESULT Ret = TRUE;
2073 const NMHDR *nmh = (const NMHDR *) lParam;
2074
2075 if (nmh->hwndFrom == m_TaskBar.m_hWnd)
2076 {
2077 Ret = HandleToolbarNotification(nmh);
2078 }
2079 return Ret;
2080 }
LRESULT HandleToolbarNotification(IN const NMHDR *nmh)
Definition: taskswnd.cpp:1861
HWND hwndFrom
Definition: winuser.h:3233

◆ OnSetFont()

LRESULT CTaskSwitchWnd::OnSetFont ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 2199 of file taskswnd.cpp.

2200 {
2201 return m_TaskBar.SendMessageW(uMsg, wParam, lParam);
2202 }

◆ OnSettingChanged()

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

Definition at line 2204 of file taskswnd.cpp.

2205 {
2206 if (wParam == SPI_SETNONCLIENTMETRICS)
2207 {
2208 /* Don't update the font, this will be done when we get a WM_SETFONT from our parent */
2210 }
2211
2212 return 0;
2213 }

◆ OnShellHook()

LRESULT CTaskSwitchWnd::OnShellHook ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 1619 of file taskswnd.cpp.

1620 {
1621 BOOL Ret = FALSE;
1622
1623 /* In case the shell hook wasn't registered properly, ignore WM_NULLs*/
1624 if (uMsg == 0)
1625 {
1626 bHandled = FALSE;
1627 return 0;
1628 }
1629
1630 TRACE("Received shell hook message: wParam=%08lx, lParam=%08lx\n", wParam, lParam);
1631
1632 switch ((INT) wParam)
1633 {
1634 case HSHELL_APPCOMMAND:
1635 Ret = HandleAppCommand(0, lParam);
1636 break;
1637
1639 AddTask((HWND) lParam);
1640 break;
1641
1643 /* The window still exists! Delay destroying it a bit */
1646 break;
1647
1649 case HSHELL_WINDOWACTIVATED:
1652 break;
1653
1654 case HSHELL_FLASH:
1656 break;
1657
1658 case HSHELL_REDRAW:
1660 break;
1661
1662 case HSHELL_TASKMAN:
1663 ::PostMessage(m_Tray->GetHWND(), TWM_OPENSTARTMENU, 0, 0);
1664 break;
1665
1667 ::SwitchToThisWindow(m_Tray->GetHWND(), TRUE);
1668 ::SetForegroundWindow(m_Tray->GetHWND());
1669 break;
1670
1671 case HSHELL_LANGUAGE:
1672 case HSHELL_SYSMENU:
1673 case HSHELL_ENDTASK:
1674 case HSHELL_ACCESSIBILITYSTATE:
1675 case HSHELL_WINDOWREPLACED:
1676 case HSHELL_WINDOWREPLACING:
1677
1678 case HSHELL_GETMINRECT:
1679 default:
1680 {
1681#if DEBUG_SHELL_HOOK
1682 int i, found;
1683 for (i = 0, found = 0; i != _countof(hshell_msg); i++)
1684 {
1685 if (hshell_msg[i].msg == (INT) wParam)
1686 {
1687 TRACE("Shell message %ws unhandled (lParam = 0x%p)!\n", hshell_msg[i].msg_name, lParam);
1688 found = 1;
1689 break;
1690 }
1691 }
1692 if (found)
1693 break;
1694#endif
1695 TRACE("Shell message %d unhandled (lParam = 0x%p)!\n", (INT) wParam, lParam);
1696 break;
1697 }
1698 }
1699
1700 return Ret;
1701 }
#define msg(x)
Definition: auth_time.c:54
#define TWM_OPENSTARTMENU
Definition: precomp.h:133
BOOL HandleAppCommand(IN WPARAM wParam, IN LPARAM lParam)
Definition: taskswnd.cpp:1600
BOOL FlashTask(IN HWND hWnd)
Definition: taskswnd.cpp:1288
BOOL RedrawTask(IN HWND hWnd)
Definition: taskswnd.cpp:1328
void OnWindowDestroyed(_In_ HWND hwndTarget)
Definition: taskswnd.cpp:2011
BOOL DeleteTask(IN HWND hWnd)
Definition: taskswnd.cpp:1251
void OnWindowActivated(_In_ HWND hwndTarget)
Definition: taskswnd.cpp:2002
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
#define HSHELL_RUDEAPPACTIVATED
Definition: winuser.h:1292
#define HSHELL_ACTIVATESHELLWINDOW
Definition: winuser.h:1268
#define HSHELL_WINDOWDESTROYED
Definition: winuser.h:1267
#define HSHELL_WINDOWCREATED
Definition: winuser.h:1266
#define HSHELL_FLASH
Definition: winuser.h:1291
#define PostMessage
Definition: winuser.h:5917

◆ OnSize()

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

Definition at line 2034 of file taskswnd.cpp.

2035 {
2036 SIZE szClient;
2037
2038 szClient.cx = LOWORD(lParam);
2039 szClient.cy = HIWORD(lParam);
2040 if (m_TaskBar.m_hWnd != NULL)
2041 {
2042 m_TaskBar.SetWindowPos(NULL, 0, 0, szClient.cx, szClient.cy, SWP_NOZORDER);
2043
2045 }
2046 return TRUE;
2047 }
BOOL SetWindowPos(HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
Definition: atlwin.h:1288
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
#define HIWORD(l)
Definition: typedefs.h:247
#define SWP_NOZORDER
Definition: winuser.h:1258

◆ OnTaskbarSettingsChanged()

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

Definition at line 2089 of file taskswnd.cpp.

2090 {
2091 BOOL bSettingsChanged = FALSE;
2092 TaskbarSettings* newSettings = (TaskbarSettings*)lParam;
2093
2094 if (newSettings->bGroupButtons != g_TaskbarSettings.bGroupButtons)
2095 {
2096 bSettingsChanged = TRUE;
2099 }
2100
2101 if (newSettings->bSmallIcons != g_TaskbarSettings.bSmallIcons)
2102 {
2103 bSettingsChanged = TRUE;
2105 }
2106
2107 if (bSettingsChanged)
2108 {
2109 /* Refresh each task item view */
2112 }
2113
2114 return 0;
2115 }

◆ OnThemeChanged()

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

Definition at line 1501 of file taskswnd.cpp.

1502 {
1503 TRACE("OmThemeChanged\n");
1504
1505 if (m_Theme)
1507
1508 if (IsThemeActive())
1509 m_Theme = OpenThemeData(m_hWnd, L"TaskBand");
1510 else
1511 m_Theme = NULL;
1512
1513 return TRUE;
1514 }
BOOL WINAPI IsThemeActive(void)
Definition: system.c:630
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR pszClassList)
Definition: system.c:890

◆ OnTimer()

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

Definition at line 2168 of file taskswnd.cpp.

2169 {
2170 switch (wParam)
2171 {
2172#if DUMP_TASKS != 0
2173 case 1:
2174 DumpTasks();
2175 break;
2176#endif
2178 {
2179 // Real activation of rude app might take some time after HSHELL_...ACTIVATED.
2180 // Wait up to 5 seconds with validating the rude app at each second.
2181 HWND hwndRude = FindRudeApp(NULL);
2182 HandleFullScreenApp(hwndRude);
2183
2188 break;
2189 }
2190 default:
2191 {
2192 WARN("Unknown timer ID: %p\n", wParam);
2193 break;
2194 }
2195 }
2196 return TRUE;
2197 }
HWND FindRudeApp(_In_opt_ HWND hwndFirstCheck)
Definition: taskswnd.cpp:1976
void HandleFullScreenApp(_In_opt_ HWND hwndRude)
Definition: taskswnd.cpp:1947
#define VALIDATE_RUDE_MAX_COUNT
Definition: taskswnd.cpp:39
#define VALIDATE_RUDE_INTERVAL
Definition: taskswnd.cpp:38

◆ OnUpdateTaskbarPos()

LRESULT CTaskSwitchWnd::OnUpdateTaskbarPos ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 2082 of file taskswnd.cpp.

2083 {
2084 /* Update the button spacing */
2085 m_TaskBar.UpdateTbButtonSpacing(m_Tray->IsHorizontal(), m_Theme != NULL);
2086 return TRUE;
2087 }

◆ OnWindowActivated()

void CTaskSwitchWnd::OnWindowActivated ( _In_ HWND  hwndTarget)
inline

Definition at line 2002 of file taskswnd.cpp.

2003 {
2004 // Re-start rude app validation
2008 }

Referenced by OnShellHook().

◆ OnWindowDestroyed()

void CTaskSwitchWnd::OnWindowDestroyed ( _In_ HWND  hwndTarget)
inline

Definition at line 2011 of file taskswnd.cpp.

2012 {
2013 HWND hwndRude = FindRudeApp(hwndTarget);
2014 HandleFullScreenApp(hwndRude);
2015 }

Referenced by OnShellHook().

◆ OnWindowPosChanged()

LRESULT CTaskSwitchWnd::OnWindowPosChanged ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 1991 of file taskswnd.cpp.

1992 {
1993 // Re-start rude app validation
1997 bHandled = FALSE;
1998 return 0;
1999 }

◆ RedrawTask()

BOOL CTaskSwitchWnd::RedrawTask ( IN HWND  hWnd)
inline

Definition at line 1328 of file taskswnd.cpp.

1329 {
1330 PTASK_ITEM TaskItem;
1331
1332 TaskItem = FindTaskItem(hWnd);
1333 if (TaskItem != NULL)
1334 {
1335 RedrawTaskItem(TaskItem);
1336 return TRUE;
1337 }
1338
1339 return FALSE;
1340 }
VOID RedrawTaskItem(IN OUT PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:1303

Referenced by OnShellHook().

◆ RedrawTaskItem()

VOID CTaskSwitchWnd::RedrawTaskItem ( IN OUT PTASK_ITEM  TaskItem)
inline

Definition at line 1303 of file taskswnd.cpp.

1304 {
1305 PTASK_GROUP TaskGroup;
1306
1307 TaskGroup = TaskItem->Group;
1308 if (m_IsGroupingEnabled && TaskGroup != NULL)
1309 {
1310 if (TaskGroup->IsCollapsed && TaskGroup->Index >= 0)
1311 {
1312 UpdateTaskGroupButton(TaskGroup);
1313 }
1314 else if (TaskItem->Index >= 0)
1315 {
1316 goto UpdateTaskItem;
1317 }
1318 }
1319 else if (TaskItem->Index >= 0)
1320 {
1321 UpdateTaskItem:
1322 TaskItem->RenderFlashed = 0;
1323 UpdateTaskItemButton(TaskItem);
1324 }
1325 }

Referenced by RedrawTask().

◆ RefreshWindowList()

BOOL CTaskSwitchWnd::RefreshWindowList ( )
inline

Definition at line 1494 of file taskswnd.cpp.

1495 {
1496 TRACE("Refreshing window list...\n");
1497 /* Add all windows to the toolbar */
1498 return EnumWindows(s_EnumWindowsProc, (LPARAM)this);
1499 }
static BOOL CALLBACK s_EnumWindowsProc(IN HWND hWnd, IN LPARAM lParam)
Definition: taskswnd.cpp:1487

Referenced by ActivateTask(), OnCreate(), and OnTaskbarSettingsChanged().

◆ RemoveIcon()

VOID CTaskSwitchWnd::RemoveIcon ( IN PTASK_ITEM  TaskItem)
inline

Definition at line 658 of file taskswnd.cpp.

659 {
660 TBBUTTONINFO tbbi;
661 PTASK_ITEM currentTaskItem, LastItem;
662
663 if (TaskItem->IconIndex == -1)
664 return;
665
666 tbbi.cbSize = sizeof(tbbi);
667 tbbi.dwMask = TBIF_IMAGE;
668
669 currentTaskItem = m_TaskItems;
670 LastItem = currentTaskItem + m_TaskItemCount;
671 while (currentTaskItem != LastItem)
672 {
673 if (currentTaskItem->IconIndex > TaskItem->IconIndex)
674 {
675 currentTaskItem->IconIndex--;
676 tbbi.iImage = currentTaskItem->IconIndex;
677
678 m_TaskBar.SetButtonInfo(currentTaskItem->Index, &tbbi);
679 }
680 currentTaskItem++;
681 }
682
683 ImageList_Remove(m_ImageList, TaskItem->IconIndex);
684 }
BOOL WINAPI ImageList_Remove(HIMAGELIST himl, INT i)
Definition: imagelist.c:2628
#define TBIF_IMAGE
Definition: commctrl.h:1219
#define TBBUTTONINFO
Definition: commctrl.h:1254
INT IconIndex
Definition: taskswnd.cpp:169

Referenced by DeleteTaskItemButton().

◆ RemoveTaskFromTaskGroup()

VOID CTaskSwitchWnd::RemoveTaskFromTaskGroup ( IN OUT PTASK_ITEM  TaskItem)
inline

Definition at line 907 of file taskswnd.cpp.

908 {
909 PTASK_GROUP TaskGroup, CurrentGroup, *PrevLink;
910
911 TaskGroup = TaskItem->Group;
912 if (TaskGroup != NULL)
913 {
914 DWORD dwNewTaskCount = --TaskGroup->dwTaskCount;
915 if (dwNewTaskCount == 0)
916 {
917 /* Find the previous pointer in the chain */
918 CurrentGroup = m_TaskGroups;
919 PrevLink = &m_TaskGroups;
920 while (CurrentGroup != TaskGroup)
921 {
922 PrevLink = &CurrentGroup->Next;
923 CurrentGroup = CurrentGroup->Next;
924 }
925
926 /* Remove the group from the list */
927 ASSERT(TaskGroup == CurrentGroup);
928 *PrevLink = TaskGroup->Next;
929
930 /* Free the task group */
932 0,
933 TaskGroup);
934 }
935 else if (TaskGroup->IsCollapsed &&
936 TaskGroup->Index >= 0)
937 {
938 if (dwNewTaskCount > 1)
939 {
940 /* FIXME: Check if we should expand the group */
941 /* Update the task group button */
942 UpdateTaskGroupButton(TaskGroup);
943 }
944 else
945 {
946 /* Expand the group of one task button to a task button */
947 ExpandTaskGroup(TaskGroup);
948 }
949 }
950 }
951 }
VOID ExpandTaskGroup(IN PTASK_GROUP TaskGroup)
Definition: taskswnd.cpp:568
#define HeapFree(x, y, z)
Definition: compat.h:735

Referenced by DeleteTaskItem().

◆ s_EnumWindowsProc()

static BOOL CALLBACK CTaskSwitchWnd::s_EnumWindowsProc ( IN HWND  hWnd,
IN LPARAM  lParam 
)
inlinestatic

Definition at line 1487 of file taskswnd.cpp.

1488 {
1490
1491 return This->EnumWindowsProc(hWnd);
1492 }

Referenced by RefreshWindowList().

◆ SendAsyncProc()

static VOID CALLBACK CTaskSwitchWnd::SendAsyncProc ( HWND  hwnd,
UINT  uMsg,
DWORD_PTR  dwData,
LRESULT  lResult 
)
inlinestatic

Definition at line 1766 of file taskswnd.cpp.

1767 {
1768 ::PostMessageW(hwnd, WM_NULL, 0, 0);
1769 }
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_NULL
Definition: winuser.h:1626

Referenced by HandleTaskItemRightClick().

◆ UpdateButtonsSize()

VOID CTaskSwitchWnd::UpdateButtonsSize ( IN BOOL  bRedrawDisabled)
inline

Definition at line 1342 of file taskswnd.cpp.

1343 {
1344 RECT rcClient;
1345 UINT uiRows, uiMax, uiMin, uiBtnsPerLine, ui;
1346 LONG NewBtnSize;
1347 BOOL Horizontal;
1348
1349 /* Update the size of the image list if needed */
1350 int cx, cy;
1354 {
1358
1359 /* SetIconSize removes all icons so we have to reinsert them */
1360 PTASK_ITEM TaskItem = m_TaskItems;
1361 PTASK_ITEM LastTaskItem = m_TaskItems + m_TaskItemCount;
1362 while (TaskItem != LastTaskItem)
1363 {
1364 TaskItem->IconIndex = -1;
1365 UpdateTaskItemButton(TaskItem);
1366
1367 TaskItem++;
1368 }
1369 m_TaskBar.SetImageList(m_ImageList);
1370 }
1371
1372 if (GetClientRect(&rcClient) && !IsRectEmpty(&rcClient))
1373 {
1374 if (m_ButtonCount > 0)
1375 {
1376 Horizontal = m_Tray->IsHorizontal();
1377
1378 if (Horizontal)
1379 {
1380 TBMETRICS tbm = { 0 };
1381 tbm.cbSize = sizeof(tbm);
1383 m_TaskBar.GetMetrics(&tbm);
1384
1385 if (m_ButtonSize.cy + tbm.cyButtonSpacing != 0)
1386 uiRows = (rcClient.bottom + tbm.cyButtonSpacing) / (m_ButtonSize.cy + tbm.cyButtonSpacing);
1387 else
1388 uiRows = 1;
1389
1390 if (uiRows == 0)
1391 uiRows = 1;
1392
1393 uiBtnsPerLine = (m_ButtonCount + uiRows - 1) / uiRows;
1394 }
1395 else
1396 {
1397 uiBtnsPerLine = 1;
1398 uiRows = m_ButtonCount;
1399 }
1400
1401 if (!bRedrawDisabled)
1403
1404 /* We might need to update the button spacing */
1405 int cxButtonSpacing = m_TaskBar.UpdateTbButtonSpacing(
1406 Horizontal, m_Theme != NULL,
1407 uiRows, uiBtnsPerLine);
1408
1409 /* Determine the minimum and maximum width of a button */
1411 if (Horizontal)
1412 {
1414
1415 /* Calculate the ideal width and make sure it's within the allowed range */
1416 NewBtnSize = (rcClient.right - (uiBtnsPerLine * cxButtonSpacing)) / uiBtnsPerLine;
1417
1418 if (NewBtnSize < (LONG) uiMin)
1419 NewBtnSize = uiMin;
1420 if (NewBtnSize >(LONG)uiMax)
1421 NewBtnSize = uiMax;
1422
1423 /* Recalculate how many buttons actually fit into one line */
1424 uiBtnsPerLine = rcClient.right / (NewBtnSize + cxButtonSpacing);
1425 if (uiBtnsPerLine == 0)
1426 uiBtnsPerLine++;
1427 }
1428 else
1429 {
1430 NewBtnSize = uiMax = rcClient.right;
1431 }
1432
1433 m_ButtonSize.cx = NewBtnSize;
1434
1435 m_ButtonsPerLine = uiBtnsPerLine;
1436
1437 for (ui = 0; ui != m_ButtonCount; ui++)
1438 {
1439 TBBUTTONINFOW tbbi = { 0 };
1440 tbbi.cbSize = sizeof(tbbi);
1442 tbbi.cx = (INT) NewBtnSize;
1443 tbbi.fsState = TBSTATE_ENABLED;
1444
1445 /* Check if we're updating a button that is the last one in the
1446 line. If so, we need to set the TBSTATE_WRAP flag! */
1447 if (Horizontal)
1448 {
1449 if ((ui + 1) % uiBtnsPerLine == 0)
1450 tbbi.fsState |= TBSTATE_WRAP;
1451 }
1452 else
1453 {
1454 tbbi.fsState |= TBSTATE_WRAP;
1455 }
1456
1457 if (m_ActiveTaskItem != NULL &&
1459 {
1460 tbbi.fsState |= TBSTATE_CHECKED;
1461 }
1462
1463 m_TaskBar.SetButtonInfo(ui, &tbbi);
1464 }
1465 }
1466 else
1467 {
1468 m_ButtonsPerLine = 0;
1469 m_ButtonSize.cx = 0;
1470 }
1471 }
1472
1473 // FIXME: This seems to be enabling redraws prematurely, but moving it to its right place doesn't work!
1475 }
BOOL WINAPI ImageList_SetIconSize(HIMAGELIST himl, INT cx, INT cy)
Definition: imagelist.c:3132
BOOL WINAPI ImageList_GetIconSize(HIMAGELIST himl, INT *cx, INT *cy)
Definition: imagelist.c:2055
UINT ui
Definition: oleauto.h:49
long LONG
Definition: pedump.c:60
#define INT
Definition: polytest.cpp:20
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
#define TBIF_SIZE
Definition: commctrl.h:1225
_Out_opt_ int * cx
Definition: commctrl.h:585
#define TBMF_BUTTONSPACING
Definition: commctrl.h:1289
#define TBIF_BYINDEX
Definition: commctrl.h:1226
#define TBSTATE_WRAP
Definition: commctrl.h:977
#define TBSTATE_CHECKED
Definition: commctrl.h:972
#define TBIF_STATE
Definition: commctrl.h:1221
DWORD dwMask
Definition: commctrl.h:1243
int cyButtonSpacing
Definition: commctrl.h:1299
DWORD dwMask
Definition: commctrl.h:1293
UINT cbSize
Definition: commctrl.h:1292
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
#define SM_CXMINIMIZED
Definition: winuser.h:1031
#define SM_CXEDGE
Definition: winuser.h:1019
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
#define SM_CXSIZE
Definition: winuser.h:1002

Referenced by AddTaskItemButton(), DeleteTaskItemButton(), OnCreate(), OnSettingChanged(), OnSize(), and OnTaskbarSettingsChanged().

◆ UpdateIndexesAfter()

VOID CTaskSwitchWnd::UpdateIndexesAfter ( IN INT  iIndex,
BOOL  bInserted 
)
inline

Definition at line 496 of file taskswnd.cpp.

497 {
498 PTASK_GROUP CurrentGroup;
499 PTASK_ITEM CurrentTaskItem, LastTaskItem;
500 INT NewIndex;
501
502 int offset = bInserted ? +1 : -1;
503
505 {
506 /* Update all affected groups */
507 CurrentGroup = m_TaskGroups;
508 while (CurrentGroup != NULL)
509 {
510 if (CurrentGroup->IsCollapsed &&
511 CurrentGroup->Index >= iIndex)
512 {
513 /* Update the toolbar buttons */
514 NewIndex = CurrentGroup->Index + offset;
515 if (m_TaskBar.SetButtonCommandId(CurrentGroup->Index + offset, NewIndex))
516 {
517 CurrentGroup->Index = NewIndex;
518 }
519 else
520 CurrentGroup->Index = -1;
521 }
522
523 CurrentGroup = CurrentGroup->Next;
524 }
525 }
526
527 /* Update all affected task items */
528 CurrentTaskItem = m_TaskItems;
529 LastTaskItem = CurrentTaskItem + m_TaskItemCount;
530 while (CurrentTaskItem != LastTaskItem)
531 {
532 CurrentGroup = CurrentTaskItem->Group;
533 if (CurrentGroup != NULL)
534 {
535 if (!CurrentGroup->IsCollapsed &&
536 CurrentTaskItem->Index >= iIndex)
537 {
538 goto UpdateTaskItemBtn;
539 }
540 }
541 else if (CurrentTaskItem->Index >= iIndex)
542 {
543 UpdateTaskItemBtn:
544 /* Update the toolbar buttons */
545 NewIndex = CurrentTaskItem->Index + offset;
546 if (m_TaskBar.SetButtonCommandId(CurrentTaskItem->Index + offset, NewIndex))
547 {
548 CurrentTaskItem->Index = NewIndex;
549 }
550 else
551 CurrentTaskItem->Index = -1;
552 }
553
554 CurrentTaskItem++;
555 }
556 }
BOOL SetButtonCommandId(IN INT iButtonIndex, IN INT iCommandId)
Definition: taskswnd.cpp:331
GLintptr offset
Definition: glext.h:5920

Referenced by AddTaskItemButton(), and DeleteTaskItemButton().

◆ UpdateTaskGroupButton()

INT CTaskSwitchWnd::UpdateTaskGroupButton ( IN PTASK_GROUP  TaskGroup)
inline

Definition at line 559 of file taskswnd.cpp.

560 {
561 ASSERT(TaskGroup->Index >= 0);
562
563 /* FIXME: Implement */
564
565 return TaskGroup->Index;
566 }

Referenced by AddTaskItemButton(), RedrawTaskItem(), and RemoveTaskFromTaskGroup().

◆ UpdateTaskItemButton()

INT CTaskSwitchWnd::UpdateTaskItemButton ( IN PTASK_ITEM  TaskItem)
inline

Definition at line 612 of file taskswnd.cpp.

613 {
614 TBBUTTONINFO tbbi = { 0 };
615 HICON icon;
616 WCHAR windowText[255];
617
618 ASSERT(TaskItem->Index >= 0);
619
620 tbbi.cbSize = sizeof(tbbi);
621 tbbi.dwMask = TBIF_BYINDEX | TBIF_STATE | TBIF_TEXT | TBIF_IMAGE;
622 tbbi.fsState = TBSTATE_ENABLED;
623 if (m_ActiveTaskItem == TaskItem)
624 tbbi.fsState |= TBSTATE_CHECKED;
625
626 if (TaskItem->RenderFlashed)
627 tbbi.fsState |= TBSTATE_MARKED;
628
629 /* Check if we're updating a button that is the last one in the
630 line. If so, we need to set the TBSTATE_WRAP flag! */
631 if (!m_Tray->IsHorizontal() || (m_ButtonsPerLine != 0 &&
632 (TaskItem->Index + 1) % m_ButtonsPerLine == 0))
633 {
634 tbbi.fsState |= TBSTATE_WRAP;
635 }
636
638 {
639 tbbi.pszText = windowText;
640 }
641
642 icon = GetWndIcon(TaskItem->hWnd);
643 if (!icon)
644 icon = static_cast<HICON>(LoadImageW(NULL, MAKEINTRESOURCEW(OIC_SAMPLE), IMAGE_ICON, 0, 0, LR_SHARED | LR_DEFAULTSIZE));
645 TaskItem->IconIndex = ImageList_ReplaceIcon(m_ImageList, TaskItem->IconIndex, icon);
646 tbbi.iImage = TaskItem->IconIndex;
647
648 if (!m_TaskBar.SetButtonInfo(TaskItem->Index, &tbbi))
649 {
650 TaskItem->Index = -1;
651 return -1;
652 }
653
654 TRACE("Updated button %d for hwnd 0x%p\n", TaskItem->Index, TaskItem->hWnd);
655 return TaskItem->Index;
656 }
#define TBIF_TEXT
Definition: commctrl.h:1220
#define TBSTATE_MARKED
Definition: commctrl.h:979

Referenced by AddTaskItemButton(), CheckActivateTaskItem(), FlashTaskItem(), RedrawTaskItem(), and UpdateButtonsSize().

Member Data Documentation

◆ m_ActiveTaskItem

PTASK_ITEM CTaskSwitchWnd::m_ActiveTaskItem
private

◆ m_AllocatedTaskItems

WORD CTaskSwitchWnd::m_AllocatedTaskItems
private

Definition at line 393 of file taskswnd.cpp.

Referenced by AllocTaskItem().

◆ m_ButtonCount

WORD CTaskSwitchWnd::m_ButtonCount
private

◆ m_ButtonSize

SIZE CTaskSwitchWnd::m_ButtonSize
private

Definition at line 410 of file taskswnd.cpp.

Referenced by CTaskSwitchWnd(), and UpdateButtonsSize().

◆ m_ButtonsPerLine

UINT CTaskSwitchWnd::m_ButtonsPerLine
private

Definition at line 400 of file taskswnd.cpp.

Referenced by UpdateButtonsSize(), and UpdateTaskItemButton().

◆ m_HardErrorThread

CHardErrorThread CTaskSwitchWnd::m_HardErrorThread
private

Definition at line 413 of file taskswnd.cpp.

Referenced by OnCopyData().

◆ m_ImageList

HIMAGELIST CTaskSwitchWnd::m_ImageList
private

◆ m_IsDestroying

BOOL CTaskSwitchWnd::m_IsDestroying
private

Definition at line 406 of file taskswnd.cpp.

Referenced by AddTask(), DeleteTaskItem(), and OnDestroy().

◆ m_IsGroupingEnabled

◆ m_nRudeAppValidationCounter

INT CTaskSwitchWnd::m_nRudeAppValidationCounter
private

Definition at line 408 of file taskswnd.cpp.

Referenced by OnTimer(), OnWindowActivated(), and OnWindowPosChanged().

◆ m_ShellHookMsg

UINT CTaskSwitchWnd::m_ShellHookMsg
private

Definition at line 390 of file taskswnd.cpp.

Referenced by OnCreate().

◆ m_TaskBar

◆ m_TaskGroups

PTASK_GROUP CTaskSwitchWnd::m_TaskGroups
private

◆ m_TaskItemCount

◆ m_TaskItems

◆ m_Theme

HTHEME CTaskSwitchWnd::m_Theme
private

◆ m_Tray

◆ m_uHardErrorMsg

UINT CTaskSwitchWnd::m_uHardErrorMsg
private

Definition at line 412 of file taskswnd.cpp.

Referenced by CTaskSwitchWnd(), and OnCopyData().


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