https://git.reactos.org/?p=reactos.git;a=commitdiff;h=898fb5f414195931dd1a9…
commit 898fb5f414195931dd1a9fafb0fb1033c128c27a
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Fri Nov 24 10:39:16 2023 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Fri Nov 24 10:39:16 2023 +0900
[MSPAINT] Move CHECKED_IF and ENABLED_IF macros and improve
Refactoring. CORE-19094
---
base/applications/mspaint/precomp.h | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/base/applications/mspaint/precomp.h b/base/applications/mspaint/precomp.h
index b98f40a11e6..f5efb4da77b 100644
--- a/base/applications/mspaint/precomp.h
+++ b/base/applications/mspaint/precomp.h
@@ -51,12 +51,6 @@
#define WM_TOOLSMODELZOOMCHANGED (WM_APP + 2)
#define WM_PALETTEMODELCOLORCHANGED (WM_APP + 3)
-/* this simplifies checking and unchecking menu items */
-#define CHECKED_IF(a) ((a) ? (MF_CHECKED | MF_BYCOMMAND) : (MF_UNCHECKED |
MF_BYCOMMAND))
-
-/* this simplifies enabling or graying menu items */
-#define ENABLED_IF(a) ((a) ? (MF_ENABLED | MF_BYCOMMAND) : (MF_GRAYED | MF_BYCOMMAND))
-
enum HITTEST // hit
{
HIT_NONE = 0, // Nothing hit or outside
@@ -82,6 +76,14 @@ void getBoundaryOfPtStack(RECT& rcBoundary, INT cPoints, const
POINT *pPoints);
#define DEG2RAD(degree) (((degree) * M_PI) / 180)
#define RAD2DEG(radian) ((LONG)(((radian) * 180) / M_PI))
+/* This simplifies checking and unchecking menu items */
+#define CHECKED_IF(bChecked) \
+ ((bChecked) ? (MF_CHECKED | MF_BYCOMMAND) : (MF_UNCHECKED | MF_BYCOMMAND))
+
+/* This simplifies enabling or graying menu items */
+#define ENABLED_IF(bEnabled) \
+ ((bEnabled) ? (MF_ENABLED | MF_BYCOMMAND) : (MF_GRAYED | MF_BYCOMMAND))
+
template <typename T>
inline void Swap(T& a, T& b)
{