Changeset 475


Ignore:
Timestamp:
Dec 4, 2023, 9:42:30 PM (12 months ago)
Author:
chronos
Message:
  • Fixed: Build under Windows.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Integrated.lpi

    r473 r475  
    1717      <ResourceType Value="res"/>
    1818      <UseXPManifest Value="True"/>
     19      <XPManifest>
     20        <DpiAware Value="True"/>
     21      </XPManifest>
    1922      <Icon Value="0"/>
    2023      <Resources Count="2">
     
    7073              <IgnoredMessages idx5024="True"/>
    7174            </CompilerMessages>
    72             <OtherDefines Count="1">
    73               <Define0 Value="DPI"/>
    74             </OtherDefines>
     75            <CustomOptions Value="-dDPI"/>
    7576          </Other>
    7677        </CompilerOptions>
     
    7879      <SharedMatrixOptions Count="2">
    7980        <Item1 ID="151739052537" Targets="CevoComponents,Common,DpiControls" Modes="Debug" Value="-g -gl -gh -O1 -dDPI"/>
    80         <Item2 ID="186701832267" Targets="CevoComponents,Common,DpiControls" Modes="Release" Value="-CX -XX -O3"/>
     81        <Item2 ID="186701832267" Targets="CevoComponents,Common,DpiControls" Modes="Release" Value="-CX -XX -O3 -dDPI"/>
    8182      </SharedMatrixOptions>
    8283    </BuildModes>
  • trunk/LocalPlayer/Term.pas

    r471 r475  
    71687168      WindowState := CurrentWindowState;
    71697169      {$IFDEF WINDOWS}
    7170       BorderStyle := bsNone;
     7170      BorderStyle := TBorderStyle.bsNone;
    71717171      {$ENDIF}
    71727172      BorderIcons := [];
     
    71837183      end;
    71847184      {$IFDEF WINDOWS}
    7185       BorderStyle := bsSizeable;
     7185      BorderStyle := TBorderStyle.bsSizeable;
    71867186      {$ENDIF}
    71877187      BorderIcons := [TBorderIcon.biSystemMenu, TBorderIcon.biMinimize,
  • trunk/Packages/DpiControls/Dpi.Common.pas

    r473 r475  
    44
    55uses
     6  {$IFDEF WINDOWS}Windows,{$ENDIF}
    67  Classes, SysUtils, LCLType, Types, LCLIntf, Graphics, Dpi.Graphics;
    78
     
    910  DpiControlsComponentPaletteName = 'DpiControls';
    1011
    11 function BitBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean;
    12 function BitBltCanvas(Dest: TCanvas; X, Y, Width, Height: Integer; Src: TCanvas; XSrc, YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean;
     12function BitBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc,
     13    YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean;
     14function BitBltCanvas(Dest: TCanvas; X, Y, Width, Height: Integer; Src: TCanvas;
     15    XSrc, YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean;
    1316function CreateRectRgn(X1, Y1, X2, Y2: Integer): HRGN;
     17function ScrollDC(hDC: HDC; dx: longint; dy: longint; const lprcScroll: RECT;
     18  const lprcClip:RECT;hrgnUpdate:HRGN; lprcUpdate: LPRECT): WINBOOL; overload;
    1419function ScrollDC(Canvas: TCanvas; dx: Longint; dy: Longint; const lprcScroll: TRect;
    15   const lprcClip:TRect; hrgnUpdate: Handle; lprcUpdate: PRect): Boolean;
     20  const lprcClip:TRect; hrgnUpdate: Handle; lprcUpdate: PRect): Boolean; overload;
    1621function ScaleToNative(Value: Integer): Integer;
    1722function ScaleToNativeDist(Base, Value: Integer): Integer;
     
    4449  Result := LCLIntf.CreateRectRgn(ScaleToNative(X1), ScaleToNative(Y1), ScaleToNative(X2),
    4550    ScaleToNative(Y2));
     51end;
     52
     53function ScrollDC(hDC: HDC; dx: longint; dy: longint; const lprcScroll: RECT;
     54  const lprcClip: RECT; hrgnUpdate: HRGN; lprcUpdate: LPRECT): WINBOOL;
     55var
     56  R: RECT;
     57begin
     58  if Assigned(lprcUpdate) then begin
     59    R := ScaleRectToNative(lprcUpdate^);
     60    lprcUpdate := @R;
     61  end;
     62  Result := Windows.ScrollDC(hDC, ScaleToNative(dx), ScaleToNative(dY),
     63    ScaleRectToNative(lprcScroll), ScaleRectToNative(lprcClip), hrgnUpdate, lprcUpdate);
    4664end;
    4765
Note: See TracChangeset for help on using the changeset viewer.