https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2c90194ae470d7d758cc2…
commit 2c90194ae470d7d758cc2d7765ff50187ba04d9a
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sat Apr 21 12:48:08 2018 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Apr 22 17:38:38 2018 +0200
[ATL] Add COMMAND_HANDLER macro.
CORE-14543
---
sdk/lib/atl/atlwin.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sdk/lib/atl/atlwin.h b/sdk/lib/atl/atlwin.h
index 02b078ee55..a4f717c7c2 100644
--- a/sdk/lib/atl/atlwin.h
+++ b/sdk/lib/atl/atlwin.h
@@ -1804,6 +1804,15 @@ public:
return TRUE;
\
}
+#define COMMAND_HANDLER(id, code, func)
\
+ if (uMsg == WM_COMMAND && id == LOWORD(wParam) && code ==
HIWORD(wParam)) \
+ {
\
+ bHandled = TRUE;
\
+ lResult = func(HIWORD(wParam), LOWORD(wParam), (HWND)lParam, bHandled);
\
+ if (bHandled)
\
+ return TRUE;
\
+ }
+
#define COMMAND_ID_HANDLER(id, func)
\
if (uMsg == WM_COMMAND && id == LOWORD(wParam))
\
{
\