// This static method is required because legacy OSes do not support
        // SetWindowLongPtr
        public static IntPtr SetWindowLongPtr(IntPtr hWnd, int nIndex, long dwNewLong)
        {
            if (IntPtr.Size == 8)
            {
                return(Pinvokes.SetWindowLongPtr64(hWnd, nIndex, dwNewLong));
            }

            return(new IntPtr(Pinvokes.SetWindowLong32(hWnd, nIndex, (int)dwNewLong)));
        }