Changeset 39 for trunk/LocalPlayer


Ignore:
Timestamp:
Jan 9, 2017, 7:58:25 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: Retyping from pointer to integer doesn't work on 64-bit architecture.
  • Fixed: Do not use CreateWindowEx for scrollbar under Linux.
  • Fixed: Warning about unintialized record fields.
Location:
trunk/LocalPlayer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Help.pas

    r38 r39  
    4141
    4242  THyperText = class(TStringList)
     43  public
    4344    procedure AddLine(s: String = ''; Format: integer = 0; Picpix: integer = 0;
    4445      LinkCategory: integer = 0; LinkIndex: integer = 0);
  • trunk/LocalPlayer/PVSB.pas

    r38 r39  
    88  Windows,
    99  {$ENDIF}
    10   LCLIntf, LCLType, LMessages, Messages, SysUtils;
     10  Forms, LCLIntf, LCLType, LMessages, Messages, SysUtils;
    1111
    1212type
    1313  TPVScrollbar = record
    1414    h: integer;
    15     si: TScrollInfo end;
     15    si: TScrollInfo;
     16    Form: TForm;
     17  end;
    1618
    17     procedure CreatePVSB(var sb: TPVScrollbar; Handle, y0, x1, y1: integer);
    18     procedure InitPVSB(var sb: TPVScrollbar; max, Page: integer);
    19     function ProcessPVSB(var sb: TPVScrollbar; const m: TMessage): boolean;
    20     function ProcessMouseWheel(var sb: TPVScrollbar; const m: TMessage)
    21       : boolean;
    22     procedure ShowPVSB(var sb: TPVScrollbar; Visible: boolean);
    23     procedure EndPVSB(var sb: TPVScrollbar);
     19  procedure CreatePVSB(var sb: TPVScrollbar; Handle, y0, x1, y1: integer);
     20  procedure InitPVSB(var sb: TPVScrollbar; max, Page: integer);
     21  function ProcessPVSB(var sb: TPVScrollbar; const m: TMessage): boolean;
     22  function ProcessMouseWheel(var sb: TPVScrollbar; const m: TMessage)
     23    : boolean;
     24  procedure ShowPVSB(var sb: TPVScrollbar; Visible: boolean);
     25  procedure EndPVSB(var sb: TPVScrollbar);
    2426
    2527implementation
     
    2830  Count: integer = 0;
    2931
    30 procedure CreatePVSB;
     32procedure CreatePVSB(var sb: TPVScrollbar; Handle, y0, x1, y1: integer);
    3133begin
    3234  inc(Count);
     35  {$IFDEF LINUX}
     36  sb.Form := TForm.Create(nil);
     37  sb.h := sb.Form.Handle;
     38  {$ENDIF}
    3339  {$IFDEF WINDOWS}
    3440  sb.h := CreateWindowEx(0, 'SCROLLBAR', pchar('PVSB' + IntToStr(Count)),
     
    3945end;
    4046
    41 procedure InitPVSB;
     47procedure InitPVSB(var sb: TPVScrollbar; max, Page: integer);
    4248begin
    4349  {$IFDEF WINDOWS}
     
    5864end;
    5965
    60 function ProcessPVSB;
     66function ProcessPVSB(var sb: TPVScrollbar; const m: TMessage): Boolean;
    6167var
    6268  NewPos: integer;
     
    101107end;
    102108
    103 function ProcessMouseWheel;
     109function ProcessMouseWheel(var sb: TPVScrollbar; const m: TMessage): Boolean;
    104110var
    105111  NewPos: integer;
Note: See TracChangeset for help on using the changeset viewer.