https://git.reactos.org/?p=reactos.git;a=commitdiff;h=deb908b0382bb9eea6a13…
commit deb908b0382bb9eea6a132bf964310644aae8bf3
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Tue Dec 5 20:32:39 2017 +0200
[ATL] -Add COMMAND_CODE_HANDLER macro
---
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 76b1073ed5..fa5301ff63 100644
--- a/sdk/lib/atl/atlwin.h
+++ b/sdk/lib/atl/atlwin.h
@@ -1800,6 +1800,15 @@ public:
return TRUE;
\
}
+#define COMMAND_CODE_HANDLER(code, func)
\
+ if (uMsg == WM_COMMAND && code == HIWORD(wParam))
\
+ {
\
+ bHandled = TRUE;
\
+ lResult = func(HIWORD(wParam), LOWORD(wParam), (HWND)lParam, bHandled);
\
+ if (bHandled)
\
+ return TRUE;
\
+ }
+
#define COMMAND_RANGE_HANDLER(idFirst, idLast, func)
\
if (uMsg == WM_COMMAND && LOWORD(wParam) >= idFirst &&
LOWORD(wParam) <= idLast) \
{
\