Repository: AvaloniaUI/Avalonia
File: src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs (C#)

Code before:
            GCLP_MENUNAME = -8,
            GCLP_HBRBACKGROUND = -10,
            GCLP_HCURSOR = -12,
            GCLP_HICON = -14,
            GCLP_HMODULE = -16,
            GCL_CBWNDEXTRA = -18,
            GCL_CBCLSEXTRA = -20,
            GCLP_WNDPROC = -24,
            GCL_STYLE = -26,
            GCLP_HICONSM = -34,
            GCW_ATOM = -32
        }

        [DllImport("shell32", CharSet = CharSet.Auto)]
        public static extern int Shell_NotifyIcon(NIM dwMessage, NOTIFYICONDATA lpData);

        [DllImport("user32.dll", SetLastError = true)]
        public static extern bool ChangeWindowMessageFilterEx(
            IntPtr hWnd,
            uint message,
            MessageFilterFlag action,
            IntPtr pChangeFilterStruct
        );
        public enum MessageFilterFlag
        {
            MSGFLT_ADD = 1,
            MSGFLT_REMOVE = 2,
        }

        [DllImport("shell32", CharSet = CharSet.Auto)]
        public static extern nint SHAppBarMessage(AppBarMessage dwMessage, ref APPBARDATA lpData);

        [DllImport("user32.dll", EntryPoint = "SetClassLongPtrW", ExactSpelling = true)]
        private static extern IntPtr SetClassLong64(IntPtr hWnd, ClassLongIndex nIndex, IntPtr dwNewLong);

        [DllImport("user32.dll", EntryPoint = "SetClassLongW", ExactSpelling = true)]
        private static extern IntPtr SetClassLong32(IntPtr hWnd, ClassLongIndex nIndex, IntPtr dwNewLong);

        public static IntPtr SetClassLong(IntPtr hWnd, ClassLongIndex nIndex, IntPtr dwNewLong)
        {
            if (IntPtr.Size == 4)
            {
                return SetClassLong32(hWnd, nIndex, dwNewLong);
            }

            return SetClassLong64(hWnd, nIndex, dwNewLong);
        }

        public static IntPtr GetClassLongPtr(IntPtr hWnd, int nIndex)
        {
            if (IntPtr.Size > 4)

Review comment (suggestion):
Change the enum to `MSGFLT_RESET/MSGFLT_ALLOW/MSGFLT_DISALLOW`, matching the documentation of `ChangeWindowMessageFilterEx`.

Code after:
            GCLP_MENUNAME = -8,
            GCLP_HBRBACKGROUND = -10,
            GCLP_HCURSOR = -12,
            GCLP_HICON = -14,
            GCLP_HMODULE = -16,
            GCL_CBWNDEXTRA = -18,
            GCL_CBCLSEXTRA = -20,
            GCLP_WNDPROC = -24,
            GCL_STYLE = -26,
            GCLP_HICONSM = -34,
            GCW_ATOM = -32
        }

        [DllImport("shell32", CharSet = CharSet.Auto)]
        public static extern int Shell_NotifyIcon(NIM dwMessage, NOTIFYICONDATA lpData);

        [DllImport("user32.dll", SetLastError = true)]
        public static extern bool ChangeWindowMessageFilterEx(
            IntPtr hWnd,
            uint message,
            MessageFilterFlag action,
            IntPtr pChangeFilterStruct
        );

        public enum MessageFilterFlag
        {
            MSGFLT_RESET = 0,
            MSGFLT_ALLOW = 1,
            MSGFLT_DISALLOW = 2,
        }

        [DllImport("shell32", CharSet = CharSet.Auto)]
        public static extern nint SHAppBarMessage(AppBarMessage dwMessage, ref APPBARDATA lpData);

        [DllImport("user32.dll", EntryPoint = "SetClassLongPtrW", ExactSpelling = true)]
        private static extern IntPtr SetClassLong64(IntPtr hWnd, ClassLongIndex nIndex, IntPtr dwNewLong);

        [DllImport("user32.dll", EntryPoint = "SetClassLongW", ExactSpelling = true)]
        private static extern IntPtr SetClassLong32(IntPtr hWnd, ClassLongIndex nIndex, IntPtr dwNewLong);

        public static IntPtr SetClassLong(IntPtr hWnd, ClassLongIndex nIndex, IntPtr dwNewLong)
        {
            if (IntPtr.Size == 4)
            {
                return SetClassLong32(hWnd, nIndex, dwNewLong);
            }

            return SetClassLong64(hWnd, nIndex, dwNewLong);
        }

        public static IntPtr GetClassLongPtr(IntPtr hWnd, int nIndex)