ReactOS 0.4.16-dev-2110-ge3521eb
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 379 of file taskswnd.cpp.

Member Typedef Documentation

◆ FULLSCREENDATA

◆ PFULLSCREENDATA

◆ PRUDEAPPDATA

◆ RUDEAPPDATA

Constructor & Destructor Documentation

◆ CTaskSwitchWnd()

CTaskSwitchWnd::CTaskSwitchWnd ( )
inline

Definition at line 415 of file taskswnd.cpp.

415 :
422 m_Theme(NULL),
424 m_ButtonCount(0),
429 {
432 }
UINT m_ShellHookMsg
Definition: taskswnd.cpp:389
PTASK_ITEM m_ActiveTaskItem
Definition: taskswnd.cpp:396
PTASK_ITEM m_TaskItems
Definition: taskswnd.cpp:395
INT m_nRudeAppValidationCounter
Definition: taskswnd.cpp:407
UINT m_uHardErrorMsg
Definition: taskswnd.cpp:411
BOOL m_IsDestroying
Definition: taskswnd.cpp:405
WORD m_ButtonCount
Definition: taskswnd.cpp:400
HTHEME m_Theme
Definition: taskswnd.cpp:398
PTASK_GROUP m_TaskGroups
Definition: taskswnd.cpp:394
BOOL m_IsGroupingEnabled
Definition: taskswnd.cpp:404
WORD m_AllocatedTaskItems
Definition: taskswnd.cpp:392
HIMAGELIST m_ImageList
Definition: taskswnd.cpp:402
WORD m_TaskItemCount
Definition: taskswnd.cpp:391
UINT m_ButtonsPerLine
Definition: taskswnd.cpp:399
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define L(x)
Definition: resources.c:13
#define ZeroMemory
Definition: minwinbase.h:31
UINT WINAPI RegisterWindowMessageW(_In_ LPCWSTR)

◆ ~CTaskSwitchWnd()

virtual CTaskSwitchWnd::~CTaskSwitchWnd ( )
inlinevirtual

Definition at line 433 of file taskswnd.cpp.

433{ }

Member Function Documentation

◆ ActivateTask()

BOOL CTaskSwitchWnd::ActivateTask ( IN HWND  hWnd)
inline

Definition at line 1226 of file taskswnd.cpp.

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

Referenced by HandleTaskItemRightClick(), and OnShellHook().

◆ ActivateTaskItem()

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

Definition at line 1215 of file taskswnd.cpp.

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

Referenced by ActivateTask().

◆ AddTask()

BOOL CTaskSwitchWnd::AddTask ( IN HWND  hWnd)
inline

Definition at line 1186 of file taskswnd.cpp.

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

768 {
769 WCHAR windowText[255];
770 TBBUTTON tbBtn = { 0 };
771 INT iIndex;
772 HICON icon;
773
774 if (TaskItem->Index >= 0)
775 {
776 return UpdateTaskItemButton(TaskItem);
777 }
778
779 if (TaskItem->Group != NULL &&
780 TaskItem->Group->IsCollapsed)
781 {
782 /* The task group is collapsed, we only need to update the group button */
783 return UpdateTaskGroupButton(TaskItem->Group);
784 }
785
786 icon = GetWndIcon(TaskItem->hWnd);
787 if (!icon)
788 icon = static_cast<HICON>(LoadImageW(NULL, MAKEINTRESOURCEW(OIC_SAMPLE), IMAGE_ICON, 0, 0, LR_SHARED | LR_DEFAULTSIZE));
789 TaskItem->IconIndex = ImageList_ReplaceIcon(m_ImageList, -1, icon);
790
791 tbBtn.iBitmap = TaskItem->IconIndex;
794 tbBtn.dwData = TaskItem->Index;
795
797 {
798 tbBtn.iString = (DWORD_PTR) windowText;
799 }
800
801 /* Find out where to insert the new button */
802 iIndex = CalculateTaskItemNewButtonIndex(TaskItem);
803 ASSERT(iIndex >= 0);
804 tbBtn.idCommand = iIndex;
805
807
808 if (m_TaskBar.InsertButton(iIndex, &tbBtn))
809 {
810 UpdateIndexesAfter(iIndex, TRUE);
811
812 TRACE("Added button %d for hwnd 0x%p\n", iIndex, TaskItem->hWnd);
813
814 TaskItem->Index = iIndex;
816
817 /* Update button sizes and fix the button wrapping */
819 return iIndex;
820 }
821
823
824 return -1;
825 }
WCHAR windowText[1024]
Definition: appswitch.c:48
INT UpdateTaskItemButton(IN PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:611
INT GetWndTextFromTaskItem(IN PTASK_ITEM TaskItem, LPWSTR szBuf, DWORD cchBuf)
Definition: taskswnd.cpp:435
VOID UpdateButtonsSize(IN BOOL bRedrawDisabled)
Definition: taskswnd.cpp:1341
CTaskToolbar m_TaskBar
Definition: taskswnd.cpp:385
VOID UpdateIndexesAfter(IN INT iIndex, BOOL bInserted)
Definition: taskswnd.cpp:495
INT UpdateTaskGroupButton(IN PTASK_GROUP TaskGroup)
Definition: taskswnd.cpp:558
HICON GetWndIcon(HWND hwnd)
Definition: taskswnd.cpp:576
INT CalculateTaskItemNewButtonIndex(IN PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:723
VOID BeginUpdate()
Definition: taskswnd.cpp:319
VOID EndUpdate()
Definition: taskswnd.cpp:324
#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:2555
#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 862 of file taskswnd.cpp.

863 {
865 PTASK_GROUP TaskGroup, *PrevLink;
866
868 &dwProcessId))
869 {
870 TRACE("Cannot get process id of hwnd 0x%p\n", hWnd);
871 return NULL;
872 }
873
874 /* Try to find an existing task group */
875 TaskGroup = m_TaskGroups;
876 PrevLink = &m_TaskGroups;
877 while (TaskGroup != NULL)
878 {
879 if (TaskGroup->dwProcessId == dwProcessId)
880 {
881 TaskGroup->dwTaskCount++;
882 return TaskGroup;
883 }
884
885 PrevLink = &TaskGroup->Next;
886 TaskGroup = TaskGroup->Next;
887 }
888
889 /* Allocate a new task group */
890 TaskGroup = (PTASK_GROUP) HeapAlloc(hProcessHeap,
892 sizeof(*TaskGroup));
893 if (TaskGroup != NULL)
894 {
895 TaskGroup->dwTaskCount = 1;
896 TaskGroup->dwProcessId = dwProcessId;
897 TaskGroup->Index = -1;
898
899 /* Add the task group to the list */
900 *PrevLink = TaskGroup;
901 }
902
903 return TaskGroup;
904 }
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
_In_ DWORD dwProcessId
Definition: shlwapi.h:193
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 1010 of file taskswnd.cpp.

1011 {
1013 {
1014 /* We need the most significant bit in 16 bit command IDs to indicate whether it
1015 is a task group or task item. WM_COMMAND limits command IDs to 16 bits! */
1016 return NULL;
1017 }
1018
1020
1021 if (m_TaskItemCount == 0)
1022 {
1024 0,
1026 if (m_TaskItems != NULL)
1027 {
1029 }
1030 else
1031 return NULL;
1032 }
1034 {
1035 PTASK_ITEM NewArray;
1036 SIZE_T NewArrayLength, ActiveTaskItemIndex;
1037
1039
1040 NewArray = (PTASK_ITEM) HeapReAlloc(hProcessHeap,
1041 0,
1043 NewArrayLength * sizeof(*m_TaskItems));
1044 if (NewArray != NULL)
1045 {
1046 if (m_ActiveTaskItem != NULL)
1047 {
1048 /* Fixup the ActiveTaskItem pointer */
1049 ActiveTaskItemIndex = m_ActiveTaskItem - m_TaskItems;
1050 m_ActiveTaskItem = NewArray + ActiveTaskItemIndex;
1051 }
1052 m_AllocatedTaskItems = (WORD) NewArrayLength;
1053 m_TaskItems = NewArray;
1054 }
1055 else
1056 return NULL;
1057 }
1058
1059 return m_TaskItems + m_TaskItemCount++;
1060 }
#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 723 of file taskswnd.cpp.

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

Referenced by AddTaskItemButton().

◆ CheckActivateTaskItem()

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

Definition at line 1095 of file taskswnd.cpp.

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

Referenced by ActivateTaskItem().

◆ ContextSensitiveHelp()

STDMETHODIMP CTaskSwitchWnd::ContextSensitiveHelp ( BOOL  fEnterMode)
inlineoverride

Implements IOleWindow.

Definition at line 2259 of file taskswnd.cpp.

2260 {
2261 return E_NOTIMPL;
2262 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ DeleteAllTasks()

VOID CTaskSwitchWnd::DeleteAllTasks ( )
inline

Definition at line 1267 of file taskswnd.cpp.

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

Referenced by OnDestroy().

◆ DeleteTask()

BOOL CTaskSwitchWnd::DeleteTask ( IN HWND  hWnd)
inline

Definition at line 1250 of file taskswnd.cpp.

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

Referenced by OnShellHook().

◆ DeleteTaskItem()

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

Definition at line 1080 of file taskswnd.cpp.

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

Referenced by DeleteAllTasks(), and DeleteTask().

◆ DeleteTaskItemButton()

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

Definition at line 827 of file taskswnd.cpp.

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

Referenced by DeleteTaskItem().

◆ EnumWindowsProc()

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

Definition at line 1476 of file taskswnd.cpp.

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

◆ ExpandTaskGroup()

VOID CTaskSwitchWnd::ExpandTaskGroup ( IN PTASK_GROUP  TaskGroup)
inline

Definition at line 567 of file taskswnd.cpp.

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

Referenced by RemoveTaskFromTaskGroup().

◆ FindLastTaskItemOfGroup()

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

Definition at line 685 of file taskswnd.cpp.

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

Referenced by CalculateTaskItemNewButtonIndex().

◆ FindOtherTaskItem()

PTASK_ITEM CTaskSwitchWnd::FindOtherTaskItem ( IN HWND  hWnd)
inline

Definition at line 969 of file taskswnd.cpp.

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

Referenced by ActivateTask().

◆ FindRudeApp()

HWND CTaskSwitchWnd::FindRudeApp ( _In_opt_ HWND  hwndFirstCheck)
inline

Definition at line 1980 of file taskswnd.cpp.

1981 {
1982 // Quick check
1983 HMONITOR hMon = MonitorFromWindow(hwndFirstCheck, MONITOR_DEFAULTTONEAREST);
1984 RUDEAPPDATA data = { hMon, NULL, hwndFirstCheck };
1985 if (::IsWindow(hwndFirstCheck) && !IsRudeEnumProc(hwndFirstCheck, (LPARAM)&data))
1986 return hwndFirstCheck;
1987
1988 // Slow check
1990
1991 return data.hwndFound;
1992 }
static BOOL CALLBACK IsRudeEnumProc(_In_ HWND hwnd, _In_ LPARAM lParam)
Definition: taskswnd.cpp:1909
struct CTaskSwitchWnd::tagRUDEAPPDATA RUDEAPPDATA
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
LONG_PTR LPARAM
Definition: minwindef.h:175
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
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 1170 of file taskswnd.cpp.

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

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

◆ FindTaskItem()

PTASK_ITEM CTaskSwitchWnd::FindTaskItem ( IN HWND  hWnd)
inline

Definition at line 952 of file taskswnd.cpp.

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

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

◆ FindTaskItemByIndex()

PTASK_ITEM CTaskSwitchWnd::FindTaskItemByIndex ( IN INT  Index)
inline

Definition at line 1153 of file taskswnd.cpp.

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

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

◆ FlashTask()

BOOL CTaskSwitchWnd::FlashTask ( IN HWND  hWnd)
inline

Definition at line 1287 of file taskswnd.cpp.

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

Referenced by OnShellHook().

◆ FlashTaskItem()

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

Definition at line 1281 of file taskswnd.cpp.

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

Referenced by FlashTask().

◆ FreeTaskItem()

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

Definition at line 1062 of file taskswnd.cpp.

1063 {
1064 WORD wIndex;
1065
1066 if (TaskItem == m_ActiveTaskItem)
1068
1069 wIndex = (WORD) (TaskItem - m_TaskItems);
1070 if (wIndex + 1 < m_TaskItemCount)
1071 {
1072 MoveMemory(TaskItem,
1073 TaskItem + 1,
1074 (m_TaskItemCount - wIndex - 1) * sizeof(*TaskItem));
1075 }
1076
1078 }
#define MoveMemory
Definition: minwinbase.h:28

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 1935 of file taskswnd.cpp.

1936 {
1938
1939 BOOL bFullOpening = (pData->hTargetMonitor == hMonitor);
1940 if (!bFullOpening && pData->pRect)
1941 {
1942 RECT rc, rcMon;
1943 SHELL_GetMonitorRect(hMonitor, &rcMon, FALSE);
1944 ::IntersectRect(&rc, &rcMon, pData->pRect);
1945 bFullOpening = ::EqualRect(&rc, &rcMon);
1946 }
1947
1948 // Notify ABN_FULLSCREENAPP to appbars
1949 pData->pTray->NotifyFullScreenToAppBars(hMonitor, bFullOpening);
1950 return TRUE;
1951 }
struct CTaskSwitchWnd::tagFULLSCREENDATA * PFULLSCREENDATA
LPARAM lParam
Definition: combotst.c:139
unsigned int BOOL
Definition: ntddk_ex.h:94
Definition: windef.h:99
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 2250 of file taskswnd.cpp.

2251 {
2252 if (!phwnd)
2253 return E_INVALIDARG;
2254 *phwnd = m_hWnd;
2255 return S_OK;
2256 }
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 576 of file taskswnd.cpp.

577 {
578 HICON hIcon = NULL;
579
580 /* Retrieve icon by sending a message */
581#define GET_ICON(type) \
582 SendMessageTimeout(hwnd, WM_GETICON, (type), 0, SMTO_NOTIMEOUTIFNOTHUNG, 100, (PDWORD_PTR)&hIcon)
583
584 LRESULT bAlive = GET_ICON(g_TaskbarSettings.bSmallIcons ? ICON_SMALL2 : ICON_BIG);
585 if (hIcon)
586 return hIcon;
587
588 if (bAlive)
589 {
590 bAlive = GET_ICON(ICON_SMALL);
591 if (hIcon)
592 return hIcon;
593 }
594
595 if (bAlive)
596 {
598 if (hIcon)
599 return hIcon;
600 }
601#undef GET_ICON
602
603 /* If we failed, retrieve icon from the window class */
605 if (hIcon)
606 return hIcon;
607
609 }
TaskbarSettings g_TaskbarSettings
Definition: settings.cpp:23
LONG_PTR LRESULT
Definition: minwindef.h:176
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
#define GCLP_HICONSM
Definition: winuser.h:683
#define GCLP_HICON
Definition: winuser.h:682
#define GetClassLongPtr
Definition: winuser.h:5893

Referenced by AddTaskItemButton(), and UpdateTaskItemButton().

◆ GetWndTextFromTaskItem()

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

Definition at line 435 of file taskswnd.cpp.

436 {
437 /* Get the window text without sending a message so we don't hang if an
438 application isn't responding! */
439 return InternalGetWindowText(TaskItem->hWnd, szBuf, cchBuf);
440 }
_In_ UINT cchBuf
Definition: shlwapi.h:378
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 1606 of file taskswnd.cpp.

1607 {
1608 const UINT uAppCmd = GET_APPCOMMAND_LPARAM(lParam);
1609 if (InvokeRegistryAppKeyCommand(uAppCmd))
1610 return TRUE;
1611 switch (uAppCmd)
1612 {
1613 case APPCOMMAND_VOLUME_MUTE:
1614 case APPCOMMAND_VOLUME_DOWN:
1615 case APPCOMMAND_VOLUME_UP:
1616 // TODO: Try IMMDeviceEnumerator::GetDefaultAudioEndpoint first and then fall back to mixer.
1617 FIXME("Call the mixer API to change the global volume\n");
1618 return TRUE;
1619 case APPCOMMAND_BROWSER_SEARCH:
1620 return SHFindFiles(NULL, NULL);
1621 }
1622 return FALSE;
1623 }
#define FIXME(fmt,...)
Definition: precomp.h:53
static BOOL InvokeRegistryAppKeyCommand(UINT uAppCmd)
Definition: taskswnd.cpp:1569
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 1746 of file taskswnd.cpp.

1747 {
1748 PTASK_ITEM TaskItem;
1749 PTASK_GROUP TaskGroup;
1750
1752 {
1753 TaskGroup = FindTaskGroupByIndex((INT) wIndex);
1754 if (TaskGroup != NULL && TaskGroup->IsCollapsed)
1755 {
1756 HandleTaskGroupClick(TaskGroup);
1757 return TRUE;
1758 }
1759 }
1760
1761 TaskItem = FindTaskItemByIndex((INT) wIndex);
1762 if (TaskItem != NULL)
1763 {
1764 HandleTaskItemClick(TaskItem);
1765 return TRUE;
1766 }
1767
1768 return FALSE;
1769 }
PTASK_GROUP FindTaskGroupByIndex(IN INT Index)
Definition: taskswnd.cpp:1170
VOID HandleTaskGroupClick(IN OUT PTASK_GROUP TaskGroup)
Definition: taskswnd.cpp:1741
PTASK_ITEM FindTaskItemByIndex(IN INT Index)
Definition: taskswnd.cpp:1153
VOID HandleTaskItemClick(IN OUT PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:1709

Referenced by OnCommand().

◆ HandleButtonRightClick()

BOOL CTaskSwitchWnd::HandleButtonRightClick ( IN WORD  wIndex)
inline

Definition at line 1798 of file taskswnd.cpp.

1799 {
1800 PTASK_ITEM TaskItem;
1801 PTASK_GROUP TaskGroup;
1803 {
1804 TaskGroup = FindTaskGroupByIndex((INT) wIndex);
1805 if (TaskGroup != NULL && TaskGroup->IsCollapsed)
1806 {
1807 HandleTaskGroupRightClick(TaskGroup);
1808 return TRUE;
1809 }
1810 }
1811
1812 TaskItem = FindTaskItemByIndex((INT) wIndex);
1813
1814 if (TaskItem != NULL)
1815 {
1816 HandleTaskItemRightClick(TaskItem);
1817 return TRUE;
1818 }
1819
1820 return FALSE;
1821 }
VOID HandleTaskGroupRightClick(IN OUT PTASK_GROUP TaskGroup)
Definition: taskswnd.cpp:1793
VOID HandleTaskItemRightClick(IN OUT PTASK_ITEM TaskItem)
Definition: taskswnd.cpp:1777

Referenced by OnContextMenu().

◆ HandleFullScreenApp()

void CTaskSwitchWnd::HandleFullScreenApp ( _In_opt_ HWND  hwndRude)
inline

Definition at line 1953 of file taskswnd.cpp.

1954 {
1955 // Notify ABN_FULLSCREENAPP for every monitor
1956 RECT rc;
1958 if (hwndRude && ::GetWindowRect(hwndRude, &rc))
1959 {
1960 Data.pRect = &rc;
1961 Data.hTargetMonitor = ::MonitorFromWindow(hwndRude, MONITOR_DEFAULTTONULL);
1962 }
1963 Data.pTray = m_Tray;
1965
1966 if (hwndRude)
1967 {
1968 // Make the taskbar bottom
1970 HWND hwndTray = m_Tray->GetHWND();
1971 ::SetWindowPos(hwndTray, HWND_BOTTOM, 0, 0, 0, 0, uFlags);
1972
1973 // Switch to the rude app if necessary
1974 DWORD exstyle = (DWORD)::GetWindowLongPtrW(hwndRude, GWL_EXSTYLE);
1975 if (!(exstyle & WS_EX_TOPMOST) && !SHELL_IsRudeWindowActive(hwndRude))
1976 ::SwitchToThisWindow(hwndRude, TRUE);
1977 }
1978 }
static BOOL CALLBACK FullScreenEnumProc(_In_ HMONITOR hMonitor, _In_opt_ HDC hDC, _In_ LPRECT prc, _In_ LPARAM lParam)
Definition: taskswnd.cpp:1935
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:4931
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 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 1824 of file taskswnd.cpp.

1825 {
1826 LRESULT Ret = CDRF_DODEFAULT;
1827 PTASK_GROUP TaskGroup;
1828 PTASK_ITEM TaskItem;
1829
1830 TaskItem = FindTaskItemByIndex((INT) nmtbcd->nmcd.dwItemSpec);
1831 TaskGroup = FindTaskGroupByIndex((INT) nmtbcd->nmcd.dwItemSpec);
1832 if (TaskGroup == NULL && TaskItem != NULL)
1833 {
1834 ASSERT(TaskItem != NULL);
1835
1836 if (TaskItem != NULL && ::IsWindow(TaskItem->hWnd))
1837 {
1838 /* Make the entire button flashing if necessary */
1839 if (nmtbcd->nmcd.uItemState & CDIS_MARKED)
1840 {
1841 Ret = TBCDRF_NOBACKGROUND;
1842 if (!m_Theme)
1843 {
1844 SelectObject(nmtbcd->nmcd.hdc, GetSysColorBrush(COLOR_HIGHLIGHT));
1845 Rectangle(nmtbcd->nmcd.hdc,
1846 nmtbcd->nmcd.rc.left,
1847 nmtbcd->nmcd.rc.top,
1848 nmtbcd->nmcd.rc.right,
1849 nmtbcd->nmcd.rc.bottom);
1850 }
1851 else
1852 {
1853 DrawThemeBackground(m_Theme, nmtbcd->nmcd.hdc, TDP_FLASHBUTTON, 0, &nmtbcd->nmcd.rc, 0);
1854 }
1855 nmtbcd->clrText = GetSysColor(COLOR_HIGHLIGHTTEXT);
1856 return Ret;
1857 }
1858 }
1859 }
1860 else if (TaskGroup != NULL)
1861 {
1862 /* FIXME: Implement painting for task groups */
1863 }
1864 return Ret;
1865 }
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 1741 of file taskswnd.cpp.

1742 {
1743 /* TODO: Show task group menu */
1744 }

Referenced by HandleButtonClick().

◆ HandleTaskGroupRightClick()

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

Definition at line 1793 of file taskswnd.cpp.

1794 {
1795 /* TODO: Show task group right click menu */
1796 }

Referenced by HandleButtonRightClick().

◆ HandleTaskItemClick()

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

Definition at line 1709 of file taskswnd.cpp.

1710 {
1711 BOOL bIsMinimized;
1712 BOOL bIsActive;
1713
1714 if (::IsWindow(TaskItem->hWnd))
1715 {
1716 bIsMinimized = ::IsIconic(TaskItem->hWnd);
1717 bIsActive = (TaskItem == m_ActiveTaskItem);
1718
1719 TRACE("Active TaskItem %p, selected TaskItem %p\n", m_ActiveTaskItem, TaskItem);
1720 if (m_ActiveTaskItem)
1721 TRACE("Active TaskItem hWnd=%p, TaskItem hWnd %p\n", m_ActiveTaskItem->hWnd, TaskItem->hWnd);
1722
1723 TRACE("Valid button clicked. HWND=%p, IsMinimized=%s, IsActive=%s...\n",
1724 TaskItem->hWnd, bIsMinimized ? "Yes" : "No", bIsActive ? "Yes" : "No");
1725
1726 if (!bIsMinimized && bIsActive)
1727 {
1728 if (!::IsHungAppWindow(TaskItem->hWnd))
1729 ::ShowWindowAsync(TaskItem->hWnd, SW_MINIMIZE);
1730 TRACE("Valid button clicked. App window Minimized.\n");
1731 }
1732 else
1733 {
1734 ::SwitchToThisWindow(TaskItem->hWnd, TRUE);
1735
1736 TRACE("Valid button clicked. App window Restored.\n");
1737 }
1738 }
1739 }
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 1777 of file taskswnd.cpp.

1778 {
1779 POINT pt;
1780 GetCursorPos(&pt);
1781
1782 SetForegroundWindow(TaskItem->hWnd);
1783
1784 ActivateTask(TaskItem->hWnd);
1785
1786 if (GetForegroundWindow() != TaskItem->hWnd)
1787 ERR("HandleTaskItemRightClick detected the window did not become foreground\n");
1788
1789 ::SendMessageCallbackW(TaskItem->hWnd, WM_POPUPSYSTEMMENU, 0, MAKELPARAM(pt.x, pt.y),
1790 SendAsyncProc, (ULONG_PTR)TaskItem);
1791 }
#define ERR(fmt,...)
Definition: precomp.h:57
BOOL ActivateTask(IN HWND hWnd)
Definition: taskswnd.cpp:1226
static VOID CALLBACK SendAsyncProc(HWND hwnd, UINT uMsg, DWORD_PTR dwData, LRESULT lResult)
Definition: taskswnd.cpp:1772
#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:4110
HWND WINAPI GetForegroundWindow(void)
Definition: ntwrapper.h:392
BOOL WINAPI SetForegroundWindow(_In_ HWND)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:3047
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 1867 of file taskswnd.cpp.

1868 {
1869 LRESULT Ret = 0;
1870
1871 switch (nmh->code)
1872 {
1873 case NM_CUSTOMDRAW:
1874 {
1875 LPNMTBCUSTOMDRAW nmtbcd = (LPNMTBCUSTOMDRAW) nmh;
1876
1877 switch (nmtbcd->nmcd.dwDrawStage)
1878 {
1879
1880 case CDDS_ITEMPREPAINT:
1881 Ret = HandleItemPaint(nmtbcd);
1882 break;
1883
1884 case CDDS_PREPAINT:
1885 Ret = CDRF_NOTIFYITEMDRAW;
1886 break;
1887
1888 default:
1889 Ret = CDRF_DODEFAULT;
1890 break;
1891 }
1892 break;
1893 }
1894 }
1895
1896 return Ret;
1897 }
LRESULT HandleItemPaint(IN OUT NMTBCUSTOMDRAW *nmtbcd)
Definition: taskswnd.cpp:1824
#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 2237 of file taskswnd.cpp.

2238 {
2239 m_Tray = tray;
2242 if (!m_hWnd)
2243 return E_FAIL;
2244 return S_OK;
2245 }
@ 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 1569 of file taskswnd.cpp.

1570 {
1571 BOOL bResult = FALSE;
1572 WCHAR szBuf[MAX_PATH * 2];
1573 wsprintfW(szBuf, L"%s\\AppKey\\%u", REGSTR_PATH_EXPLORER, uAppCmd);
1574 HUSKEY hKey;
1576 return bResult;
1577
1578 DWORD cb = sizeof(szBuf);
1579 if (!bResult && SHRegQueryUSValueW(hKey, L"ShellExecute", NULL, szBuf, &cb, FALSE, NULL, 0) == ERROR_SUCCESS)
1580 {
1581 bResult = TRUE;
1582 }
1583 cb = sizeof(szBuf);
1584 if (!bResult && SHRegQueryUSValueW(hKey, L"Association", NULL, szBuf, &cb, FALSE, NULL, 0) == ERROR_SUCCESS)
1585 {
1586 bResult = TRUE;
1587 cb = _countof(szBuf);
1589 *szBuf = UNICODE_NULL;
1590 }
1591 cb = sizeof(szBuf);
1592 if (!bResult && SHRegQueryUSValueW(hKey, L"RegisteredApp", NULL, szBuf, &cb, FALSE, NULL, 0) == ERROR_SUCCESS)
1593 {
1594 bResult = TRUE;
1596 *szBuf = UNICODE_NULL; // Don't execute again
1597 }
1599
1600 // Note: Tweak UI uses an empty string for its "Do nothing" option.
1601 if (bResult && *szBuf)
1603 return bResult;
1604 }
#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:1026
#define UNICODE_NULL
@ ASSOCSTR_EXECUTABLE
Definition: shlwapi.h:887
@ ASSOCF_NOTRUNCATE
Definition: shlwapi.h:865
#define AssocQueryString
Definition: shlwapi.h:1014
#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:3430
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 1909 of file taskswnd.cpp.

1910 {
1912
1913 HMONITOR hMon = ::MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);
1914 if (!hMon ||
1915 (pData->hTargetMonitor && pData->hTargetMonitor != hMon) ||
1916 !SHELL_IsRudeWindow(hMon, hwnd, (hwnd == pData->hwndFirstCheck)))
1917 {
1918 return TRUE; // Continue
1919 }
1920
1921 pData->hwndFound = hwnd;
1922 return FALSE; // Finish
1923 }
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 2066 of file taskswnd.cpp.

2067 {
2068 LRESULT Ret = TRUE;
2069 if (lParam != 0 && (HWND) lParam == m_TaskBar.m_hWnd)
2070 {
2072 }
2073 return Ret;
2074 }
BOOL HandleButtonClick(IN WORD wIndex)
Definition: taskswnd.cpp:1746
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 2123 of file taskswnd.cpp.

2124 {
2125 LRESULT Ret = 0;
2126 INT_PTR iBtn = -1;
2127
2128 if (m_TaskBar.m_hWnd != NULL)
2129 {
2130 POINT pt;
2131
2132 pt.x = GET_X_LPARAM(lParam);
2133 pt.y = GET_Y_LPARAM(lParam);
2134
2136
2137 iBtn = m_TaskBar.HitTest(&pt);
2138 if (iBtn >= 0)
2139 {
2141 }
2142 }
2143 if (iBtn < 0)
2144 {
2145 /* Not on a taskbar button, so forward message to tray */
2146 Ret = SendMessage(m_Tray->GetHWND(), uMsg, wParam, lParam);
2147 }
2148 return Ret;
2149 }
BOOL HandleButtonRightClick(IN WORD wIndex)
Definition: taskswnd.cpp:1798
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:5954
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)

◆ OnCopyData()

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

Definition at line 2221 of file taskswnd.cpp.

2222 {
2224 if (cpData->dwData == m_uHardErrorMsg)
2225 {
2226 /* A hard error balloon message */
2228 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));
2229 if (pData->cbHeaderSize == sizeof(BALLOON_HARD_ERROR_DATA))
2231 return TRUE;
2232 }
2233
2234 return FALSE;
2235 }
void StartThread(PBALLOON_HARD_ERROR_DATA pData)
Definition: taskswnd.cpp:263
CHardErrorThread m_HardErrorThread
Definition: taskswnd.cpp:412
#define ULONG_PTR
Definition: config.h:101
ULONG_PTR dwData
Definition: winuser.h:3103
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 1515 of file taskswnd.cpp.

1516 {
1518 return FALSE;
1519
1520 SetWindowTheme(m_TaskBar.m_hWnd, L"TaskBand", NULL);
1521
1524 ILC_COLOR32 | ILC_MASK, 0, 1000);
1525 m_TaskBar.SetImageList(m_ImageList);
1526
1527 /* Set proper spacing between buttons */
1528 m_TaskBar.UpdateTbButtonSpacing(m_Tray->IsHorizontal(), m_Theme != NULL);
1529
1530 /* Register the shell hook */
1532
1533 TRACE("ShellHookMsg got assigned number %d\n", m_ShellHookMsg);
1534
1535 RegisterShellHook(m_hWnd, 3); /* 1 if no NT! We're targeting NT so we don't care! */
1536
1538
1539 /* Recalculate the button size */
1541
1542#if DUMP_TASKS != 0
1543 SetTimer(hwnd, 1, 5000, NULL);
1544#endif
1545 return TRUE;
1546 }
INT UpdateTbButtonSpacing(IN BOOL bHorizontal, IN BOOL bThemed, IN UINT uiRows=0, IN UINT uiBtnsPerLine=0)
Definition: taskswnd.cpp:287
BOOL Initialize(HWND hWndParent)
Definition: taskswnd.cpp:366
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 1548 of file taskswnd.cpp.

1549 {
1551
1553
1554 /* Unregister the shell hook */
1556
1559
1560 if (m_ImageList)
1561 {
1563 m_ImageList = NULL;
1564 }
1565
1566 return TRUE;
1567 }
VOID DeleteAllTasks()
Definition: taskswnd.cpp:1267
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:941
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 2023 of file taskswnd.cpp.

2024 {
2025 HDC hdc = (HDC) wParam;
2026
2027 if (!IsAppThemed())
2028 {
2029 bHandled = FALSE;
2030 return 0;
2031 }
2032
2033 RECT rect;
2036
2037 return TRUE;
2038 }
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 2151 of file taskswnd.cpp.

2152 {
2153 PTASK_ITEM TaskItem = FindTaskItem((HWND) wParam);
2154 if (TaskItem)
2155 {
2156 RECT* prcMinRect = (RECT*) lParam;
2157 RECT rcItem, rcToolbar;
2158 m_TaskBar.GetItemRect(TaskItem->Index, &rcItem);
2159 m_TaskBar.GetWindowRect(&rcToolbar);
2160
2161 OffsetRect(&rcItem, rcToolbar.left, rcToolbar.top);
2162
2163 *prcMinRect = rcItem;
2164 return TRUE;
2165 }
2166 return FALSE;
2167 }
BOOL GetWindowRect(LPRECT lpRect) const
Definition: atlwin.h:816
LONG top
Definition: windef.h:101
LONG left
Definition: windef.h:100
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 2169 of file taskswnd.cpp.

2170 {
2171 return MA_NOACTIVATE;
2172 }
#define MA_NOACTIVATE
Definition: winuser.h:2539

◆ OnNcHitTest()

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

Definition at line 2055 of file taskswnd.cpp.

2056 {
2057 LRESULT Ret = TRUE;
2058 /* We want the tray window to be draggable everywhere, so make the control
2059 appear transparent */
2060 Ret = DefWindowProc(uMsg, wParam, lParam);
2061 if (Ret != HTVSCROLL && Ret != HTHSCROLL)
2062 Ret = HTTRANSPARENT;
2063 return Ret;
2064 }
#define DefWindowProc
Definition: ros2win.h:31
#define HTVSCROLL
Definition: winuser.h:2518
#define HTHSCROLL
Definition: winuser.h:2517
#define HTTRANSPARENT
Definition: winuser.h:2509

◆ OnNotify()

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

Definition at line 2076 of file taskswnd.cpp.

2077 {
2078 LRESULT Ret = TRUE;
2079 const NMHDR *nmh = (const NMHDR *) lParam;
2080
2081 if (nmh->hwndFrom == m_TaskBar.m_hWnd)
2082 {
2083 Ret = HandleToolbarNotification(nmh);
2084 }
2085 return Ret;
2086 }
LRESULT HandleToolbarNotification(IN const NMHDR *nmh)
Definition: taskswnd.cpp:1867
HWND hwndFrom
Definition: winuser.h:3259

◆ OnSetFont()

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

Definition at line 2205 of file taskswnd.cpp.

2206 {
2207 return m_TaskBar.SendMessageW(uMsg, wParam, lParam);
2208 }

◆ OnSettingChanged()

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

Definition at line 2210 of file taskswnd.cpp.

2211 {
2212 if (wParam == SPI_SETNONCLIENTMETRICS)
2213 {
2214 /* Don't update the font, this will be done when we get a WM_SETFONT from our parent */
2216 }
2217
2218 return 0;
2219 }

◆ OnShellHook()

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

Definition at line 1625 of file taskswnd.cpp.

1626 {
1627 BOOL Ret = FALSE;
1628
1629 /* In case the shell hook wasn't registered properly, ignore WM_NULLs*/
1630 if (uMsg == 0)
1631 {
1632 bHandled = FALSE;
1633 return 0;
1634 }
1635
1636 TRACE("Received shell hook message: wParam=%08lx, lParam=%08lx\n", wParam, lParam);
1637
1638 switch ((INT) wParam)
1639 {
1640 case HSHELL_APPCOMMAND:
1641 Ret = HandleAppCommand(0, lParam);
1642 break;
1643
1645 AddTask((HWND) lParam);
1646 break;
1647
1649 /* The window still exists! Delay destroying it a bit */
1652 break;
1653
1655 case HSHELL_WINDOWACTIVATED:
1658 break;
1659
1660 case HSHELL_FLASH:
1662 break;
1663
1664 case HSHELL_REDRAW:
1666 break;
1667
1668 case HSHELL_TASKMAN:
1669 ::PostMessage(m_Tray->GetHWND(), TWM_OPENSTARTMENU, 0, 0);
1670 break;
1671
1673 ::SwitchToThisWindow(m_Tray->GetHWND(), TRUE);
1674 ::SetForegroundWindow(m_Tray->GetHWND());
1675 break;
1676
1677 case HSHELL_LANGUAGE:
1678 case HSHELL_SYSMENU:
1679 case HSHELL_ENDTASK:
1680 case HSHELL_ACCESSIBILITYSTATE:
1681 case HSHELL_WINDOWREPLACED:
1682 case HSHELL_WINDOWREPLACING:
1683
1684 case HSHELL_GETMINRECT:
1685 default:
1686 {
1687#if DEBUG_SHELL_HOOK
1688 int i, found;
1689 for (i = 0, found = 0; i != _countof(hshell_msg); i++)
1690 {
1691 if (hshell_msg[i].msg == (INT) wParam)
1692 {
1693 TRACE("Shell message %ws unhandled (lParam = 0x%p)!\n", hshell_msg[i].msg_name, lParam);
1694 found = 1;
1695 break;
1696 }
1697 }
1698 if (found)
1699 break;
1700#endif
1701 TRACE("Shell message %d unhandled (lParam = 0x%p)!\n", (INT) wParam, lParam);
1702 break;
1703 }
1704 }
1705
1706 return Ret;
1707 }
#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:1606
BOOL FlashTask(IN HWND hWnd)
Definition: taskswnd.cpp:1287
BOOL RedrawTask(IN HWND hWnd)
Definition: taskswnd.cpp:1327
void OnWindowDestroyed(_In_ HWND hwndTarget)
Definition: taskswnd.cpp:2015
BOOL DeleteTask(IN HWND hWnd)
Definition: taskswnd.cpp:1250
void OnWindowActivated(_In_ HWND hwndTarget)
Definition: taskswnd.cpp:2006
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:5943

◆ OnSize()

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

Definition at line 2040 of file taskswnd.cpp.

2041 {
2042 SIZE szClient;
2043
2044 szClient.cx = LOWORD(lParam);
2045 szClient.cy = HIWORD(lParam);
2046 if (m_TaskBar.m_hWnd != NULL)
2047 {
2048 m_TaskBar.SetWindowPos(NULL, 0, 0, szClient.cx, szClient.cy, SWP_NOZORDER);
2049
2051 }
2052 return TRUE;
2053 }
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 2095 of file taskswnd.cpp.

2096 {
2097 BOOL bSettingsChanged = FALSE;
2098 TaskbarSettings* newSettings = (TaskbarSettings*)lParam;
2099
2100 if (newSettings->bGroupButtons != g_TaskbarSettings.bGroupButtons)
2101 {
2102 bSettingsChanged = TRUE;
2105 }
2106
2107 if (newSettings->bSmallIcons != g_TaskbarSettings.bSmallIcons)
2108 {
2109 bSettingsChanged = TRUE;
2111 }
2112
2113 if (bSettingsChanged)
2114 {
2115 /* Refresh each task item view */
2118 }
2119
2120 return 0;
2121 }

◆ OnThemeChanged()

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

Definition at line 1500 of file taskswnd.cpp.

1501 {
1502 TRACE("OmThemeChanged\n");
1503
1504 if (m_Theme)
1506
1507 if (IsThemeActive())
1508 m_Theme = OpenThemeData(m_hWnd, L"TaskBand");
1509 else
1510 m_Theme = NULL;
1511
1512 return TRUE;
1513 }
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 2174 of file taskswnd.cpp.

2175 {
2176 switch (wParam)
2177 {
2178#if DUMP_TASKS != 0
2179 case 1:
2180 DumpTasks();
2181 break;
2182#endif
2184 {
2185 // Real activation of rude app might take some time after HSHELL_...ACTIVATED.
2186 // Wait up to 5 seconds with validating the rude app at each second.
2187 HWND hwndRude = FindRudeApp(NULL);
2188 HandleFullScreenApp(hwndRude);
2189
2194 break;
2195 }
2196 default:
2197 {
2198 WARN("Unknown timer ID: %p\n", wParam);
2199 break;
2200 }
2201 }
2202 return TRUE;
2203 }
HWND FindRudeApp(_In_opt_ HWND hwndFirstCheck)
Definition: taskswnd.cpp:1980
void HandleFullScreenApp(_In_opt_ HWND hwndRude)
Definition: taskswnd.cpp:1953
#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 2088 of file taskswnd.cpp.

2089 {
2090 /* Update the button spacing */
2091 m_TaskBar.UpdateTbButtonSpacing(m_Tray->IsHorizontal(), m_Theme != NULL);
2092 return TRUE;
2093 }

◆ OnWindowActivated()

void CTaskSwitchWnd::OnWindowActivated ( _In_ HWND  hwndTarget)
inline

Definition at line 2006 of file taskswnd.cpp.

2007 {
2008 // Re-start rude app validation
2012 }

Referenced by OnShellHook().

◆ OnWindowDestroyed()

void CTaskSwitchWnd::OnWindowDestroyed ( _In_ HWND  hwndTarget)
inline

Definition at line 2015 of file taskswnd.cpp.

2016 {
2017 if (!FindTaskItem(hwndTarget))
2018 return;
2019 HWND hwndRude = FindRudeApp(hwndTarget);
2020 HandleFullScreenApp(hwndRude);
2021 }

Referenced by OnShellHook().

◆ OnWindowPosChanged()

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

Definition at line 1995 of file taskswnd.cpp.

1996 {
1997 // Re-start rude app validation
2001 bHandled = FALSE;
2002 return 0;
2003 }

◆ RedrawTask()

BOOL CTaskSwitchWnd::RedrawTask ( IN HWND  hWnd)
inline

Definition at line 1327 of file taskswnd.cpp.

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

Referenced by OnShellHook().

◆ RedrawTaskItem()

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

Definition at line 1302 of file taskswnd.cpp.

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

Referenced by RedrawTask().

◆ RefreshWindowList()

BOOL CTaskSwitchWnd::RefreshWindowList ( )
inline

Definition at line 1493 of file taskswnd.cpp.

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

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

◆ RemoveIcon()

VOID CTaskSwitchWnd::RemoveIcon ( IN PTASK_ITEM  TaskItem)
inline

Definition at line 657 of file taskswnd.cpp.

658 {
659 TBBUTTONINFO tbbi;
660 PTASK_ITEM currentTaskItem, LastItem;
661
662 if (TaskItem->IconIndex == -1)
663 return;
664
665 tbbi.cbSize = sizeof(tbbi);
666 tbbi.dwMask = TBIF_IMAGE;
667
668 currentTaskItem = m_TaskItems;
669 LastItem = currentTaskItem + m_TaskItemCount;
670 while (currentTaskItem != LastItem)
671 {
672 if (currentTaskItem->IconIndex > TaskItem->IconIndex)
673 {
674 currentTaskItem->IconIndex--;
675 tbbi.iImage = currentTaskItem->IconIndex;
676
677 m_TaskBar.SetButtonInfo(currentTaskItem->Index, &tbbi);
678 }
679 currentTaskItem++;
680 }
681
682 ImageList_Remove(m_ImageList, TaskItem->IconIndex);
683 }
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 906 of file taskswnd.cpp.

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

1487 {
1489
1490 return This->EnumWindowsProc(hWnd);
1491 }

Referenced by RefreshWindowList().

◆ SendAsyncProc()

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

Definition at line 1772 of file taskswnd.cpp.

1773 {
1774 ::PostMessageW(hwnd, WM_NULL, 0, 0);
1775 }
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_NULL
Definition: winuser.h:1635

Referenced by HandleTaskItemRightClick().

◆ UpdateButtonsSize()

VOID CTaskSwitchWnd::UpdateButtonsSize ( IN BOOL  bRedrawDisabled)
inline

Definition at line 1341 of file taskswnd.cpp.

1342 {
1343 RECT rcClient;
1344 UINT uiRows, uiMax, uiMin, uiBtnsPerLine, ui;
1345 LONG NewBtnSize;
1346 BOOL Horizontal;
1347
1348 /* Update the size of the image list if needed */
1349 int cx, cy;
1353 {
1357
1358 /* SetIconSize removes all icons so we have to reinsert them */
1359 PTASK_ITEM TaskItem = m_TaskItems;
1360 PTASK_ITEM LastTaskItem = m_TaskItems + m_TaskItemCount;
1361 while (TaskItem != LastTaskItem)
1362 {
1363 TaskItem->IconIndex = -1;
1364 UpdateTaskItemButton(TaskItem);
1365
1366 TaskItem++;
1367 }
1368 m_TaskBar.SetImageList(m_ImageList);
1369 }
1370
1371 if (GetClientRect(&rcClient) && !IsRectEmpty(&rcClient))
1372 {
1373 if (m_ButtonCount > 0)
1374 {
1375 Horizontal = m_Tray->IsHorizontal();
1376
1377 if (Horizontal)
1378 {
1379 TBMETRICS tbm = { 0 };
1380 tbm.cbSize = sizeof(tbm);
1382 m_TaskBar.GetMetrics(&tbm);
1383
1384 if (m_ButtonSize.cy + tbm.cyButtonSpacing != 0)
1385 uiRows = (rcClient.bottom + tbm.cyButtonSpacing) / (m_ButtonSize.cy + tbm.cyButtonSpacing);
1386 else
1387 uiRows = 1;
1388
1389 if (uiRows == 0)
1390 uiRows = 1;
1391
1392 uiBtnsPerLine = (m_ButtonCount + uiRows - 1) / uiRows;
1393 }
1394 else
1395 {
1396 uiBtnsPerLine = 1;
1397 uiRows = m_ButtonCount;
1398 }
1399
1400 if (!bRedrawDisabled)
1402
1403 /* We might need to update the button spacing */
1404 int cxButtonSpacing = m_TaskBar.UpdateTbButtonSpacing(
1405 Horizontal, m_Theme != NULL,
1406 uiRows, uiBtnsPerLine);
1407
1408 /* Determine the minimum and maximum width of a button */
1410 if (Horizontal)
1411 {
1413
1414 /* Calculate the ideal width and make sure it's within the allowed range */
1415 NewBtnSize = (rcClient.right - (uiBtnsPerLine * cxButtonSpacing)) / uiBtnsPerLine;
1416
1417 if (NewBtnSize < (LONG) uiMin)
1418 NewBtnSize = uiMin;
1419 if (NewBtnSize >(LONG)uiMax)
1420 NewBtnSize = uiMax;
1421
1422 /* Recalculate how many buttons actually fit into one line */
1423 uiBtnsPerLine = rcClient.right / (NewBtnSize + cxButtonSpacing);
1424 if (uiBtnsPerLine == 0)
1425 uiBtnsPerLine++;
1426 }
1427 else
1428 {
1429 NewBtnSize = uiMax = rcClient.right;
1430 }
1431
1432 m_ButtonSize.cx = NewBtnSize;
1433
1434 m_ButtonsPerLine = uiBtnsPerLine;
1435
1436 for (ui = 0; ui != m_ButtonCount; ui++)
1437 {
1438 TBBUTTONINFOW tbbi = { 0 };
1439 tbbi.cbSize = sizeof(tbbi);
1441 tbbi.cx = (INT) NewBtnSize;
1442 tbbi.fsState = TBSTATE_ENABLED;
1443
1444 /* Check if we're updating a button that is the last one in the
1445 line. If so, we need to set the TBSTATE_WRAP flag! */
1446 if (Horizontal)
1447 {
1448 if ((ui + 1) % uiBtnsPerLine == 0)
1449 tbbi.fsState |= TBSTATE_WRAP;
1450 }
1451 else
1452 {
1453 tbbi.fsState |= TBSTATE_WRAP;
1454 }
1455
1456 if (m_ActiveTaskItem != NULL &&
1458 {
1459 tbbi.fsState |= TBSTATE_CHECKED;
1460 }
1461
1462 m_TaskBar.SetButtonInfo(ui, &tbbi);
1463 }
1464 }
1465 else
1466 {
1467 m_ButtonsPerLine = 0;
1468 m_ButtonSize.cx = 0;
1469 }
1470 }
1471
1472 // FIXME: This seems to be enabling redraws prematurely, but moving it to its right place doesn't work!
1474 }
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:102
LONG bottom
Definition: windef.h:103
#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 495 of file taskswnd.cpp.

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

Referenced by AddTaskItemButton(), and DeleteTaskItemButton().

◆ UpdateTaskGroupButton()

INT CTaskSwitchWnd::UpdateTaskGroupButton ( IN PTASK_GROUP  TaskGroup)
inline

Definition at line 558 of file taskswnd.cpp.

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

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

◆ UpdateTaskItemButton()

INT CTaskSwitchWnd::UpdateTaskItemButton ( IN PTASK_ITEM  TaskItem)
inline

Definition at line 611 of file taskswnd.cpp.

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

Referenced by AllocTaskItem().

◆ m_ButtonCount

WORD CTaskSwitchWnd::m_ButtonCount
private

◆ m_ButtonSize

SIZE CTaskSwitchWnd::m_ButtonSize
private

Definition at line 409 of file taskswnd.cpp.

Referenced by CTaskSwitchWnd(), and UpdateButtonsSize().

◆ m_ButtonsPerLine

UINT CTaskSwitchWnd::m_ButtonsPerLine
private

Definition at line 399 of file taskswnd.cpp.

Referenced by UpdateButtonsSize(), and UpdateTaskItemButton().

◆ m_HardErrorThread

CHardErrorThread CTaskSwitchWnd::m_HardErrorThread
private

Definition at line 412 of file taskswnd.cpp.

Referenced by OnCopyData().

◆ m_ImageList

HIMAGELIST CTaskSwitchWnd::m_ImageList
private

◆ m_IsDestroying

BOOL CTaskSwitchWnd::m_IsDestroying
private

Definition at line 405 of file taskswnd.cpp.

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

◆ m_IsGroupingEnabled

◆ m_nRudeAppValidationCounter

INT CTaskSwitchWnd::m_nRudeAppValidationCounter
private

Definition at line 407 of file taskswnd.cpp.

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

◆ m_ShellHookMsg

UINT CTaskSwitchWnd::m_ShellHookMsg
private

Definition at line 389 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 411 of file taskswnd.cpp.

Referenced by CTaskSwitchWnd(), and OnCopyData().


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