10#include <commoncontrols.h>
17#define WM_APP_TRAYDESTROY (WM_APP + 0x100)
19#define TIMER_ID_AUTOHIDE 1
20#define TIMER_ID_MOUSETRACK 2
21#define MOUSETRACK_INTERVAL 100
22#define AUTOHIDE_DELAY_HIDE 2000
23#define AUTOHIDE_DELAY_SHOW 50
24#define AUTOHIDE_INTERVAL_ANIMATING 10
26#define AUTOHIDE_SPEED_SHOW 10
27#define AUTOHIDE_SPEED_HIDE 1
29#define AUTOHIDE_HIDDEN 0
30#define AUTOHIDE_SHOWING 1
31#define AUTOHIDE_SHOWN 2
32#define AUTOHIDE_HIDING 3
35#define IDHK_MINIMIZE_ALL 0x1f5
36#define IDHK_RESTORE_ALL 0x1f6
37#define IDHK_HELP 0x1f7
38#define IDHK_EXPLORE 0x1f8
39#define IDHK_FIND 0x1f9
40#define IDHK_FIND_COMPUTER 0x1fa
41#define IDHK_NEXT_TASK 0x1fb
42#define IDHK_PREV_TASK 0x1fc
43#define IDHK_SYS_PROPERTIES 0x1fd
44#define IDHK_DESKTOP 0x1fe
45#define IDHK_PAGER 0x1ff
137 RECT rcWindow, rcMonitor, rcIntersect;
138 rcMonitor =
info.rcMonitor;
178const GUID IID_IShellDesktopTray = { 0x213e2df9, 0x9a14, 0x4328, { 0x99, 0xb1, 0x69, 0x61, 0xf9, 0x14, 0x3c, 0xe9 } };
229 NONCLIENTMETRICS ncm = {
sizeof(ncm)};
236 ncm.lfCaptionFont.lfWeight =
FW_BOLD;
264 WCHAR szStartCaption[32];
270 wcscpy(szStartCaption,
L"Start");
310 public CWindowImpl < CTrayWindow, CWindow, CControlWinTraits >,
313 public IShellDesktopTray,
429 WCHAR szCommand[256];
430 WCHAR *pszParameters;
440 pszParameters =
wcschr(szCommand,
L'>');
519 CStringW strDefaultDir, strHomePath;
522 strDefaultDir += strHomePath;
535 return This->RunFileDlgThread();
544 if (hRunDlg !=
NULL &&
590 return This->TrayPropertiesThread();
600 if (hTrayProp !=
NULL &&
734 TRACE(
"ITrayWindow::ExecContextMenuCmd(%u): Unhandled Command ID!\n", uiCmd);
931 if (hwndExclude !=
NULL)
978 fuFlags |= (TrackUp ? TPM_VERNEGANIMATION : TPM_VERPOSANIMATION);
1018 TRACE(
"Before Query\n");
1019 hr = contextMenu->QueryContextMenu(popup, 0, 0,
UINT_MAX, CMF_NORMAL);
1022 TRACE(
"Query failed\n");
1027 TRACE(
"Before Tracking\n");
1045 TRACE(
"Before InvokeCommand\n");
1047 cmi.
cbSize =
sizeof(cmi);
1050 hr = contextMenu->InvokeCommand(&cmi);
1054 TRACE(
"TrackPopupMenu failed. Code=%d, LastError=%d\n", uCommand,
GetLastError());
1078 NONCLIENTMETRICS ncm = {
sizeof(ncm)};
1081 ERR(
"SPI_GETNONCLIENTMETRICS failed\n");
1092 ERR(
"CreateFontIndirect failed\n");
1143 pt.x = pRect->left + ((pRect->right - pRect->left) / 2);
1144 pt.y = pRect->top + ((pRect->bottom - pRect->top) / 2);
1159 if (hMonitor !=
NULL)
1173 goto GetPrimaryRect;
1221 IN const SIZE *pTraySize,
1227 pRect->right = pRect->left + pTraySize->cx;
1231 pRect->bottom = pRect->top + pTraySize->cy;
1235 pRect->left = pRect->right - pTraySize->cx;
1240 pRect->top = pRect->bottom - pTraySize->cy;
1250 if (pTraySize ==
NULL)
1282 szWnd.
cx = pRect->right - pRect->left;
1283 szWnd.
cy = pRect->bottom - pRect->top;
1288 MONITOR_DEFAULTTONEAREST);
1294 if (szWnd.
cx > szMax.
cx)
1295 szWnd.
cx = szMax.
cx;
1296 if (szWnd.
cy > szMax.
cy)
1297 szWnd.
cy = szMax.
cy;
1311 GetMinimumWindowSize(
1335 SIZE DeltaPt, ScreenOffset;
1351 goto GetPrimaryScreenRect;
1366GetPrimaryScreenRect:
1367 ScreenOffset.
cx = 0;
1368 ScreenOffset.
cy = 0;
1374 if (
pt.x < rcScreen.
right / 2)
1406 if (hMon != hMonNew)
1439 pt.x = pRect->left + ((pRect->right - pRect->left) / 2);
1440 pt.y = pRect->top + ((pRect->bottom - pRect->top) / 2);
1454 rcTray.
left = pwp->x;
1455 rcTray.
top = pwp->y;
1489 rcTray.
left = pwp->x;
1490 rcTray.
top = pwp->y;
1534 pwp->x = rcTray.
left;
1535 pwp->y = rcTray.
top;
1543 RECT rcClip, rcWindow;
1581 RECT rcTray, rcWorkArea;
1656 SIZE WndSize, EdgeSize, DlgFrameSize;
1696 WndSize.
cx = 2 * (EdgeSize.
cx + DlgFrameSize.
cx);
1697 WndSize.
cy = StartBtnSize.
cy + (2 * (EdgeSize.
cy + DlgFrameSize.
cy));
1701 WndSize.
cx = StartBtnSize.
cx;
1702 WndSize.
cy = StartBtnSize.
cy - EdgeSize.
cy;
1733 SIZE TraySize, StartSize;
1734 POINT ptTrayNotify = { 0, 0 };
1739 if (prcClient !=
NULL)
1741 rcClient = *prcClient;
1765 if (StartSize.
cx > rcClient.
right)
1766 StartSize.
cx = rcClient.
right;
1769 if (hwndTaskToolbar)
1789 ERR(
"DeferWindowPos for start button failed. lastErr=%d\n",
GetLastError());
1814 ptTrayNotify.
x = rcClient.
right - TraySize.
cx;
1816 ptTrayNotify.
y = rcClient.
bottom - TraySize.
cy;
1828 ERR(
"DeferWindowPos for notification area failed. lastErr=%d\n",
GetLastError());
1836 POINT ptRebar = { 0, 0 };
1844 szRebar.
cx = ptTrayNotify.
x - ptRebar.
x;
1851 szRebar.
cy = ptTrayNotify.
y - ptRebar.
y;
1877 RECT rebarRect, taskbarRect, clientRect;
1894 pRect->
bottom = pRect->
top + rebarRect.bottom - rebarRect.top +
margins.cy;
1897 rebarRect.top = rebarRect.bottom - (pRect->
bottom - pRect->
top -
margins.cy);
1899 pRect->
top = pRect->
bottom - (rebarRect.bottom - rebarRect.top +
margins.cy);
1902 rebarRect.right = rebarRect.left + (pRect->
right - pRect->
left -
margins.cx);
1904 pRect->
right = pRect->
left + (rebarRect.right - rebarRect.left +
margins.cx);
1907 rebarRect.left = rebarRect.right - (pRect->
right - pRect->
left -
margins.cx);
1909 pRect->
left = pRect->
right - (rebarRect.right - rebarRect.left +
margins.cx);
1930 pt.y = rcExclude.
top;
1940 pt.y = rcExclude.
top;
1945 pt.y = rcExclude.
top;
1974 TRACE(
"AutoHide cancelling hide.\n");
1980 TRACE(
"AutoHide starting show.\n");
1989 TRACE(
"AutoHide cancelling show.\n");
1995 TRACE(
"AutoHide starting hide.\n");
2268 RECT rcGripper = {0};
2359 ((ITrayWindow*)
this)->
AddRef();
2423 static const UINT winkeys[] =
2484 if (
wParam == SPI_SETNONCLIENTMETRICS)
2507 FIXME(
"Use UpdateStartMenu\n");
2551 switch (pCopyData->
dwData)
2639 if (
pt.x < rcClient.
left)
2644 if (
pt.y < rcClient.
top)
2712 rcClient.
left = rcClient.
top = 0;
2757 static const UINT uidDisableItem [] = {
2771 if (hSysMenu !=
NULL)
2812 if (!ppt || !prcStartBtn || !pwi)
2820 if (ppt->
x > prcStartBtn->
right || ppt->
y > prcStartBtn->
bottom)
2826 if (ppt->
x < prcStartBtn->
left || ppt->
y > prcStartBtn->
bottom)
2830 ppt->
x > prcStartBtn->
right)
2838 if (ppt->
x > prcStartBtn->
right || ppt->
y < prcStartBtn->
top)
2855 if (!ppt || !prcShowDesktopBtn)
2862 return !(ppt->
x > prcShowDesktopBtn->
right || ppt->
y < prcShowDesktopBtn->
top);
2864 return !(ppt->
x < prcShowDesktopBtn->
left || ppt->
y > prcShowDesktopBtn->
bottom);
2866 return !(ppt->
x < prcShowDesktopBtn->
left || ppt->
y < prcShowDesktopBtn->
top);
2868 return !(ppt->
x < prcShowDesktopBtn->
left || ppt->
y < prcShowDesktopBtn->
top);
2924 if (
pt.x != -1 ||
pt.y != -1)
2946 POINT ptClient = *ppt;
2952 if (hWndAtPt !=
NULL &&
2961 goto HandleTrayContextMenu;
2967 goto HandleTrayContextMenu;
2971HandleTrayContextMenu:
3121 return wcscmp(szClass,
L"#32770") == 0;
3130 if (!
info->bShowDesktop)
3145 info->pMinimizedAll->Add(mwp);
3159 info.bShowDesktop = bShowDesktop;
3258 rc = &prms->
rgrc[0];
3353 szWindow.
cx - szTarget.
cx,
3354 szWindow.
cy - szTarget.
cx,
3360 szWindow.
cx = szActual.
cx + borders.
cx;
3363 szWindow.
cy = szActual.
cy + borders.
cy;
3366 szWindow.
cx = szActual.
cx + borders.
cx;
3370 szWindow.
cy = szActual.
cy + borders.
cy;
3509 if (!Ret || Ret == -1)
3535 TRACE(
"IShellDesktopTray::GetState() unimplemented!\n");
3542 TRACE(
"IShellDesktopTray::GetTrayWindow(0x%p)\n", phWndTray);
3550 TRACE(
"IShellDesktopTray::RegisterDesktopWindow(0x%p)\n", hWndDesktop);
3559 TRACE(
"IShellDesktopTray::Unknown(%u,%u) unimplemented!\n", dwUnknown1, dwUnknown2);
3655 this->m_idCmdCmFirst = 0;
3711 WARN(
"AddContextMenus failed.\n");
3732 cmici.
cbSize =
sizeof(cmici);
3737 pcm->InvokeCommand(&cmici);
3742 TrayWnd->ExecContextMenuCmd(uiCmdId);
3790 *ppTray = (ITrayWindow *) Tray;
std::map< E_MODULE, HMODULE > mod
VOID DisplayTrayProperties(IN HWND hwndOwner, IN HWND hwndTaskbar)
#define TWM_OPENSTARTMENU
HRESULT UpdateStartMenu(IN OUT IMenuPopup *pMenuPopup, IN HBITMAP hbmBanner OPTIONAL, IN BOOL bSmallIcons, IN BOOL bRefresh)
#define TSWM_UPDATETASKBARPOS
#define TNWM_GETMINIMUMSIZE
HRESULT CStartMenuBtnCtxMenu_CreateInstance(ITrayWindow *TrayWnd, IN HWND hWndOwner, IContextMenu **ppCtxMenu)
HMENU LoadPopupMenu(IN HINSTANCE hInstance, IN LPCWSTR lpMenuName)
#define TWM_GETTASKSWITCH
IMenuPopup * CreateStartMenu(IN ITrayWindow *Tray, OUT IMenuBand **ppMenuBand, IN HBITMAP hbmBanner OPTIONAL, IN BOOL bSmallIcons)
TaskbarSettings g_TaskbarSettings
HRESULT CTrayNotifyWnd_CreateInstance(HWND hwndParent, REFIID riid, void **ppv)
HRESULT CTrayBandSite_CreateInstance(IN ITrayWindow *tray, IN IDeskBand *pTaskBand, OUT ITrayBandSite **pBandSite)
#define TWM_SETTINGSCHANGED
#define TNWM_GETSHOWDESKTOPBUTTON
static LONG SetWindowStyle(IN HWND hWnd, IN LONG dwStyleMask, IN LONG dwStyle)
HRESULT InitShellServices(HDPA *phdpa)
HRESULT CTaskBand_CreateInstance(IN ITrayWindow *Tray, HWND hWndStartButton, REFIID riid, void **ppv)
HRESULT ShutdownShellServices(HDPA hdpa)
#define ID_SHELL_CMD_OPEN_TASKMGR
#define ID_SHELL_CMD_CUST_NOTIF
#define ID_SHELL_CMD_UNDO_ACTION
#define ID_SHELL_CMD_PROPERTIES
#define ID_SHELL_CMD_TILE_WND_H
#define IDS_TRAYWND_UNDO_TILE
#define ID_SHELL_CMD_CASCADE_WND
#define ID_SHELL_CMD_RESTORE_ALL
#define ID_SHELL_CMD_TILE_WND_V
#define ID_SHELL_CMD_SHOW_DESKTOP
#define IDS_TRAYWND_UNDO_CASCADE
#define ID_SHELL_CMD_EXPLORE_ALL_USERS
#define ID_SHELL_CMD_ADJUST_DAT
#define ID_SHELL_CMD_OPEN_ALL_USERS
#define STDMETHODCALLTYPE
CONFIGRET WINAPI CM_Request_Eject_PC(VOID)
BOOL GetEnvironmentVariable(_In_z_ PCXSTR pszVar)
HWND GetLastActivePopup() const
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
HDWP DeferWindowPos(HDWP hWinPosInfo, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags)
BOOL GetWindowRect(LPRECT lpRect) const
CWindow GetParent() const
BOOL IsWindowVisible() const
BOOL IsWindowEnabled() const
BOOL PostMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
void OnAppBarActivationChange2(_In_ HWND hwndNewAutoHide, _In_ UINT uSide)
void OnAppBarNotifyAll(_In_opt_ HMONITOR hMon, _In_opt_ HWND hwndIgnore, _In_ DWORD dwNotify, _In_opt_ LPARAM lParam)
void RecomputeAllWorkareas()
LRESULT OnAppBarMessage(_Inout_ PCOPYDATASTRUCT pCopyData)
LRESULT OnHotkey(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnEnterSizeMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
VOID OpenTaskManager(IN HWND hWndOwner)
LRESULT OnSettingChanged(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnSysColorChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
BOOL IsHidingState() const override
void SetAutoHideState(_In_ BOOL bAutoHide) override
LRESULT OnExitSizeMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnSetZOrder(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnThemeChanged(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnTaskbarSettingsChanged(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
DWORD GetDraggingRectFromPt(IN POINT pt, OUT RECT *pRect, OUT HMONITOR *phMonitor)
LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
CStartButton m_StartButton
LRESULT OnDoExitWindows(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
HWND STDMETHODCALLTYPE GetHWND()
HMONITOR & GetPreviousMonitor() override
void FitToRebar(PRECT pRect)
LRESULT HandleCommand(UINT uCommand)
LRESULT OnCtlColorBtn(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
CComPtr< ITrayBandSite > m_TrayBandSite
VOID ShowFolder(INT csidl, BOOL bExplore)
int DrawSizerWithTheme(IN HRGN hRgn)
HMONITOR GetScreenRectFromRect(IN OUT RECT *pRect, IN DWORD dwFlags)
const RECT * GetTrayRect() override
BOOL STDMETHODCALLTYPE IsHorizontal()
TRACKMOUSEEVENT m_MouseTrackingInfo
CComPtr< IDeskBand > m_TaskBand
HMONITOR m_PreviousMonitor
LRESULT OnInitMenuPopup(INT code, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
DWORD WINAPI TrayPropertiesThread()
LRESULT OnNcCalcSize(INT code, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
HMONITOR GetScreenRect(IN HMONITOR hMonitor, IN OUT RECT *pRect)
LRESULT OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
static DWORD WINAPI s_RunFileDlgThread(IN OUT PVOID pParam)
LRESULT OnNcRButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
VOID TrayProcessMessages()
HMONITOR m_DraggingMonitor
HRESULT STDMETHODCALLTYPE GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax)
LRESULT OnEndSession(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
BOOL STDMETHODCALLTYPE IsTaskWnd(HWND hWnd)
BOOL IsPointWithinShowDesktopButton(LPPOINT ppt, LPRECT prcShowDesktopBtn, PWINDOWINFO pwi)
LRESULT EraseBackgroundWithTheme(HDC hdc)
CComPtr< IMenuPopup > m_StartMenuPopup
HWND STDMETHODCALLTYPE DisplayProperties()
VOID AdjustSizerRect(RECT *rc, DWORD pos)
STDMETHODIMP GetTrayWindow(OUT HWND *phWndTray) override
HMONITOR CalculateValidSize(IN DWORD Position, IN OUT RECT *pRect)
void ProcessMouseTracking()
INT GetPosition() const override
LRESULT OnNcLButtonDblClick(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnNcLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
BOOL STDMETHODCALLTYPE Lock(IN BOOL bLock)
VOID ApplyClipping(IN BOOL Clip)
void RefreshStartMenuSettings()
LRESULT OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
static BOOL CALLBACK MinimizeWindowsProc(HWND hwnd, LPARAM lParam)
void UpdateAlwaysOnTop(_In_ BOOL bAlwaysOnTop) override
BOOL IsAutoHideState() const override
HRESULT STDMETHODCALLTYPE Open()
LRESULT OnGetTaskSwitch(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnSysChar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
HRESULT ExecResourceCmd(int id)
static DWORD WINAPI s_TrayPropertiesThread(IN OUT PVOID pParam)
VOID OpenCommonStartMenuDirectory(IN HWND hWndOwner, IN LPCTSTR lpOperation)
static BOOL IsDialog(HWND hwnd)
HRESULT STDMETHODCALLTYPE Close()
VOID CheckTrayWndPosition()
LRESULT OnNcLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
CComPtr< IUnknown > m_TrayNotifyInstance
LRESULT OnMoving(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnSetFocus(INT code, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnGetMinMaxInfo(INT code, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT HandleHotKey(DWORD id)
STDMETHODIMP RegisterDesktopWindow(IN HWND hWndDesktop) override
HMONITOR & GetMonitor() override
LRESULT OnSizing(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
CTrayShowDesktopButton * m_pShowDesktopButton
VOID AlignControls(IN PRECT prcClient OPTIONAL)
LRESULT OnOpenStartMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
static DWORD CALLBACK EjectThreadProc(LPVOID arg)
HWND m_TrayPropertiesOwner
void DrawShowDesktopButton()
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnAppTrayDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
VOID MakeTrayRectWithSize(IN DWORD Position, IN const SIZE *pTraySize, IN OUT RECT *pRect)
HRESULT STDMETHODCALLTYPE InvokeCommand(LPCMINVOKECOMMANDINFO lpici)
STDMETHODIMP Unknown(IN DWORD dwUnknown1, IN DWORD dwUnknown2) override
STDMETHODIMP ContextSensitiveHelp(BOOL fEnterMode) override
LRESULT OnActivate(INT code, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
BOOL IsAlwaysOnTop() const override
HWND GetTrayWnd() const override
DWORD GetDraggingRectFromRect(IN OUT RECT *pRect, OUT HMONITOR *phMonitor)
BOOL STDMETHODCALLTYPE IsSpecialHWND(IN HWND hWnd)
HWND GetDesktopWnd() const override
LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
VOID MinimizeAll(BOOL bShowDesktop=FALSE)
STDMETHODIMP GetWindow(HWND *phwnd) override
VOID GetTrayRectFromScreenRect(IN DWORD Position, IN const RECT *pScreen, IN const SIZE *pTraySize OPTIONAL, OUT RECT *pRect)
LRESULT OnLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
virtual HRESULT RaiseStartButton()
HMONITOR GetMonitorFromRect(IN const RECT *pRect)
LRESULT OnNcActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
UINT TrackMenu(IN HMENU hMenu, IN POINT *ppt OPTIONAL, IN HWND hwndExclude OPTIONAL, IN BOOL TrackUp, IN BOOL IsContextMenu)
DWORD WINAPI RunFileDlgThread()
LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
HRESULT TrackCtxMenu(IN IContextMenu *contextMenu, IN POINT *ppt OPTIONAL, IN HWND hwndExclude OPTIONAL, IN BOOL TrackUp, IN PVOID Context OPTIONAL)
LRESULT OnDisplayChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnWindowPosChanging(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
BOOL IsPointWithinStartButton(LPPOINT ppt, LPRECT prcStartBtn, PWINDOWINFO pwi)
CComPtr< IMenuBand > m_StartMenuBand
VOID ChangingWinPos(IN OUT LPWINDOWPOS pwp)
CComPtr< IContextMenu > m_ContextMenu
HRESULT STDMETHODCALLTYPE QueryContextMenu(HMENU hPopup, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
LRESULT OnRebarAutoSize(INT code, LPNMHDR nmhdr, BOOL &bHandled)
STDMETHODIMP NotifyFullScreenToAppBars(HMONITOR hMonitor, BOOL bFullOpening) override
BOOL STDMETHODCALLTYPE ExecContextMenuCmd(IN UINT uiCmd)
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
DWORD WINAPI SHGetValueW(HKEY hkey, const WCHAR *subkey, const WCHAR *value, DWORD *type, void *data, DWORD *data_len)
BOOL WINAPI SHCreateThread(LPTHREAD_START_ROUTINE thread_proc, void *data, DWORD flags, LPTHREAD_START_ROUTINE callback)
EXTERN_C int WINAPI LogoffWindowsDialog(HWND hWndOwner)
void WINAPI ExitWindowsDialog(HWND hWndOwner)
void WINAPI RunFileDlg(HWND hWndOwner, HICON hIcon, LPCWSTR lpstrDirectory, LPCWSTR lpstrTitle, LPCWSTR lpstrDescription, UINT uFlags)
EXTERN_C BOOL WINAPI SHFindComputer(LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSavedSearch)
HRESULT WINAPI IUnknown_UIActivateIO(IUnknown *unknown, BOOL activate, LPMSG msg)
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
#define FAILED_UNEXPECTEDLY
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
HRESULT WINAPI GetThemePartSize(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, RECT *prc, THEMESIZE eSize, SIZE *psz)
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR pszClassList)
HINSTANCE hExplorerInstance
GLenum const GLfloat * params
GLubyte GLubyte GLubyte GLubyte w
GLfloat GLfloat GLfloat GLfloat h
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
#define COM_INTERFACE_ENTRY_IID(iid, x)
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
#define DECLARE_NOT_AGGREGATABLE(x)
#define MESSAGE_HANDLER(msg, func)
#define NOTIFY_CODE_HANDLER(cd, func)
#define BEGIN_MSG_MAP(theClass)
#define DECLARE_WND_CLASS_EX(WndClassName, style, bkgnd)
static VOID SetFont(PMAP infoPtr, LPWSTR lpFontName)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
unsigned __int3264 UINT_PTR
HMONITOR WINAPI MonitorFromPoint(POINT, DWORD)
HMONITOR WINAPI MonitorFromRect(LPCRECT, DWORD)
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
VOID ShowCustomizeNotifyIcons(HINSTANCE hInst, HWND hExplorer)
#define UNREFERENCED_PARAMETER(P)
const GUID IID_IOleWindow
LPITEMIDLIST WINAPI SHCloneSpecialIDList(HWND hwndOwner, int nFolder, BOOL fCreate)
void WINAPI ILFree(LPITEMIDLIST pidl)
#define BUTTON_IMAGELIST_ALIGN_LEFT
struct tagNMRBAUTOSIZE * LPNMRBAUTOSIZE
#define REGSTR_PATH_EXPLORER
#define RFF_CALCDIRECTORY
#define ABN_FULLSCREENAPP
#define SEE_MASK_INVOKEIDLIST
#define ABN_WINDOWARRANGE
BOOL WINAPI SHFindFiles(PCIDLIST_ABSOLUTE pidlFolder, PCIDLIST_ABSOLUTE pidlSaveFile)
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
#define SHGetSpecialFolderPath
#define CSIDL_COMMON_STARTMENU
#define MM_SUBMENUSHAVEIDS
@ REST_CLEARRECENTDOCSONEXIT
#define FCIDM_SHBROWSER_FINDCOMPUTER
#define FCIDM_SHBROWSER_REFRESH
#define FCIDM_SHBROWSER_FINDFILES
#define FCIDM_CABINET_REFRESH
DWORD WINAPI SHRestricted(RESTRICTIONS rest)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
PULONG MinorVersion OPTIONAL
CSimpleArray< MINWNDPOS > * pMinimizedAll
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
#define AUTOHIDE_DELAY_HIDE
const GUID IID_IShellDesktopTray
static BOOL CALLBACK BackupWindowsPosProc(HWND hwnd, LPARAM lParam)
CSimpleArray< WINDOWPOSBACKUPDATA > g_WindowPosBackup
VOID TrayProcessMessages(ITrayWindow *Tray)
#define AUTOHIDE_SPEED_HIDE
#define WM_APP_TRAYDESTROY
CSimpleArray< MINWNDPOS > g_MinimizedAll
VOID TrayMessageLoop(ITrayWindow *Tray)
#define AUTOHIDE_SPEED_SHOW
HRESULT Tray_OnStartMenuDismissed(ITrayWindow *Tray)
HRESULT CreateTrayWindow(ITrayWindow **ppTray)
BOOL CanBeMinimized(HWND hwnd)
static BOOL IsThereAnyEffectiveWindow(BOOL bMustBeInMonitor)
#define IDHK_MINIMIZE_ALL
#define IDHK_SYS_PROPERTIES
#define TIMER_ID_AUTOHIDE
static BOOL CALLBACK FindEffectiveProc(HWND hwnd, LPARAM lParam)
#define AUTOHIDE_INTERVAL_ANIMATING
#define TIMER_ID_MOUSETRACK
#define IDHK_FIND_COMPUTER
#define AUTOHIDE_DELAY_SHOW
#define MOUSETRACK_INTERVAL
HRESULT TrayWindowCtxMenuCreator(ITrayWindow *TrayWnd, IN HWND hWndOwner, IContextMenu **ppCtxMenu)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define TRAYCMD_CONTROL_PANEL
#define TRAYCMD_STARTMENU
#define TRAYCMD_LOCK_DESKTOP
#define TRAYCMD_REFRESH_MENU
#define TRAYCMD_DATE_AND_TIME
#define TRAYCMD_SEARCH_COMPUTERS
#define TRAYCMD_TASKBAR_PROPERTIES
#define TRAYCMD_SHOW_DESKTOP
#define TWM_DOEXITWINDOWS
#define TRAYCMD_LOCK_TASKBAR
#define TRAYCMD_SEARCH_FILES
#define TRAYCMD_CUSTOMIZE_TASKBAR
#define TRAYCMD_TOGGLE_DESKTOP
#define WM_PROGMAN_SAVESTATE
#define TRAYCMD_RUN_DIALOG
#define TABDMC_LOADINPROC
#define TRAYCMD_LOGOFF_DIALOG
#define TRAYCMD_SHOW_TASK_MGR
#define TRAYCMD_RESTORE_ALL
#define TRAYCMD_SHUTDOWN_DIALOG
#define TRAYCMD_PRINTERS_AND_FAXES
#define TRAYCMD_RELOAD_STARTMENUCFG
#define TRAYCMD_MINIMIZE_ALL
#define TRAYCMD_SWITCH_USER_DIALOG
#define TRAYCMD_HELP_AND_SUPPORT
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
BOOL WINAPI IsHungAppWindow(HWND hwnd)
DWORD WINAPI GetLastError(void)
#define SubclassWindow(hwnd, lpfn)
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
HRGN WINAPI CreateRectRgnIndirect(_In_ LPCRECT)
#define CreateFontIndirect
#define HKEY_CURRENT_USER
HWND WINAPI ChildWindowFromPoint(_In_ HWND, _In_ POINT)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HMENU WINAPI CreatePopupMenu(void)
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
#define GetWindowLongPtrW
#define LR_LOADTRANSPARENT
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define WM_WINDOWPOSCHANGING
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI GetWindowInfo(_In_ HWND, _Inout_ PWINDOWINFO)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
struct tagWINDOWINFO WINDOWINFO
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
WORD WINAPI CascadeWindows(_In_opt_ HWND hwndParent, _In_ UINT wHow, _In_opt_ CONST RECT *lpRect, _In_ UINT cKids, _In_reads_opt_(cKids) const HWND FAR *lpKids)
int WINAPI SetWindowRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)
#define LR_CREATEDIBSECTION
struct tagCOPYDATASTRUCT * PCOPYDATASTRUCT
BOOL WINAPI SetForegroundWindow(_In_ HWND)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
BOOL WINAPI AdjustWindowRectEx(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL, _In_ DWORD)
BOOL WINAPI SetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
HMENU WINAPI GetSystemMenu(_In_ HWND, _In_ BOOL)
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define WM_SYSCOLORCHANGE
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
HWND WINAPI ChildWindowFromPointEx(_In_ HWND, _In_ POINT, _In_ UINT)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define WM_NCLBUTTONDBLCLK
BOOL WINAPI IsIconic(_In_ HWND)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI ShowWindowAsync(_In_ HWND, _In_ int)
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
WORD WINAPI TileWindows(_In_opt_ HWND hwndParent, _In_ UINT wHow, _In_opt_ CONST RECT *lpRect, _In_ UINT cKids, _In_reads_opt_(cKids) const HWND FAR *lpKids)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI RegisterHotKey(_In_opt_ HWND, _In_ int, _In_ UINT, _In_ UINT)
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
struct tagMINMAXINFO * PMINMAXINFO
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
BOOL WINAPI IsWindowEnabled(_In_ HWND)
#define MAKEINTRESOURCEA(i)
#define CWP_SKIPINVISIBLE
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
int WINAPI GetClassNameW(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPWSTR lpClassName, _In_ int nMaxCount)
#define MDITILE_SKIPDISABLED
#define SWP_NOOWNERZORDER
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define MDITILE_HORIZONTAL
SHORT WINAPI GetAsyncKeyState(_In_ int)
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
HWND WINAPI FindWindowW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
#define MAKEINTRESOURCEW(i)
HBITMAP WINAPI LoadBitmapW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define RDW_INTERNALPAINT
BOOL WINAPI SetWindowPlacement(_In_ HWND hWnd, _In_ const WINDOWPLACEMENT *)
#define SWP_NOSENDCHANGING
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
int WINAPI GetSystemMetrics(_In_ int)
#define SW_SHOWMINNOACTIVE
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
SHORT WINAPI GetKeyState(_In_ int)
HDWP WINAPI BeginDeferWindowPos(_In_ int)
_Must_inspect_result_ _In_ ULONG Flags
#define IID_PPV_ARG(Itype, ppType)