Cleaned the macros up a bit.
authorpaulwerelds
Mon, 04 Oct 2010 17:34:58 +0000
changeset 210be7dc4a856aa
parent 209 dee42c887ab0
child 211 88131b86378b
Cleaned the macros up a bit.
GUI/GadgetWindow.cs
     1.1 --- a/GUI/GadgetWindow.cs	Mon Oct 04 16:56:42 2010 +0000
     1.2 +++ b/GUI/GadgetWindow.cs	Mon Oct 04 17:34:58 2010 +0000
     1.3 @@ -427,20 +427,20 @@
     1.4      /// Some macros imported and converted from the Windows SDK
     1.5      /// </summary>
     1.6      private static class Macros {
     1.7 -      public static UInt16 LOWORD(IntPtr l) {
     1.8 -        return ((UInt16) (((UInt64) (l)) & 0xffff));
     1.9 +      public static ushort LOWORD(IntPtr l) {
    1.10 +        return (ushort) ((ulong)l & 0xFFFF);
    1.11        }
    1.12        
    1.13        public static UInt16 HIWORD(IntPtr l) {
    1.14 -        return ((UInt16) ((((UInt64) (l)) >> 16) & 0xffff));
    1.15 +        return (ushort) (((ulong)l >> 16) & 0xFFFF);
    1.16        }
    1.17  
    1.18        public static int GET_X_LPARAM(IntPtr lp) {
    1.19 -        return ((int) (short) LOWORD(lp));
    1.20 +        return (short) LOWORD(lp);
    1.21        }
    1.22  
    1.23        public static int GET_Y_LPARAM(IntPtr lp) {
    1.24 -        return ((int) (short) HIWORD(lp));
    1.25 +        return (short) HIWORD(lp);
    1.26        }
    1.27      }
    1.28