Changeset 150


Ignore:
Timestamp:
Jun 13, 2009, 5:47:42 PM (16 years ago)
Author:
lpino
Message:
  • Fix the MPFROM2SHORT macro..... again
Location:
trunk/src/plugins/org.eclipse.swt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT PI/pm/org/eclipse/swt/internal/pm/OS.java

    r146 r150  
    21812181public static final short SHORT1FROMMP (int mp) { return (short)mp; }   
    21822182public static final short SHORT2FROMMP (int mp) { return (short)(mp >> 16); }
    2183 public static final int MPFROM2SHORT(short s1, short s2){ return (((int)(s1)) | ((int)(s2)) << 16);}
    2184 //public static final int MPFROM2SHORT(short s1, short s2){ return ((s1 << 16) + s2);}
     2183//public static final int MPFROM2SHORT(short s1, short s2){ return (((int)((short)s1)) | ((int)((short)s2)) << 16);}
     2184public static final int MPFROM2SHORT(short s1, short s2){ return ((s2 << 16) + s1);}
    21852185//public static final int MAKELONG (short l, short h) {
    21862186//    return ((int)l) | (((int)h) << 16);
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Scale.java

    r149 r150  
    100100    OS.WinSetWindowUShort (handle, OS.QWS_ID, (short)(handle & 0xFFFF));
    101101
    102     OS.WinSendMsg(handle, OS.SLM_SETTICKSIZE, OS.MPFROM2SHORT((short)OS.SMA_SETALLTICKS, (short)2), 0);
     102    OS.WinSendMsg(handle, OS.SLM_SETTICKSIZE, OS.MPFROM2SHORT((short)OS.SMA_SETALLTICKS, (short)6), 0);
     103    System.out.println ("Scale:createHandle " + Integer.toHexString (OS.MPFROM2SHORT((short)OS.SMA_SETALLTICKS, (short)6)));
    103104    super.register ();
    104105    super.subclass ();
     
    168169    System.out.println ("Scale:createHandle");
    169170        super.createHandle ();
    170         OS.WinSendMsg(handle, OS.SLM_SETTICKSIZE, OS.MPFROM2SHORT((short)OS.SMA_SETALLTICKS, (short)10), 0);       
     171//        OS.WinSendMsg(handle, OS.SLM_SETTICKSIZE, OS.MPFROM2SHORT((short)OS.SMA_SETALLTICKS, (short)10), 0);       
    171172//      OS.SendMessage (handle, OS.TBM_SETRANGEMAX, 0, 100);
    172173//      OS.SendMessage (handle, OS.TBM_SETPAGESIZE, 0, 10);
Note: See TracChangeset for help on using the changeset viewer.