Index: base/shell/explorer/traywnd.cpp =================================================================== --- base/shell/explorer/traywnd.cpp (revision 74919) +++ base/shell/explorer/traywnd.cpp (working copy) @@ -61,6 +61,8 @@ const GUID IID_IShellDesktopTray = { 0x213e2df9, 0x9a14, 0x4328, { 0x99, 0xb1, 0x69, 0x61, 0xf9, 0x14, 0x3c, 0xe9 } }; +static WNDPROC s_orgWndProc; + class CStartButton : public CWindow { @@ -68,6 +70,20 @@ SIZE m_Size; HFONT m_Font; + static LRESULT CALLBACK StartButtonWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData) + { + switch (uMsg) + { + case WM_LBUTTONDOWN: + ::SendMessageW(::GetParent(hWnd), TWM_OPENSTARTMENU, 0, 0); + return TRUE; + case WM_LBUTTONUP: + return TRUE; + default: + return CallWindowProc(s_orgWndProc, hWnd, uMsg, wParam, lParam); + } + } + public: CStartButton() : m_ImageList(NULL), @@ -127,6 +143,9 @@ { SetWindowTheme(m_hWnd, L"Start", NULL); + s_orgWndProc = (WNDPROC)GetWindowLongPtr(GWLP_WNDPROC); + SetWindowLongPtr(GWLP_WNDPROC, (LONG_PTR)StartButtonWndProc); + m_ImageList = ImageList_LoadImageW(hExplorerInstance, MAKEINTRESOURCEW(IDB_START), 0, 0, 0,