Ignore:
Timestamp:
Jan 8, 2017, 11:21:02 AM (7 years ago)
Author:
chronos
Message:
  • Fixed: Build under Linux.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/PVSB.pas

    r9 r17  
    1 {$INCLUDE switches.pas}
     1{$INCLUDE Switches.pas}
    22unit PVSB;
    33
     
    55
    66uses
    7   Windows, LCLIntf, LCLType, LMessages, Messages, SysUtils;
     7  LCLIntf, LCLType, LMessages, Messages, SysUtils;
    88
    99type
     
    2828begin
    2929  inc(Count);
     30  {$IFDEF WINDOWS}
    3031  sb.h := CreateWindowEx(0, 'SCROLLBAR', pchar('PVSB' + IntToStr(Count)),
    3132    SBS_VERT or WS_CHILD or SBS_RIGHTALIGN, x1 - 100, y0, 100, y1 - y0,
    3233    Handle, 0, 0, nil);
     34  {$ENDIF}
    3335  sb.si.cbSize := 28;
    3436end;
     
    6062    else
    6163    begin
    62       if m.wParamLo in [SB_THUMBPOSITION, SB_THUMBTRACK] then
     64      if (m.wParam and $ffff) in [SB_THUMBPOSITION, SB_THUMBTRACK] then
    6365      begin
    64         result := m.wParamHi <> npos;
    65         npos := m.wParamHi;
     66        result := ((m.wParam shr 16) and $ffff) <> npos;
     67        npos := (m.wParam shr 16) and $ffff;
    6668      end
    6769      else
    6870      begin
    69         case m.wParamLo of
     71        case (m.wParam and $ffff) of
    7072          SB_LINEUP:
    7173            NewPos := npos - 1;
     
    8486          NewPos := nMax - integer(nPage) + 1;
    8587        result := NewPos <> npos;
    86         if (NewPos <> npos) or (m.wParamLo = SB_ENDSCROLL) then
     88        if (NewPos <> npos) or ((m.wParam and $ffff) = SB_ENDSCROLL) then
    8789        begin
    8890          npos := NewPos;
Note: See TracChangeset for help on using the changeset viewer.