|
3 | 3 |
|
4 | 4 | #pragma once |
5 | 5 |
|
6 | | -// Feature flags (bitmask values) |
7 | | -#define AlwaysOnTop (1 << 2) |
8 | | -#define UpperCaseHex (1 << 3) |
9 | | -#define OmitPound (1 << 4) |
10 | | -#define SnaptoWebsafe (1 << 5) |
11 | | -#define AutoCopytoClip (1 << 6) |
12 | | -#define MimimizetoTray (1 << 7) |
13 | | -#define EasyMove (1 << 8) |
14 | | -#define MinimizeonStart (1 << 9) |
15 | | -#define ExpandedDialog (1 << 10) |
16 | | -#define ModeHTML (1 << 11) |
17 | | -#define ModeDelphi (1 << 12) |
18 | | -#define ModePowerBuilder (1 << 13) |
19 | | -#define ModeVisualBasic (1 << 14) |
20 | | -#define ModeVisualC (1 << 15) |
21 | | -#define Sampling1 (1 << 16) |
22 | | -#define Sampling3x3 (1 << 17) |
23 | | -#define Sampling5x5 (1 << 18) |
24 | | -#define MultipleInstances (1 << 19) |
25 | | -#define DetectWebsafeColors (1 << 20) |
26 | | -#define RGBINT (1 << 21) |
27 | | -#define RGBFLOAT (1 << 22) |
28 | | -#define MAGWHILEEYEDROP (1 << 23) |
29 | | -#define USECROSSHAIR (1 << 24) |
30 | | -#define SETCURSORONEYEDROP (1 << 25) |
31 | | -#define MULTIPIXELSAMPLE (1 << 26) |
32 | | -#define SamplingMULTI (1 << 27) |
33 | | -#define SpaceRGB (1 << 28) |
34 | | -#define SpaceCMYK (1 << 29) |
35 | | -#define ModeClarion (1 << 30) |
36 | | - |
37 | | -#define MULTIPIX_MIN 1 |
38 | | -#define MULTIPIX_MAX 15 |
39 | | - |
40 | | -#define PI (3.1415926535897932384626433832795) |
41 | | - |
42 | | -// MFC includes |
43 | | -#include <afxwin.h> |
44 | | -#include <afxext.h> |
| 6 | +//------------------------------------------------------------------------------ |
| 7 | +// Platform / Windows configuration |
| 8 | +//------------------------------------------------------------------------------ |
| 9 | + |
| 10 | +#define NOMINMAX // Prevent Windows macros from breaking std::min/std::max |
| 11 | +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used Windows headers |
| 12 | + |
| 13 | +//------------------------------------------------------------------------------ |
| 14 | +// Standard library |
| 15 | +//------------------------------------------------------------------------------ |
| 16 | + |
| 17 | +#include <cstdint> |
| 18 | +#include <cmath> |
| 19 | + |
| 20 | +//------------------------------------------------------------------------------ |
| 21 | +// Application feature flags (bitmask) |
| 22 | +//------------------------------------------------------------------------------ |
| 23 | +// |
| 24 | +// NOTE: |
| 25 | +// These are intentionally kept as macros for minimal churn. |
| 26 | +// A future modernization step would be a strongly-typed enum class. |
| 27 | +// |
| 28 | + |
| 29 | +#define AlwaysOnTop (1u << 2) |
| 30 | +#define UpperCaseHex (1u << 3) |
| 31 | +#define OmitPound (1u << 4) |
| 32 | +#define SnaptoWebsafe (1u << 5) |
| 33 | +#define AutoCopytoClip (1u << 6) |
| 34 | +#define MimimizetoTray (1u << 7) |
| 35 | +#define EasyMove (1u << 8) |
| 36 | +#define MinimizeonStart (1u << 9) |
| 37 | +#define ExpandedDialog (1u << 10) |
| 38 | +#define ModeHTML (1u << 11) |
| 39 | +#define ModeDelphi (1u << 12) |
| 40 | +#define ModePowerBuilder (1u << 13) |
| 41 | +#define ModeVisualBasic (1u << 14) |
| 42 | +#define ModeVisualC (1u << 15) |
| 43 | +#define Sampling1 (1u << 16) |
| 44 | +#define Sampling3x3 (1u << 17) |
| 45 | +#define Sampling5x5 (1u << 18) |
| 46 | +#define MultipleInstances (1u << 19) |
| 47 | +#define DetectWebsafeColors (1u << 20) |
| 48 | +#define RGBINT (1u << 21) |
| 49 | +#define RGBFLOAT (1u << 22) |
| 50 | +#define MAGWHILEEYEDROP (1u << 23) |
| 51 | +#define USECROSSHAIR (1u << 24) |
| 52 | +#define SETCURSORONEYEDROP (1u << 25) |
| 53 | +#define MULTIPIXELSAMPLE (1u << 26) |
| 54 | +#define SamplingMULTI (1u << 27) |
| 55 | +#define SpaceRGB (1u << 28) |
| 56 | +#define SpaceCMYK (1u << 29) |
| 57 | +#define ModeClarion (1u << 30) |
| 58 | + |
| 59 | +//------------------------------------------------------------------------------ |
| 60 | +// Constants |
| 61 | +//------------------------------------------------------------------------------ |
| 62 | + |
| 63 | +constexpr int MULTIPIX_MIN = 1; |
| 64 | +constexpr int MULTIPIX_MAX = 15; |
| 65 | + |
| 66 | +// Prefer constexpr over macros for typed constants |
| 67 | +constexpr double kPi = 3.14159265358979323846; |
| 68 | + |
| 69 | +//------------------------------------------------------------------------------ |
| 70 | +// MFC headers |
| 71 | +//------------------------------------------------------------------------------ |
| 72 | + |
| 73 | +#include <afxwin.h> // Core MFC components |
| 74 | +#include <afxext.h> // Extensions (controls, OLE) |
45 | 75 | #ifndef _AFX_NO_AFXCMN_SUPPORT |
46 | | -#include <afxcmn.h> |
| 76 | +#include <afxcmn.h> // Common controls |
47 | 77 | #endif |
48 | 78 |
|
49 | 79 | //{{AFX_INSERT_LOCATION}} // NOLINT(whitespace/comments) |
0 commit comments