Author: mjansen Date: Sat Jun 3 15:35:21 2017 New Revision: 74764 URL: http://svn.reactos.org/svn/reactos?rev=74764&view=rev Log: [SHELL32] CMenuDeskBar: Prevent destruction of the start menu when receiving a WM_CLOSE message. CORE-12028
Modified: trunk/reactos/dll/win32/shell32/shellmenu/CMenuDeskBar.cpp trunk/reactos/dll/win32/shell32/shellmenu/CMenuDeskBar.h Modified: trunk/reactos/dll/win32/shell32/shellmenu/CMenuDeskBar.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellmenu/CMenuDeskBar.cpp?rev=74764&r1=74763&r2=74764&view=diff ============================================================================== --- trunk/reactos/dll/win32/shell32/shellmenu/CMenuDeskBar.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shellmenu/CMenuDeskBar.cpp [iso-8859-1] Sat Jun 3 15:35:21 2017 @@ -839,6 +839,12 @@ return 0; } +LRESULT CMenuDeskBar::_OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + /* Prevent the CMenuDeskBar from destroying on being sent a WM_CLOSE */ + return 0; +} + HRESULT CMenuDeskBar::_AdjustForTheme(BOOL bFlatStyle) { DWORD style = bFlatStyle ? WS_BORDER : WS_CLIPCHILDREN|WS_DLGFRAME; Modified: trunk/reactos/dll/win32/shell32/shellmenu/CMenuDeskBar.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellmenu/CMenuDeskBar.h?rev=74764&r1=74763&r2=74764&view=diff ============================================================================== --- trunk/reactos/dll/win32/shell32/shellmenu/CMenuDeskBar.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shellmenu/CMenuDeskBar.h [iso-8859-1] Sat Jun 3 15:35:21 2017 @@ -74,6 +74,7 @@ MESSAGE_HANDLER(WM_MOUSEACTIVATE, _OnMouseActivate) MESSAGE_HANDLER(WM_WININICHANGE , _OnWinIniChange) MESSAGE_HANDLER(WM_NCPAINT, _OnNcPaint) + MESSAGE_HANDLER(WM_CLOSE, _OnClose) END_MSG_MAP() BEGIN_COM_MAP(CMenuDeskBar) @@ -142,6 +143,7 @@ LRESULT _OnAppActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); LRESULT _OnWinIniChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); LRESULT _OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT _OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); HRESULT _AdjustForTheme(BOOL bFlatStyle); BOOL _IsSubMenuParent(HWND hwnd);