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/csys…
==============================================================================
--- 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);
+}
Author: cwittich
Date: Tue May 19 19:58:11 2015
New Revision: 67830
URL: http://svn.reactos.org/svn/reactos?rev=67830&view=rev
Log:
[stobject]
do not handle WM_NCCREATE in ProcessWindowMessage
otherwise it get passed to ProcessIconMessage which will flag it as handled in case g_NumIcons is 0
which then will result in ATL not calling DefWndProc anymore
CORE-9592
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/csys…
==============================================================================
--- trunk/reactos/dll/shellext/stobject/csystray.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/shellext/stobject/csystray.cpp [iso-8859-1] Tue May 19 19:58:11 2015
@@ -206,6 +206,8 @@
switch (uMsg)
{
+ case WM_NCCREATE:
+ return FALSE;
case WM_CREATE:
InitIcons();
SetTimer(1, 2000, NULL);