Ignore:
Timestamp:
May 23, 2020, 12:45:14 AM (4 years ago)
Author:
chronos
Message:
  • Fixed: Scrolling under HighDPI. ScrollDC needs to be scaled as well.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/Packages/CevoComponents/DrawDlg.pas

    r246 r252  
    2222    // defines area to grip the window for moving (from top)
    2323    procedure InitButtons;
    24     procedure OnEraseBkgnd(var m: TMessage); message WM_ERASEBKGND;
     24    procedure OnEraseBkgnd(var Msg: TMessage); message WM_ERASEBKGND;
    2525    procedure OnHitTest(var Msg: TMessage); message WM_NCHITTEST;
    2626    procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
     
    7979end;
    8080
    81 procedure TDrawDlg.OnEraseBkgnd(var m: TMessage);
     81procedure TDrawDlg.OnEraseBkgnd(var Msg: TMessage);
    8282begin
    8383end;
     
    9393  else
    9494  begin
    95     Pos := Point(Integer(Msg.LParam and $ffff),
    96       Integer((Msg.LParam shr 16) and $ffff));
     95    Pos := ScalePointFromNative(Point(Integer(Msg.LParam and $ffff),
     96      Integer((Msg.LParam shr 16) and $ffff)));
    9797    if Pos.Y >= Top + TitleHeight then
    9898      Msg.Result := HTCLIENT
     
    112112          end;
    113113        end;
    114       Msg.Result := HTCAPTION
     114      Msg.Result := HTCAPTION;
    115115    end;
    116116  end;
Note: See TracChangeset for help on using the changeset viewer.