Author: dquintana Date: Tue May 19 20:31:31 2015 New Revision: 67831
URL: http://svn.reactos.org/svn/reactos?rev=67831&view=rev Log: [STOBJECT] Followup to r67830: When no one handles a message, properly return that it was not handled. This way all messages are handled correctly and not just NCCREATE. Also took the chance to short-cut NCDESTROY, since the icon handlers have no need to receive this message. CORE-9592 #resolve
Modified: trunk/reactos/dll/shellext/stobject/csystray.cpp
Modified: trunk/reactos/dll/shellext/stobject/csystray.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/stobject/csyst... ============================================================================== --- trunk/reactos/dll/shellext/stobject/csystray.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/stobject/csystray.cpp [iso-8859-1] Tue May 19 20:31:31 2015 @@ -87,11 +87,12 @@ if (FAILED(hr)) return hr;
- if (hr != S_FALSE) - return hr; - } - - return S_OK; + if (hr == S_OK) + return hr; + } + + // Not handled by anyone, so return accordingly. + return S_FALSE; }
HRESULT CSysTray::NotifyIcon(INT code, UINT uId, HICON hIcon, LPCWSTR szTip) @@ -207,6 +208,7 @@ switch (uMsg) { case WM_NCCREATE: + case WM_NCDESTROY: return FALSE; case WM_CREATE: InitIcons(); @@ -227,8 +229,5 @@ if (FAILED(hr)) return FALSE;
- if (hr == S_FALSE) - return FALSE; - - return TRUE; -} + return (hr == S_OK); +}