Changeset 246 for branches/highdpi/Packages/DpiControls/UDpiControls.pas
- Timestamp:
- May 21, 2020, 8:17:38 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/Packages/DpiControls/UDpiControls.pas
r244 r246 77 77 protected 78 78 procedure ScreenChanged; 79 function Get VclFont: TFont; virtual;79 function GetNativeFont: TFont; virtual; 80 80 public 81 VclFont: TFont;81 NativeFont: TFont; 82 82 constructor Create; 83 83 destructor Destroy; override; … … 162 162 procedure SetOnResize(AValue: TNotifyEvent); 163 163 procedure SetShowHint(AValue: Boolean); 164 procedure VclFormResize(Sender: TObject);165 procedure VclChangeBounds(Sender: TObject);164 procedure NativeFormResize(Sender: TObject); 165 procedure NativeChangeBounds(Sender: TObject); 166 166 procedure DoFormResize; 167 167 procedure DoChangeBounds; … … 186 186 procedure SetVisible(AValue: Boolean); virtual; 187 187 procedure SetWidth(AValue: Integer); virtual; 188 function Get VclControl: TControl; virtual;189 procedure Update VclControl; virtual;188 function GetNativeControl: TControl; virtual; 189 procedure UpdateNativeControl; virtual; 190 190 procedure MouseDown(Button: TMouseButton; Shift: TShiftState; 191 191 X, Y: Integer); virtual; … … 247 247 protected 248 248 FDpi: Integer; 249 function Get VclGraphic: TGraphic; virtual;249 function GetNativeGraphic: TGraphic; virtual; 250 250 function GetWidth: Integer; virtual; abstract; 251 251 function GetHeight: Integer; virtual; abstract; … … 256 256 function GetDpi: Integer; virtual; 257 257 public 258 VclGraphicClass: TGraphicClass;258 NativeGraphicClass: TGraphicClass; 259 259 constructor Create; virtual; 260 260 procedure LoadFromFile(const Filename: string); virtual; … … 271 271 function GetRawImage: TRawImage; 272 272 protected 273 function Get VclGraphic: TGraphic; override;274 function Get VclRasterImage: TRasterImage; virtual;273 function GetNativeGraphic: TGraphic; override; 274 function GetNativeRasterImage: TRasterImage; virtual; 275 275 public 276 276 property RawImage: TRawImage read GetRawImage; … … 282 282 private 283 283 FFont: TDpiFont; 284 F VclCanvas: TCanvas;284 FNativeCanvas: TCanvas; 285 285 function GetBrush: TBrush; 286 286 function GetHandle: HDC; … … 294 294 procedure SetPen(AValue: TPen); 295 295 procedure SetPixel(X, Y: Integer; AValue: TColor); 296 procedure Set VclCanvas(AValue: TCanvas);296 procedure SetNativeCanvas(AValue: TCanvas); 297 297 protected 298 function Get VclCanvas: TCanvas; virtual;298 function GetNativeCanvas: TCanvas; virtual; 299 299 public 300 property VclCanvas: TCanvas read FVclCanvas write SetVclCanvas;300 property NativeCanvas: TCanvas read FNativeCanvas write SetNativeCanvas; 301 301 procedure StretchDraw(const DestRect: TRect; SrcGraphic: TDpiGraphic); virtual; 302 302 procedure FrameRect(Rect: TRect); … … 331 331 private 332 332 FOnPaint: TNotifyEvent; 333 VclGraphicControl: TGraphicControl;333 NativeGraphicControl: TGraphicControl; 334 334 FCanvas: TDpiCanvas; 335 335 function GetOnPaint: TNotifyEvent; … … 339 339 protected 340 340 procedure Paint; virtual; 341 function Get VclControl: TControl; override;342 function Get VclGraphicControl: TGraphicControl; virtual;343 procedure Update VclControl; override;341 function GetNativeControl: TControl; override; 342 function GetNativeGraphicControl: TGraphicControl; virtual; 343 procedure UpdateNativeControl; override; 344 344 property OnPaint: TNotifyEvent read GetOnPaint write SetOnPaint; 345 345 public … … 367 367 procedure SetTabStop(AValue: Boolean); 368 368 protected 369 function Get VclControl: TControl; override;370 function Get VclWinControl: TWinControl; virtual;369 function GetNativeControl: TControl; override; 370 function GetNativeWinControl: TWinControl; virtual; 371 371 public 372 372 Controls: TDpiControls; … … 395 395 procedure SetPixelsPerInch(AValue: Integer); 396 396 protected 397 function Get VclWinControl: TWinControl; override;398 function Get VclCustomControl: TCustomControl; virtual;397 function GetNativeWinControl: TWinControl; override; 398 function GetNativeCustomControl: TCustomControl; virtual; 399 399 public 400 400 property Canvas: TDpiCanvas read GetCanvas; … … 421 421 FVertScrollBar: TDpiControlScrollBar; 422 422 protected 423 function Get VclCustomControl: TCustomControl; override;424 function Get VclScrollingWinControl: TScrollingWinControl; virtual;423 function GetNativeCustomControl: TCustomControl; override; 424 function GetNativeScrollingWinControl: TScrollingWinControl; virtual; 425 425 public 426 426 constructor Create(TheOwner: TComponent); override; … … 480 480 procedure CreateParams(var p: TCreateParams); virtual; 481 481 procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override; 482 function Get VclScrollingWinControl: TScrollingWinControl; override;483 function Get VclForm: TForm; virtual;484 procedure Update VclControl; override;482 function GetNativeScrollingWinControl: TScrollingWinControl; override; 483 function GetNativeForm: TForm; virtual; 484 procedure UpdateNativeControl; override; 485 485 public 486 VclForm: TForm;486 NativeForm: TForm; 487 487 procedure AfterConstruction; override; 488 488 property ModalResult: TModalResult read GetModalResult write SetModalResult; … … 527 527 private 528 528 protected 529 function Get VclControl: TControl; override;529 function GetNativeControl: TControl; override; 530 530 public 531 VclButton: TButton;531 NativeButton: TButton; 532 532 destructor Destroy; override; 533 533 published … … 559 559 procedure SetTopIndex(AValue: Integer); 560 560 protected 561 function Get VclWinControl: TWinControl; override;562 function Get VclListBox: TListBox; virtual;561 function GetNativeWinControl: TWinControl; override; 562 function GetNativeListBox: TListBox; virtual; 563 563 public 564 VclListBox: TListBox;564 NativeListBox: TListBox; 565 565 destructor Destroy; override; 566 566 property ItemIndex: Integer read GetItemIndex write SetItemIndex; … … 598 598 procedure SetPosition(AValue: Integer); 599 599 protected 600 function Get VclControl: TControl; override;600 function GetNativeControl: TControl; override; 601 601 public 602 VclScrollBar: TScrollBar;602 NativeScrollBar: TScrollBar; 603 603 destructor Destroy; override; 604 604 published … … 627 627 function GetHeight: Integer; override; 628 628 function GetWidth: Integer; override; 629 function Get VclBitmap: TCustomBitmap; virtual;630 function Get VclRasterImage: TRasterImage; override;629 function GetNativeBitmap: TCustomBitmap; virtual; 630 function GetNativeRasterImage: TRasterImage; override; 631 631 procedure SetHeight(AValue: Integer); override; 632 632 procedure SetWidth(AValue: Integer); override; 633 633 procedure ScreenChanged; override; 634 634 public 635 VclBitmap: TBitmap;635 NativeBitmap: TBitmap; 636 636 procedure BeginUpdate; 637 637 procedure EndUpdate; … … 669 669 protected 670 670 public 671 VclImage: TImage;672 function Get VclControl: TControl; override;671 NativeImage: TImage; 672 function GetNativeControl: TControl; override; 673 673 destructor Destroy; override; 674 674 published … … 682 682 TDpiPaintBox = class(TDpiGraphicControl) 683 683 public 684 VclPaintBox: TPaintBox;685 function Get VclGraphicControl: TGraphicControl; override;684 NativePaintBox: TPaintBox; 685 function GetNativeGraphicControl: TGraphicControl; override; 686 686 constructor Create(TheOwner: TComponent); override; 687 687 destructor Destroy; override; … … 718 718 destructor Destroy; override; 719 719 procedure UpdateScreen; 720 procedure UpdateActiveFormFrom VclScreen;720 procedure UpdateActiveFormFromNativeScreen; 721 721 property FormCount: Integer read GetFormCount; 722 722 property Forms[Index: Integer]: TDpiForm read GetForms; … … 735 735 TDpiJpegImage = class(TDpiBitmap) 736 736 protected 737 function Get VclBitmap: TCustomBitmap; override;738 function Get VclJpeg: TJPEGImage; virtual;737 function GetNativeBitmap: TCustomBitmap; override; 738 function GetNativeJpeg: TJPEGImage; virtual; 739 739 public 740 VclJpeg: TJPEGImage;740 NativeJpeg: TJPEGImage; 741 741 constructor Create; override; 742 742 end; … … 746 746 TDpiPortableNetworkGraphic = class(TDpiBitmap) 747 747 protected 748 function Get VclBitmap: TCustomBitmap; override;749 function Get VclPng: TPortableNetworkGraphic; virtual;748 function GetNativeBitmap: TCustomBitmap; override; 749 function GetNativePng: TPortableNetworkGraphic; virtual; 750 750 public 751 VclPng: TPortableNetworkGraphic;751 NativePng: TPortableNetworkGraphic; 752 752 constructor Create; override; 753 753 end; … … 767 767 procedure SetTitle(AValue: string); 768 768 protected 769 function Get VclApplication: TApplication; virtual;769 function GetNativeApplication: TApplication; virtual; 770 770 public 771 771 constructor Create(AOwner: TComponent); override; … … 828 828 procedure OnClickHandler(Sender: TObject); 829 829 protected 830 function Get VclMenuItem: TMenuItem; virtual;830 function GetNativeMenuItem: TMenuItem; virtual; 831 831 procedure SetParentComponent(AValue: TComponent); override; 832 832 public 833 VclMenuItem: TMenuItem;833 NativeMenuItem: TMenuItem; 834 834 constructor Create(AOwner: TComponent); override; 835 835 destructor Destroy; override; … … 861 861 FItems: TDpiMenuItem; 862 862 protected 863 function Get VclMenu: TMenu; virtual;863 function GetNativeMenu: TMenu; virtual; 864 864 public 865 865 property Items: TDpiMenuItem read FItems; … … 875 875 procedure SetAutoPopup(AValue: Boolean); 876 876 protected 877 function Get VclMenu: TMenu; override;878 function Get VclPopupMenu: TPopupMenu; virtual;877 function GetNativeMenu: TMenu; override; 878 function GetNativePopupMenu: TPopupMenu; virtual; 879 879 public 880 VclPopupMenu: TPopupMenu;880 NativePopupMenu: TPopupMenu; 881 881 procedure PopUp; 882 882 procedure PopUp(X, Y: Integer); virtual; … … 897 897 function DpiBitBltCanvas(Dest: TDpiCanvas; X, Y, Width, Height: Integer; Src: TDpiCanvas; XSrc, YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean; 898 898 function DpiCreateRectRgn(X1, Y1, X2, Y2: Integer): HRGN; 899 function ScaleTo Vcl(Value: Integer): Integer;900 function ScaleFrom Vcl(Value: Integer): Integer;901 function ScalePointTo Vcl(Value: TPoint): TPoint;902 function ScalePointFrom Vcl(Value: TPoint): TPoint;903 function ScaleSizeTo Vcl(Value: TSize): TSize;904 function ScaleSizeFrom Vcl(Value: TSize): TSize;905 function ScaleRectTo Vcl(Value: TRect): TRect;906 function ScaleRectFrom Vcl(Value: TRect): TRect;899 function ScaleToNative(Value: Integer): Integer; 900 function ScaleFromNative(Value: Integer): Integer; 901 function ScalePointToNative(Value: TPoint): TPoint; 902 function ScalePointFromNative(Value: TPoint): TPoint; 903 function ScaleSizeToNative(Value: TSize): TSize; 904 function ScaleSizeFromNative(Value: TSize): TSize; 905 function ScaleRectToNative(Value: TRect): TRect; 906 function ScaleRectFromNative(Value: TRect): TRect; 907 907 908 908 … … 933 933 function DpiCreateRectRgn(X1, Y1, X2, Y2: Integer): HRGN; 934 934 begin 935 Result := CreateRectRgn(ScaleTo Vcl(X1), ScaleToVcl(Y1), ScaleToVcl(X2),936 ScaleTo Vcl(Y2));937 end; 938 939 function ScaleTo Vcl(Value: Integer): Integer;935 Result := CreateRectRgn(ScaleToNative(X1), ScaleToNative(Y1), ScaleToNative(X2), 936 ScaleToNative(Y2)); 937 end; 938 939 function ScaleToNative(Value: Integer): Integer; 940 940 begin 941 941 Result := Round(Value * DpiScreen.Dpi / 96); 942 942 end; 943 943 944 function ScaleFrom Vcl(Value: Integer): Integer;944 function ScaleFromNative(Value: Integer): Integer; 945 945 begin 946 946 Result := Round(Value * 96 / DpiScreen.Dpi); 947 947 end; 948 948 949 function ScalePointTo Vcl(Value: TPoint): TPoint;950 begin 951 Result.X := ScaleTo Vcl(Value.X);952 Result.Y := ScaleTo Vcl(Value.Y);953 end; 954 955 function ScalePointFrom Vcl(Value: TPoint): TPoint;956 begin 957 Result.X := ScaleFrom Vcl(Value.X);958 Result.Y := ScaleFrom Vcl(Value.Y);959 end; 960 961 function ScaleSizeTo Vcl(Value: TSize): TSize;962 begin 963 Result.Width := ScaleTo Vcl(Value.Width);964 Result.Height := ScaleTo Vcl(Value.Height);965 end; 966 967 function ScaleSizeFrom Vcl(Value: TSize): TSize;968 begin 969 Result.Width := ScaleFrom Vcl(Value.Width);970 Result.Height := ScaleFrom Vcl(Value.Height);971 end; 972 973 function ScaleRectTo Vcl(Value: TRect): TRect;974 begin 975 Result.Left := ScaleTo Vcl(Value.Left);976 Result.Top := ScaleTo Vcl(Value.Top);977 Result.Right := ScaleTo Vcl(Value.Right);978 Result.Bottom := ScaleTo Vcl(Value.Bottom);979 end; 980 981 function ScaleRectFrom Vcl(Value: TRect): TRect;982 begin 983 Result.Left := ScaleFrom Vcl(Value.Left);984 Result.Top := ScaleFrom Vcl(Value.Top);985 Result.Right := ScaleFrom Vcl(Value.Right);986 Result.Bottom := ScaleFrom Vcl(Value.Bottom);949 function ScalePointToNative(Value: TPoint): TPoint; 950 begin 951 Result.X := ScaleToNative(Value.X); 952 Result.Y := ScaleToNative(Value.Y); 953 end; 954 955 function ScalePointFromNative(Value: TPoint): TPoint; 956 begin 957 Result.X := ScaleFromNative(Value.X); 958 Result.Y := ScaleFromNative(Value.Y); 959 end; 960 961 function ScaleSizeToNative(Value: TSize): TSize; 962 begin 963 Result.Width := ScaleToNative(Value.Width); 964 Result.Height := ScaleToNative(Value.Height); 965 end; 966 967 function ScaleSizeFromNative(Value: TSize): TSize; 968 begin 969 Result.Width := ScaleFromNative(Value.Width); 970 Result.Height := ScaleFromNative(Value.Height); 971 end; 972 973 function ScaleRectToNative(Value: TRect): TRect; 974 begin 975 Result.Left := ScaleToNative(Value.Left); 976 Result.Top := ScaleToNative(Value.Top); 977 Result.Right := ScaleToNative(Value.Right); 978 Result.Bottom := ScaleToNative(Value.Bottom); 979 end; 980 981 function ScaleRectFromNative(Value: TRect): TRect; 982 begin 983 Result.Left := ScaleFromNative(Value.Left); 984 Result.Top := ScaleFromNative(Value.Top); 985 Result.Right := ScaleFromNative(Value.Right); 986 Result.Bottom := ScaleFromNative(Value.Bottom); 987 987 end; 988 988 … … 990 990 YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean; 991 991 begin 992 Result := BitBlt(DestDC, ScaleTo Vcl(X), ScaleToVcl(Y), ScaleToVcl(Width),993 ScaleTo Vcl(Height), SrcDC, ScaleToVcl(XSrc), ScaleToVcl(YSrc), Rop);992 Result := BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y), ScaleToNative(Width), 993 ScaleToNative(Height), SrcDC, ScaleToNative(XSrc), ScaleToNative(YSrc), Rop); 994 994 end; 995 995 996 996 { TDpiMenu } 997 997 998 function TDpiMenu.Get VclMenu: TMenu;998 function TDpiMenu.GetNativeMenu: TMenu; 999 999 begin 1000 1000 Result := nil; … … 1017 1017 function TDpiMenuItem.GetCaption: TTranslateString; 1018 1018 begin 1019 Result := Get VclMenuItem.Caption;1019 Result := GetNativeMenuItem.Caption; 1020 1020 end; 1021 1021 1022 1022 function TDpiMenuItem.GetChecked: Boolean; 1023 1023 begin 1024 Result := Get VclMenuItem.Checked;1024 Result := GetNativeMenuItem.Checked; 1025 1025 end; 1026 1026 … … 1032 1032 function TDpiMenuItem.GetEnabled: Boolean; 1033 1033 begin 1034 Result := Get VclMenuItem.Enabled;1034 Result := GetNativeMenuItem.Enabled; 1035 1035 end; 1036 1036 1037 1037 function TDpiMenuItem.GetGroupIndex: Byte; 1038 1038 begin 1039 Result := Get VclMenuItem.GroupIndex;1039 Result := GetNativeMenuItem.GroupIndex; 1040 1040 end; 1041 1041 … … 1052 1052 function TDpiMenuItem.GetRadioItem: Boolean; 1053 1053 begin 1054 Result := Get VclMenuItem.RadioItem;1054 Result := GetNativeMenuItem.RadioItem; 1055 1055 end; 1056 1056 1057 1057 function TDpiMenuItem.GetShortCut: TShortCut; 1058 1058 begin 1059 Result := Get VclMenuItem.ShortCut;1059 Result := GetNativeMenuItem.ShortCut; 1060 1060 end; 1061 1061 1062 1062 function TDpiMenuItem.GetVisible: Boolean; 1063 1063 begin 1064 Result := Get VclMenuItem.Visible;1064 Result := GetNativeMenuItem.Visible; 1065 1065 end; 1066 1066 … … 1092 1092 procedure TDpiMenuItem.SetCaption(AValue: TTranslateString); 1093 1093 begin 1094 Get VclMenuItem.Caption := AValue;1094 GetNativeMenuItem.Caption := AValue; 1095 1095 end; 1096 1096 1097 1097 procedure TDpiMenuItem.SetChecked(AValue: Boolean); 1098 1098 begin 1099 Get VclMenuItem.Checked := AValue;1099 GetNativeMenuItem.Checked := AValue; 1100 1100 end; 1101 1101 1102 1102 procedure TDpiMenuItem.SetEnabled(AValue: Boolean); 1103 1103 begin 1104 Get VclMenuItem.Enabled := AValue;1104 GetNativeMenuItem.Enabled := AValue; 1105 1105 end; 1106 1106 1107 1107 procedure TDpiMenuItem.SetGroupIndex(AValue: Byte); 1108 1108 begin 1109 Get VclMenuItem.GroupIndex := AValue;1109 GetNativeMenuItem.GroupIndex := AValue; 1110 1110 end; 1111 1111 … … 1117 1117 procedure TDpiMenuItem.SetRadioItem(AValue: Boolean); 1118 1118 begin 1119 Get VclMenuItem.RadioItem := AValue;1119 GetNativeMenuItem.RadioItem := AValue; 1120 1120 end; 1121 1121 1122 1122 procedure TDpiMenuItem.SetShortCut(AValue: TShortCut); 1123 1123 begin 1124 Get VclMenuItem.ShortCut := AValue;1124 GetNativeMenuItem.ShortCut := AValue; 1125 1125 end; 1126 1126 1127 1127 procedure TDpiMenuItem.SetVisible(AValue: Boolean); 1128 1128 begin 1129 Get VclMenuItem.Visible := AValue;1129 GetNativeMenuItem.Visible := AValue; 1130 1130 end; 1131 1131 … … 1139 1139 begin 1140 1140 FItems.Delete(Index); 1141 Get VclMenuItem.Delete(Index);1141 GetNativeMenuItem.Delete(Index); 1142 1142 end; 1143 1143 … … 1150 1150 begin 1151 1151 FItems.Insert(Index, Item); 1152 Get VclMenuItem.Insert(Index, Item.GetVclMenuItem);1152 GetNativeMenuItem.Insert(Index, Item.GetNativeMenuItem); 1153 1153 end; 1154 1154 … … 1171 1171 end; 1172 1172 1173 function TDpiMenuItem.Get VclMenuItem: TMenuItem;1174 begin 1175 if not Assigned( VclMenuItem) then begin1176 VclMenuItem := TMenuItem.Create(nil);1177 VclMenuItem.Name := 'Vcl' + Name;1178 VclMenuItem.OnClick := @OnClickHandler;1179 end; 1180 Result := VclMenuItem;1173 function TDpiMenuItem.GetNativeMenuItem: TMenuItem; 1174 begin 1175 if not Assigned(NativeMenuItem) then begin 1176 NativeMenuItem := TMenuItem.Create(nil); 1177 NativeMenuItem.Name := 'Native' + Name; 1178 NativeMenuItem.OnClick := @OnClickHandler; 1179 end; 1180 Result := NativeMenuItem; 1181 1181 end; 1182 1182 … … 1220 1220 procedure TDpiPopupMenu.PopUp(X, Y: Integer); 1221 1221 begin 1222 Get VclPopupMenu.PopUp(ScaleToVcl(X), ScaleToVcl(Y));1222 GetNativePopupMenu.PopUp(ScaleToNative(X), ScaleToNative(Y)); 1223 1223 end; 1224 1224 … … 1226 1226 begin 1227 1227 inherited; 1228 Get VclPopupMenu;1228 GetNativePopupMenu; 1229 1229 end; 1230 1230 1231 1231 function TDpiPopupMenu.GetAutoPopup: Boolean; 1232 1232 begin 1233 Result := Get VclPopupMenu.AutoPopup;1233 Result := GetNativePopupMenu.AutoPopup; 1234 1234 end; 1235 1235 1236 1236 procedure TDpiPopupMenu.SetAutoPopup(AValue: Boolean); 1237 1237 begin 1238 Get VclPopupMenu.AutoPopup := AValue;1239 end; 1240 1241 function TDpiPopupMenu.Get VclMenu: TMenu;1242 begin 1243 Result := Get VclPopupMenu;1244 end; 1245 1246 function TDpiPopupMenu.Get VclPopupMenu: TPopupMenu;1247 begin 1248 if not Assigned( VclPopupMenu) then begin1249 VclPopupMenu := TPopupMenu.Create(nil);1250 if Assigned(Items. VclMenuItem) then Items.VclMenuItem.Free;1251 Items. VclMenuItem := VclPopupMenu.Items;1252 end; 1253 Result := VclPopupMenu;1238 GetNativePopupMenu.AutoPopup := AValue; 1239 end; 1240 1241 function TDpiPopupMenu.GetNativeMenu: TMenu; 1242 begin 1243 Result := GetNativePopupMenu; 1244 end; 1245 1246 function TDpiPopupMenu.GetNativePopupMenu: TPopupMenu; 1247 begin 1248 if not Assigned(NativePopupMenu) then begin 1249 NativePopupMenu := TPopupMenu.Create(nil); 1250 if Assigned(Items.NativeMenuItem) then Items.NativeMenuItem.Free; 1251 Items.NativeMenuItem := NativePopupMenu.Items; 1252 end; 1253 Result := NativePopupMenu; 1254 1254 end; 1255 1255 1256 1256 destructor TDpiPopupMenu.Destroy; 1257 1257 begin 1258 if Assigned( VclPopupMenu) then FreeAndNil(VclPopupMenu);1258 if Assigned(NativePopupMenu) then FreeAndNil(NativePopupMenu); 1259 1259 inherited Destroy; 1260 1260 end; … … 1264 1264 function TDpiMouse.GetCursorPos: TPoint; 1265 1265 begin 1266 Result := ScalePointFrom Vcl(Mouse.CursorPos);1266 Result := ScalePointFromNative(Mouse.CursorPos); 1267 1267 end; 1268 1268 1269 1269 procedure TDpiMouse.SetCursorPos(AValue: TPoint); 1270 1270 begin 1271 Mouse.CursorPos := ScalePointTo Vcl(AValue);1271 Mouse.CursorPos := ScalePointToNative(AValue); 1272 1272 end; 1273 1273 … … 1305 1305 { TDpiScrollingWinControl } 1306 1306 1307 function TDpiScrollingWinControl.Get VclCustomControl: TCustomControl;1308 begin 1309 Result := Get VclScrollingWinControl;1310 end; 1311 1312 function TDpiScrollingWinControl.Get VclScrollingWinControl: TScrollingWinControl;1307 function TDpiScrollingWinControl.GetNativeCustomControl: TCustomControl; 1308 begin 1309 Result := GetNativeScrollingWinControl; 1310 end; 1311 1312 function TDpiScrollingWinControl.GetNativeScrollingWinControl: TScrollingWinControl; 1313 1313 begin 1314 1314 Result := nil; … … 1366 1366 function TDpiApplication.GetTitle: string; 1367 1367 begin 1368 Result := Get VclApplication.Title;1368 Result := GetNativeApplication.Title; 1369 1369 end; 1370 1370 1371 1371 function TDpiApplication.GetShowMainForm: Boolean; 1372 1372 begin 1373 Result := Get VclApplication.ShowMainForm;1373 Result := GetNativeApplication.ShowMainForm; 1374 1374 end; 1375 1375 … … 1386 1386 procedure TDpiApplication.SetShowMainForm(AValue: Boolean); 1387 1387 begin 1388 Get VclApplication.ShowMainForm := AValue;1388 GetNativeApplication.ShowMainForm := AValue; 1389 1389 end; 1390 1390 1391 1391 procedure TDpiApplication.SetTitle(AValue: string); 1392 1392 begin 1393 Get VclApplication.Title := AValue;1394 end; 1395 1396 function TDpiApplication.Get VclApplication: TApplication;1393 GetNativeApplication.Title := AValue; 1394 end; 1395 1396 function TDpiApplication.GetNativeApplication: TApplication; 1397 1397 begin 1398 1398 Result := Application; … … 1419 1419 begin 1420 1420 if (FMainForm <> nil) and GetShowMainForm then FMainForm.Show; 1421 Get VclApplication.Run;1421 GetNativeApplication.Run; 1422 1422 end; 1423 1423 1424 1424 procedure TDpiApplication.Initialize; 1425 1425 begin 1426 Get VclApplication.Initialize;1426 GetNativeApplication.Initialize; 1427 1427 DpiScreen.UpdateScreen; 1428 1428 end; … … 1435 1435 procedure TDpiApplication.ProcessMessages; 1436 1436 begin 1437 Get VclApplication.ProcessMessages;1437 GetNativeApplication.ProcessMessages; 1438 1438 end; 1439 1439 … … 1446 1446 then 1447 1447 FMainForm := AForm; 1448 Get VclApplication.UpdateMainForm(AForm.GetVclForm);1448 GetNativeApplication.UpdateMainForm(AForm.GetNativeForm); 1449 1449 end; 1450 1450 … … 1479 1479 AForm := TDpiForm(Instance); 1480 1480 UpdateMainForm(AForm); 1481 if FMainForm = AForm then AForm.Get VclForm.HandleNeeded;1481 if FMainForm = AForm then AForm.GetNativeForm.HandleNeeded; 1482 1482 if AForm.FormStyle = fsSplash then begin 1483 1483 // show the splash form and handle the paint message … … 1497 1497 { TDpiJpegImage } 1498 1498 1499 function TDpiJpegImage.Get VclBitmap: TCustomBitmap;1500 begin 1501 Result := Get VclJpeg;1502 end; 1503 1504 function TDpiJpegImage.Get VclJpeg: TJPEGImage;1505 begin 1506 if not Assigned( VclJpeg) then VclJpeg := TJPEGImage.Create;1507 Result := VclJpeg;1499 function TDpiJpegImage.GetNativeBitmap: TCustomBitmap; 1500 begin 1501 Result := GetNativeJpeg; 1502 end; 1503 1504 function TDpiJpegImage.GetNativeJpeg: TJPEGImage; 1505 begin 1506 if not Assigned(NativeJpeg) then NativeJpeg := TJPEGImage.Create; 1507 Result := NativeJpeg; 1508 1508 end; 1509 1509 … … 1511 1511 begin 1512 1512 inherited; 1513 VclGraphicClass := TJPEGImage;1513 NativeGraphicClass := TJPEGImage; 1514 1514 end; 1515 1515 1516 1516 { TDpiPortableNetworkGraphic } 1517 1517 1518 function TDpiPortableNetworkGraphic.Get VclBitmap: TCustomBitmap;1519 begin 1520 Result := Get VclPng;1521 end; 1522 1523 function TDpiPortableNetworkGraphic.Get VclPng: TPortableNetworkGraphic;1524 begin 1525 if not Assigned( VclPng) then VclPng := TPortableNetworkGraphic.Create;1526 Result := VclPng;1518 function TDpiPortableNetworkGraphic.GetNativeBitmap: TCustomBitmap; 1519 begin 1520 Result := GetNativePng; 1521 end; 1522 1523 function TDpiPortableNetworkGraphic.GetNativePng: TPortableNetworkGraphic; 1524 begin 1525 if not Assigned(NativePng) then NativePng := TPortableNetworkGraphic.Create; 1526 Result := NativePng; 1527 1527 end; 1528 1528 … … 1530 1530 begin 1531 1531 inherited; 1532 VclGraphicClass := TPortableNetworkGraphic;1532 NativeGraphicClass := TPortableNetworkGraphic; 1533 1533 end; 1534 1534 … … 1537 1537 function TDpiCustomControl.GetOnPaint: TNotifyEvent; 1538 1538 begin 1539 Result := Get VclCustomControl.OnPaint;1539 Result := GetNativeCustomControl.OnPaint; 1540 1540 end; 1541 1541 1542 1542 function TDpiCustomControl.GetPixelsPerInch: Integer; 1543 1543 begin 1544 // Result := Get VclCustomControl.P;1544 // Result := GetNativeCustomControl.P; 1545 1545 end; 1546 1546 … … 1549 1549 if not Assigned(FCanvas) then begin 1550 1550 FCanvas := TDpiCanvas.Create; 1551 FCanvas. VclCanvas := GetVclCustomControl.Canvas;1551 FCanvas.NativeCanvas := GetNativeCustomControl.Canvas; 1552 1552 end; 1553 1553 Result := FCanvas; … … 1556 1556 procedure TDpiCustomControl.SetOnPaint(AValue: TNotifyEvent); 1557 1557 begin 1558 Get VclCustomControl.OnPaint := AValue;1558 GetNativeCustomControl.OnPaint := AValue; 1559 1559 end; 1560 1560 … … 1564 1564 end; 1565 1565 1566 function TDpiCustomControl.Get VclWinControl: TWinControl;1567 begin 1568 Result := Get VclCustomControl;1569 end; 1570 1571 function TDpiCustomControl.Get VclCustomControl: TCustomControl;1566 function TDpiCustomControl.GetNativeWinControl: TWinControl; 1567 begin 1568 Result := GetNativeCustomControl; 1569 end; 1570 1571 function TDpiCustomControl.GetNativeCustomControl: TCustomControl; 1572 1572 begin 1573 1573 Result := nil; … … 1578 1578 function TDpiScrollBar.GetBorderSpacing: TControlBorderSpacing; 1579 1579 begin 1580 Result := VclScrollBar.BorderSpacing;1580 Result := NativeScrollBar.BorderSpacing; 1581 1581 end; 1582 1582 1583 1583 function TDpiScrollBar.GetKind: TScrollBarKind; 1584 1584 begin 1585 Result := VclScrollBar.Kind;1585 Result := NativeScrollBar.Kind; 1586 1586 end; 1587 1587 1588 1588 function TDpiScrollBar.GetMax: Integer; 1589 1589 begin 1590 Result := VclScrollBar.Max;1590 Result := NativeScrollBar.Max; 1591 1591 end; 1592 1592 1593 1593 function TDpiScrollBar.GetMin: Integer; 1594 1594 begin 1595 Result := VclScrollBar.Min;1595 Result := NativeScrollBar.Min; 1596 1596 end; 1597 1597 1598 1598 function TDpiScrollBar.GetOnChange: TNotifyEvent; 1599 1599 begin 1600 Result := VclScrollBar.OnChange;1600 Result := NativeScrollBar.OnChange; 1601 1601 end; 1602 1602 1603 1603 function TDpiScrollBar.GetPageSize: Integer; 1604 1604 begin 1605 Result := VclScrollBar.PageSize;1605 Result := NativeScrollBar.PageSize; 1606 1606 end; 1607 1607 1608 1608 function TDpiScrollBar.GetPosition: Integer; 1609 1609 begin 1610 Result := VclScrollBar.Position;1610 Result := NativeScrollBar.Position; 1611 1611 end; 1612 1612 1613 1613 procedure TDpiScrollBar.SetBorderSpacing(AValue: TControlBorderSpacing); 1614 1614 begin 1615 VclScrollBar.BorderSpacing := AValue;1615 NativeScrollBar.BorderSpacing := AValue; 1616 1616 end; 1617 1617 1618 1618 procedure TDpiScrollBar.SetKind(AValue: TScrollBarKind); 1619 1619 begin 1620 VclScrollBar.Kind := AValue;1620 NativeScrollBar.Kind := AValue; 1621 1621 end; 1622 1622 1623 1623 procedure TDpiScrollBar.SetMax(AValue: Integer); 1624 1624 begin 1625 VclScrollBar.Max := AValue;1625 NativeScrollBar.Max := AValue; 1626 1626 end; 1627 1627 1628 1628 procedure TDpiScrollBar.SetMin(AValue: Integer); 1629 1629 begin 1630 VclScrollBar.Min := Avalue;1630 NativeScrollBar.Min := Avalue; 1631 1631 end; 1632 1632 1633 1633 procedure TDpiScrollBar.SetOnChange(AValue: TNotifyEvent); 1634 1634 begin 1635 VclScrollBar.OnChange := AValue;1635 NativeScrollBar.OnChange := AValue; 1636 1636 end; 1637 1637 1638 1638 procedure TDpiScrollBar.SetPageSize(AValue: Integer); 1639 1639 begin 1640 VclScrollBar.PageSize := AValue;1640 NativeScrollBar.PageSize := AValue; 1641 1641 end; 1642 1642 1643 1643 procedure TDpiScrollBar.SetPosition(AValue: Integer); 1644 1644 begin 1645 VclScrollBar.Position := AValue;1646 end; 1647 1648 function TDpiScrollBar.Get VclControl: TControl;1649 begin 1650 if not Assigned( VclScrollBar) then VclScrollBar := TScrollBar.Create(nil);1651 Result := VclScrollBar;1645 NativeScrollBar.Position := AValue; 1646 end; 1647 1648 function TDpiScrollBar.GetNativeControl: TControl; 1649 begin 1650 if not Assigned(NativeScrollBar) then NativeScrollBar := TScrollBar.Create(nil); 1651 Result := NativeScrollBar; 1652 1652 end; 1653 1653 1654 1654 destructor TDpiScrollBar.Destroy; 1655 1655 begin 1656 FreeAndNil( VclScrollBar);1656 FreeAndNil(NativeScrollBar); 1657 1657 inherited Destroy; 1658 1658 end; … … 1662 1662 function TDpiRasterImage.GetRawImage: TRawImage; 1663 1663 begin 1664 Result := Get VclRasterImage.RawImage;1665 end; 1666 1667 function TDpiRasterImage.Get VclRasterImage: TRasterImage;1668 begin 1669 Result := Get VclRasterImage;1670 end; 1671 1672 function TDpiRasterImage.Get VclGraphic: TGraphic;1673 begin 1674 Result := Get VclRasterImage;1664 Result := GetNativeRasterImage.RawImage; 1665 end; 1666 1667 function TDpiRasterImage.GetNativeRasterImage: TRasterImage; 1668 begin 1669 Result := GetNativeRasterImage; 1670 end; 1671 1672 function TDpiRasterImage.GetNativeGraphic: TGraphic; 1673 begin 1674 Result := GetNativeRasterImage; 1675 1675 end; 1676 1676 1677 1677 { TDpiGraphic } 1678 1678 1679 function TDpiGraphic.Get VclGraphic: TGraphic;1679 function TDpiGraphic.GetNativeGraphic: TGraphic; 1680 1680 begin 1681 1681 Result := nil; … … 1706 1706 Bitmap: TGraphic; 1707 1707 begin 1708 Bitmap := VclGraphicClass.Create;1708 Bitmap := NativeGraphicClass.Create; 1709 1709 Bitmap.LoadFromFile(FileName); 1710 1710 Width := Bitmap.Width; 1711 1711 Height := Bitmap.Height; 1712 1712 if Self is TDpiBitmap then 1713 TBitmap(Get VclGraphic).Canvas.StretchDraw(Bounds(0, 0,1714 TBitmap(Get VclGraphic).Width, TBitmap(GetVclGraphic).Height), Bitmap)1713 TBitmap(GetNativeGraphic).Canvas.StretchDraw(Bounds(0, 0, 1714 TBitmap(GetNativeGraphic).Width, TBitmap(GetNativeGraphic).Height), Bitmap) 1715 1715 else raise Exception.Create('Unsupported class ' + Self.ClassName); 1716 1716 Bitmap.Free; … … 1721 1721 Bitmap: TGraphic; 1722 1722 begin 1723 Bitmap := VclGraphicClass.Create;1723 Bitmap := NativeGraphicClass.Create; 1724 1724 Bitmap.Width := Width; 1725 1725 Bitmap.Height := Height; 1726 1726 if Self is TDpiBitmap then begin 1727 1727 if Bitmap is TRasterImage then 1728 (Bitmap as TRasterImage).Canvas.StretchDraw(Bounds(0, 0, Bitmap.Width, Bitmap.Height), TBitmap(Get VclGraphic))1728 (Bitmap as TRasterImage).Canvas.StretchDraw(Bounds(0, 0, Bitmap.Width, Bitmap.Height), TBitmap(GetNativeGraphic)) 1729 1729 else raise Exception.Create('Expected TRasterImage but got ' + Bitmap.ClassName); 1730 1730 end else raise Exception.Create('Unsupported class ' + Self.ClassName); … … 1744 1744 if not Assigned(FCanvas) then begin 1745 1745 FCanvas := TDpiCanvas.Create; 1746 FCanvas. VclCanvas := GetVclBitmap.Canvas;1746 FCanvas.NativeCanvas := GetNativeBitmap.Canvas; 1747 1747 end; 1748 1748 Result := FCanvas; … … 1751 1751 function TDpiBitmap.GetPixelFormat: TPixelFormat; 1752 1752 begin 1753 Result := Get VclBitmap.PixelFormat;1753 Result := GetNativeBitmap.PixelFormat; 1754 1754 end; 1755 1755 1756 1756 function TDpiBitmap.GetScanLine(Row: Integer): Pointer; 1757 1757 begin 1758 Result := Get VclBitmap.ScanLine[Row];1758 Result := GetNativeBitmap.ScanLine[Row]; 1759 1759 end; 1760 1760 … … 1767 1767 begin 1768 1768 FHeight := AValue; 1769 Get VclBitmap.Height := ScaleToVcl(AValue);1769 GetNativeBitmap.Height := ScaleToNative(AValue); 1770 1770 end; 1771 1771 1772 1772 procedure TDpiBitmap.SetPixelFormat(AValue: TPixelFormat); 1773 1773 begin 1774 Get VclBitmap.PixelFormat := AValue;1774 GetNativeBitmap.PixelFormat := AValue; 1775 1775 end; 1776 1776 … … 1778 1778 begin 1779 1779 FWidth := AValue; 1780 Get VclBitmap.Width := ScaleToVcl(AValue);1780 GetNativeBitmap.Width := ScaleToNative(AValue); 1781 1781 end; 1782 1782 … … 1787 1787 NewHeight: Integer; 1788 1788 begin 1789 NewWidth := ScaleTo Vcl(Width);1790 NewHeight := ScaleTo Vcl(Height);1791 if Assigned( VclBitmap) and ((NewWidth <> VclBitmap.Width) or (NewHeight <> VclBitmap.Height)) then begin1789 NewWidth := ScaleToNative(Width); 1790 NewHeight := ScaleToNative(Height); 1791 if Assigned(NativeBitmap) and ((NewWidth <> NativeBitmap.Width) or (NewHeight <> NativeBitmap.Height)) then begin 1792 1792 // Rescale bitmap to new size 1793 1793 Bitmap := TBitmap.Create; 1794 1794 Bitmap.SetSize(NewWidth, NewHeight); 1795 Bitmap.PixelFormat := VclBitmap.PixelFormat;1796 Bitmap.Canvas.StretchDraw(Bounds(0, 0, NewWidth, NewHeight), VclBitmap);1797 VclBitmap.Free;1798 VclBitmap := Bitmap;1799 Canvas. VclCanvas := VclBitmap.Canvas;1800 end; 1801 end; 1802 1803 function TDpiBitmap.Get VclBitmap: TCustomBitmap;1804 begin 1805 if not Assigned( VclBitmap) then begin1806 VclBitmap := TBitmap.Create;1807 Canvas. VclCanvas := VclBitmap.Canvas;1808 end; 1809 Result := VclBitmap;1795 Bitmap.PixelFormat := NativeBitmap.PixelFormat; 1796 Bitmap.Canvas.StretchDraw(Bounds(0, 0, NewWidth, NewHeight), NativeBitmap); 1797 NativeBitmap.Free; 1798 NativeBitmap := Bitmap; 1799 Canvas.NativeCanvas := NativeBitmap.Canvas; 1800 end; 1801 end; 1802 1803 function TDpiBitmap.GetNativeBitmap: TCustomBitmap; 1804 begin 1805 if not Assigned(NativeBitmap) then begin 1806 NativeBitmap := TBitmap.Create; 1807 Canvas.NativeCanvas := NativeBitmap.Canvas; 1808 end; 1809 Result := NativeBitmap; 1810 1810 end; 1811 1811 1812 1812 procedure TDpiBitmap.BeginUpdate; 1813 1813 begin 1814 Get VclBitmap.BeginUpdate;1814 GetNativeBitmap.BeginUpdate; 1815 1815 end; 1816 1816 1817 1817 procedure TDpiBitmap.EndUpdate; 1818 1818 begin 1819 Get VclBitmap.EndUpdate;1819 GetNativeBitmap.EndUpdate; 1820 1820 end; 1821 1821 … … 1824 1824 FWidth := AWidth; 1825 1825 FHeight := AHeight; 1826 Get VclBitmap.SetSize(ScaleToVcl(AWidth), ScaleToVcl(AHeight));1826 GetNativeBitmap.SetSize(ScaleToNative(AWidth), ScaleToNative(AHeight)); 1827 1827 end; 1828 1828 … … 1830 1830 begin 1831 1831 inherited; 1832 VclGraphicClass := TBitmap;1832 NativeGraphicClass := TBitmap; 1833 1833 end; 1834 1834 … … 1836 1836 begin 1837 1837 FreeAndNil(FCanvas); 1838 FreeAndNil( VclBitmap);1838 FreeAndNil(NativeBitmap); 1839 1839 inherited; 1840 1840 end; … … 1843 1843 begin 1844 1844 if Source is TDpiBitmap then begin 1845 Get VclBitmap.Assign((Source as TDpiBitmap).GetVclBitmap);1845 GetNativeBitmap.Assign((Source as TDpiBitmap).GetNativeBitmap); 1846 1846 end else inherited; 1847 1847 end; 1848 1848 1849 function TDpiBitmap.Get VclRasterImage: TRasterImage;1850 begin 1851 Result := Get VclBitmap;1849 function TDpiBitmap.GetNativeRasterImage: TRasterImage; 1850 begin 1851 Result := GetNativeBitmap; 1852 1852 end; 1853 1853 … … 1856 1856 function TDpiListBox.GetBorderStyle: TBorderStyle; 1857 1857 begin 1858 Result := Get VclListBox.BorderStyle;1858 Result := GetNativeListBox.BorderStyle; 1859 1859 end; 1860 1860 1861 1861 function TDpiListBox.GetCount: Integer; 1862 1862 begin 1863 Result := Get VclListBox.Count;1863 Result := GetNativeListBox.Count; 1864 1864 end; 1865 1865 1866 1866 function TDpiListBox.GetExtendedSelect: Boolean; 1867 1867 begin 1868 Result := Get VclListBox.ExtendedSelect;1868 Result := GetNativeListBox.ExtendedSelect; 1869 1869 end; 1870 1870 1871 1871 function TDpiListBox.GetIntegralHeight: Boolean; 1872 1872 begin 1873 Result := Get VclListBox.IntegralHeight;1873 Result := GetNativeListBox.IntegralHeight; 1874 1874 end; 1875 1875 1876 1876 function TDpiListBox.GetItemHeight: Integer; 1877 1877 begin 1878 Result := Get VclListBox.ItemHeight;1878 Result := GetNativeListBox.ItemHeight; 1879 1879 end; 1880 1880 1881 1881 function TDpiListBox.GetItemIndex: Integer; 1882 1882 begin 1883 Result := Get VclListBox.ItemIndex;1883 Result := GetNativeListBox.ItemIndex; 1884 1884 end; 1885 1885 1886 1886 function TDpiListBox.GetItems: TStrings; 1887 1887 begin 1888 Result := Get VclListBox.Items;1888 Result := GetNativeListBox.Items; 1889 1889 end; 1890 1890 1891 1891 function TDpiListBox.GetParentFont: Boolean; 1892 1892 begin 1893 Result := Get VclListBox.ParentFont;1893 Result := GetNativeListBox.ParentFont; 1894 1894 end; 1895 1895 1896 1896 function TDpiListBox.GetScrollWidth: Integer; 1897 1897 begin 1898 Result := Get VclListBox.ScrollWidth;1898 Result := GetNativeListBox.ScrollWidth; 1899 1899 end; 1900 1900 1901 1901 function TDpiListBox.GetTopIndex: Integer; 1902 1902 begin 1903 Result := Get VclListBox.TopIndex;1903 Result := GetNativeListBox.TopIndex; 1904 1904 end; 1905 1905 1906 1906 procedure TDpiListBox.SetBorderStyle(AValue: TBorderStyle); 1907 1907 begin 1908 Get VclListBox.BorderStyle := AValue;1908 GetNativeListBox.BorderStyle := AValue; 1909 1909 end; 1910 1910 1911 1911 procedure TDpiListBox.SetExtendedSelect(AValue: Boolean); 1912 1912 begin 1913 Get VclListBox.ExtendedSelect := AValue;1913 GetNativeListBox.ExtendedSelect := AValue; 1914 1914 end; 1915 1915 1916 1916 procedure TDpiListBox.SetIntegralHeight(AValue: Boolean); 1917 1917 begin 1918 Get VclListBox.IntegralHeight := AValue;1918 GetNativeListBox.IntegralHeight := AValue; 1919 1919 end; 1920 1920 1921 1921 procedure TDpiListBox.SetItemHeight(AValue: Integer); 1922 1922 begin 1923 Get VclListBox.ItemHeight := AValue;1923 GetNativeListBox.ItemHeight := AValue; 1924 1924 end; 1925 1925 1926 1926 procedure TDpiListBox.SetItemIndex(AValue: Integer); 1927 1927 begin 1928 Get VclListBox.ItemIndex := AValue;1928 GetNativeListBox.ItemIndex := AValue; 1929 1929 end; 1930 1930 1931 1931 procedure TDpiListBox.SetItems(AValue: TStrings); 1932 1932 begin 1933 Get VclListBox.Items := AValue;1933 GetNativeListBox.Items := AValue; 1934 1934 end; 1935 1935 1936 1936 procedure TDpiListBox.SetParentFont(AValue: Boolean); 1937 1937 begin 1938 Get VclListBox.ParentFont := AValue;1938 GetNativeListBox.ParentFont := AValue; 1939 1939 end; 1940 1940 1941 1941 procedure TDpiListBox.SetScrollWidth(AValue: Integer); 1942 1942 begin 1943 Get VclListBox.ScrollWidth := AValue;1943 GetNativeListBox.ScrollWidth := AValue; 1944 1944 end; 1945 1945 1946 1946 procedure TDpiListBox.SetTopIndex(AValue: Integer); 1947 1947 begin 1948 Get VclListBox.TopIndex := AValue;1949 end; 1950 1951 function TDpiListBox.Get VclWinControl: TWinControl;1952 begin 1953 Result := Get VclListBox;1954 end; 1955 1956 function TDpiListBox.Get VclListBox: TListBox;1957 begin 1958 if not Assigned( VclListBox) then VclListBox := TListBox.Create(nil);1959 Result := VclListBox;1948 GetNativeListBox.TopIndex := AValue; 1949 end; 1950 1951 function TDpiListBox.GetNativeWinControl: TWinControl; 1952 begin 1953 Result := GetNativeListBox; 1954 end; 1955 1956 function TDpiListBox.GetNativeListBox: TListBox; 1957 begin 1958 if not Assigned(NativeListBox) then NativeListBox := TListBox.Create(nil); 1959 Result := NativeListBox; 1960 1960 end; 1961 1961 1962 1962 destructor TDpiListBox.Destroy; 1963 1963 begin 1964 FreeAndNil( VclListBox);1964 FreeAndNil(NativeListBox); 1965 1965 inherited Destroy; 1966 1966 end; … … 1968 1968 { TDpiPaintBox } 1969 1969 1970 function TDpiPaintBox.Get VclGraphicControl: TGraphicControl;1971 begin 1972 if not Assigned( VclPaintBox) then VclPaintBox := TPaintBox.Create(nil);1973 Result := VclPaintBox;1970 function TDpiPaintBox.GetNativeGraphicControl: TGraphicControl; 1971 begin 1972 if not Assigned(NativePaintBox) then NativePaintBox := TPaintBox.Create(nil); 1973 Result := NativePaintBox; 1974 1974 end; 1975 1975 … … 1978 1978 inherited; 1979 1979 Canvas := TDpiCanvas.Create; 1980 Canvas. VclCanvas := VclPaintBox.Canvas;1981 Canvas.Font. VclFont := VclPaintBox.Canvas.Font;1982 Update VclControl;1980 Canvas.NativeCanvas := NativePaintBox.Canvas; 1981 Canvas.Font.NativeFont := NativePaintBox.Canvas.Font; 1982 UpdateNativeControl; 1983 1983 ScreenChanged; 1984 1984 end; … … 1986 1986 destructor TDpiPaintBox.Destroy; 1987 1987 begin 1988 FreeAndNil( VclPaintBox);1988 FreeAndNil(NativePaintBox); 1989 1989 inherited; 1990 1990 end; … … 2006 2006 function TDpiCanvas.GetBrush: TBrush; 2007 2007 begin 2008 Result := Get VclCanvas.Brush;2008 Result := GetNativeCanvas.Brush; 2009 2009 end; 2010 2010 2011 2011 function TDpiCanvas.GetHandle: HDC; 2012 2012 begin 2013 Result := Get VclCanvas.Handle;2013 Result := GetNativeCanvas.Handle; 2014 2014 end; 2015 2015 2016 2016 function TDpiCanvas.GetHeight: Integer; 2017 2017 begin 2018 Result := ScaleFrom Vcl(GetVclCanvas.Height);2018 Result := ScaleFromNative(GetNativeCanvas.Height); 2019 2019 end; 2020 2020 2021 2021 function TDpiCanvas.GetPen: TPen; 2022 2022 begin 2023 Result := Get VclCanvas.Pen;2023 Result := GetNativeCanvas.Pen; 2024 2024 end; 2025 2025 2026 2026 function TDpiCanvas.GetPixel(X, Y: Integer): TColor; 2027 2027 begin 2028 Result := Get VclCanvas.Pixels[ScaleToVcl(X), ScaleToVcl(Y)];2028 Result := GetNativeCanvas.Pixels[ScaleToNative(X), ScaleToNative(Y)]; 2029 2029 end; 2030 2030 2031 2031 function TDpiCanvas.GetWidth: Integer; 2032 2032 begin 2033 Result := ScaleFrom Vcl(GetVclCanvas.Width);2033 Result := ScaleFromNative(GetNativeCanvas.Width); 2034 2034 end; 2035 2035 2036 2036 procedure TDpiCanvas.SetBrush(AValue: TBrush); 2037 2037 begin 2038 Get VclCanvas.Brush := AValue;2038 GetNativeCanvas.Brush := AValue; 2039 2039 end; 2040 2040 … … 2047 2047 procedure TDpiCanvas.SetHandle(AValue: HDC); 2048 2048 begin 2049 Get VclCanvas.Handle := AValue;2049 GetNativeCanvas.Handle := AValue; 2050 2050 end; 2051 2051 2052 2052 procedure TDpiCanvas.SetPen(AValue: TPen); 2053 2053 begin 2054 Get VclCanvas.Pen := AValue;2054 GetNativeCanvas.Pen := AValue; 2055 2055 end; 2056 2056 … … 2060 2060 BrushColor: TColor; 2061 2061 begin 2062 { BrushStyle := Get VclCanvas.Brush.Style;2063 BrushColor := Get VclCanvas.Brush.Color;2064 Get VclCanvas.Brush.Color := AValue;2065 Get VclCanvas.Brush.Style := bsClear;2066 Get VclCanvas.FillRect(ScaleToVcl(X), ScaleToVcl(Y), ScaleToVcl(X + 1) - 1, ScaleToVcl(Y + 1) - 1);2067 Get VclCanvas.Brush.Style := BrushStyle;2068 Get VclCanvas.Brush.Color := BrushColor;2062 { BrushStyle := GetNativeCanvas.Brush.Style; 2063 BrushColor := GetNativeCanvas.Brush.Color; 2064 GetNativeCanvas.Brush.Color := AValue; 2065 GetNativeCanvas.Brush.Style := bsClear; 2066 GetNativeCanvas.FillRect(ScaleToNative(X), ScaleToNative(Y), ScaleToNative(X + 1) - 1, ScaleToNative(Y + 1) - 1); 2067 GetNativeCanvas.Brush.Style := BrushStyle; 2068 GetNativeCanvas.Brush.Color := BrushColor; 2069 2069 } 2070 Get VclCanvas.Pixels[ScaleToVcl(X), ScaleToVcl(Y)] := AValue;2071 end; 2072 2073 procedure TDpiCanvas.Set VclCanvas(AValue: TCanvas);2074 begin 2075 if F VclCanvas = AValue then Exit;2076 F VclCanvas := AValue;2077 FFont. VclFont := FVclCanvas.Font;2078 end; 2079 2080 function TDpiCanvas.Get VclCanvas: TCanvas;2081 begin 2082 //if not Assigned( VclCanvas) then VclCanvas := TCanvas.Create;2083 Result := VclCanvas;2070 GetNativeCanvas.Pixels[ScaleToNative(X), ScaleToNative(Y)] := AValue; 2071 end; 2072 2073 procedure TDpiCanvas.SetNativeCanvas(AValue: TCanvas); 2074 begin 2075 if FNativeCanvas = AValue then Exit; 2076 FNativeCanvas := AValue; 2077 FFont.NativeFont := FNativeCanvas.Font; 2078 end; 2079 2080 function TDpiCanvas.GetNativeCanvas: TCanvas; 2081 begin 2082 //if not Assigned(NativeCanvas) then NativeCanvas := TCanvas.Create; 2083 Result := NativeCanvas; 2084 2084 end; 2085 2085 … … 2087 2087 ); 2088 2088 begin 2089 Get VclCanvas.StretchDraw(ScaleRectToVcl(DestRect), SrcGraphic.GetVclGraphic);2089 GetNativeCanvas.StretchDraw(ScaleRectToNative(DestRect), SrcGraphic.GetNativeGraphic); 2090 2090 end; 2091 2091 2092 2092 procedure TDpiCanvas.FrameRect(Rect: TRect); 2093 2093 begin 2094 Get VclCanvas.FrameRect(ScaleRectToVcl(Rect));2094 GetNativeCanvas.FrameRect(ScaleRectToNative(Rect)); 2095 2095 end; 2096 2096 2097 2097 procedure TDpiCanvas.Rectangle(X1, Y1, X2, Y2: Integer); 2098 2098 begin 2099 Get VclCanvas.Rectangle(ScaleToVcl(X1), ScaleToVcl(Y1), ScaleToVcl(X2), ScaleToVcl(Y2));2099 GetNativeCanvas.Rectangle(ScaleToNative(X1), ScaleToNative(Y1), ScaleToNative(X2), ScaleToNative(Y2)); 2100 2100 end; 2101 2101 … … 2107 2107 function TDpiCanvas.TextWidth(Text: string): Integer; 2108 2108 begin 2109 Result := ScaleFrom Vcl(GetVclCanvas.TextWidth(Text));2109 Result := ScaleFromNative(GetNativeCanvas.TextWidth(Text)); 2110 2110 end; 2111 2111 2112 2112 function TDpiCanvas.TextHeight(Text: string): Integer; 2113 2113 begin 2114 Result := ScaleFrom Vcl(GetVclCanvas.TextHeight(Text));2114 Result := ScaleFromNative(GetNativeCanvas.TextHeight(Text)); 2115 2115 end; 2116 2116 2117 2117 function TDpiCanvas.TextExtent(Text: string): TSize; 2118 2118 begin 2119 Result := ScaleSizeFrom Vcl(GetVclCanvas.TextExtent(Text));2119 Result := ScaleSizeFromNative(GetNativeCanvas.TextExtent(Text)); 2120 2120 end; 2121 2121 2122 2122 procedure TDpiCanvas.TextOut(X, Y: Integer; Text: string); 2123 2123 begin 2124 Get VclCanvas.TextOut(ScaleToVcl(X), ScaleToVcl(Y), Text);2124 GetNativeCanvas.TextOut(ScaleToNative(X), ScaleToNative(Y), Text); 2125 2125 end; 2126 2126 2127 2127 procedure TDpiCanvas.TextRect(ARect: TRect; X, Y: Integer; Text: string); 2128 2128 begin 2129 Get VclCanvas.TextRect(ARect, ScaleToVcl(X), ScaleToVcl(Y), Text);2129 GetNativeCanvas.TextRect(ARect, ScaleToNative(X), ScaleToNative(Y), Text); 2130 2130 end; 2131 2131 2132 2132 procedure TDpiCanvas.MoveTo(X, Y: Integer); 2133 2133 begin 2134 Get VclCanvas.MoveTo(ScaleToVcl(X), ScaleToVcl(Y));2134 GetNativeCanvas.MoveTo(ScaleToNative(X), ScaleToNative(Y)); 2135 2135 end; 2136 2136 2137 2137 procedure TDpiCanvas.LineTo(X, Y: Integer); 2138 2138 begin 2139 Get VclCanvas.LineTo(ScaleToVcl(X), ScaleToVcl(Y));2139 GetNativeCanvas.LineTo(ScaleToNative(X), ScaleToNative(Y)); 2140 2140 end; 2141 2141 2142 2142 procedure TDpiCanvas.FillRect(ARect: TRect); 2143 2143 begin 2144 Get VclCanvas.FillRect(ScaleRectToVcl(ARect));2144 GetNativeCanvas.FillRect(ScaleRectToNative(ARect)); 2145 2145 end; 2146 2146 2147 2147 procedure TDpiCanvas.FillRect(X1, Y1, X2, Y2: Integer); 2148 2148 begin 2149 Get VclCanvas.FillRect(ScaleToVcl(X1), ScaleToVcl(Y1), ScaleToVcl(X2), ScaleToVcl(Y2));2149 GetNativeCanvas.FillRect(ScaleToNative(X1), ScaleToNative(Y1), ScaleToNative(X2), ScaleToNative(Y2)); 2150 2150 end; 2151 2151 2152 2152 procedure TDpiCanvas.Draw(X, Y: Integer; Source: TDpiGraphic); 2153 2153 begin 2154 Get VclCanvas.Draw(ScaleToVcl(X), ScaleToVcl(Y), Source.GetVclGraphic);2154 GetNativeCanvas.Draw(ScaleToNative(X), ScaleToNative(Y), Source.GetNativeGraphic); 2155 2155 end; 2156 2156 … … 2158 2158 Source: TRect); 2159 2159 begin 2160 Get VclCanvas.CopyRect(Dest, SrcCanvas.VclCanvas, ScaleRectToVcl(Source));2160 GetNativeCanvas.CopyRect(Dest, SrcCanvas.NativeCanvas, ScaleRectToNative(Source)); 2161 2161 end; 2162 2162 … … 2191 2191 end; 2192 2192 2193 function TDpiGraphicControl.Get VclControl: TControl;2194 begin 2195 Result := Get VclGraphicControl;2196 end; 2197 2198 function TDpiGraphicControl.Get VclGraphicControl: TGraphicControl;2199 begin 2200 if not Assigned( VclGraphicControl) then begin2201 VclGraphicControl := TGraphicControl.Create(nil);2202 end; 2203 Result := VclGraphicControl;2204 end; 2205 2206 procedure TDpiGraphicControl.Update VclControl;2193 function TDpiGraphicControl.GetNativeControl: TControl; 2194 begin 2195 Result := GetNativeGraphicControl; 2196 end; 2197 2198 function TDpiGraphicControl.GetNativeGraphicControl: TGraphicControl; 2199 begin 2200 if not Assigned(NativeGraphicControl) then begin 2201 NativeGraphicControl := TGraphicControl.Create(nil); 2202 end; 2203 Result := NativeGraphicControl; 2204 end; 2205 2206 procedure TDpiGraphicControl.UpdateNativeControl; 2207 2207 begin 2208 2208 inherited; 2209 TGraphicControlEx(Get VclGraphicControl).OnPaint := @PaintHandler;2209 TGraphicControlEx(GetNativeGraphicControl).OnPaint := @PaintHandler; 2210 2210 end; 2211 2211 … … 2224 2224 inherited; 2225 2225 FCanvas := TDpiCanvas.Create; 2226 FCanvas. VclCanvas := GetVclGraphicControl.Canvas;2226 FCanvas.NativeCanvas := GetNativeGraphicControl.Canvas; 2227 2227 end; 2228 2228 … … 2240 2240 if FStretch = AValue then Exit; 2241 2241 FStretch := AValue; 2242 VclImage.Stretch := AValue;2242 NativeImage.Stretch := AValue; 2243 2243 end; 2244 2244 … … 2249 2249 end; 2250 2250 2251 function TDpiImage.Get VclControl: TControl;2252 begin 2253 if not Assigned( VclImage) then VclImage := TImage.Create(nil);2254 Result := VclImage;2251 function TDpiImage.GetNativeControl: TControl; 2252 begin 2253 if not Assigned(NativeImage) then NativeImage := TImage.Create(nil); 2254 Result := NativeImage; 2255 2255 end; 2256 2256 2257 2257 destructor TDpiImage.Destroy; 2258 2258 begin 2259 FreeAndNil( VclImage);2259 FreeAndNil(NativeImage); 2260 2260 inherited Destroy; 2261 2261 end; … … 2267 2267 if FSize = AValue then Exit; 2268 2268 FSize := AValue; 2269 Get VclFont.Size := AValue;2269 GetNativeFont.Size := AValue; 2270 2270 DoChange; 2271 2271 end; … … 2278 2278 procedure TDpiFont.SetStyle(AValue: TFontStyles); 2279 2279 begin 2280 Get VclFont.Style := AValue;2280 GetNativeFont.Style := AValue; 2281 2281 end; 2282 2282 … … 2286 2286 end; 2287 2287 2288 function TDpiFont.Get VclFont: TFont;2289 begin 2290 if not Assigned( VclFont) then VclFont := TFont.Create;2291 Result := VclFont;2288 function TDpiFont.GetNativeFont: TFont; 2289 begin 2290 if not Assigned(NativeFont) then NativeFont := TFont.Create; 2291 Result := NativeFont; 2292 2292 end; 2293 2293 … … 2300 2300 procedure TDpiFont.SetPixelsPerInch(AValue: Integer); 2301 2301 begin 2302 Get VclFont.PixelsPerInch := PixelsPerInch;2302 GetNativeFont.PixelsPerInch := PixelsPerInch; 2303 2303 end; 2304 2304 2305 2305 function TDpiFont.GetName: string; 2306 2306 begin 2307 Result := Get VclFont.Name;2307 Result := GetNativeFont.Name; 2308 2308 end; 2309 2309 2310 2310 function TDpiFont.GetColor: TColor; 2311 2311 begin 2312 Result := Get VclFont.Color;2312 Result := GetNativeFont.Color; 2313 2313 end; 2314 2314 2315 2315 function TDpiFont.GetCharSet: TFontCharSet; 2316 2316 begin 2317 Result := Get VclFont.CharSet;2317 Result := GetNativeFont.CharSet; 2318 2318 end; 2319 2319 2320 2320 function TDpiFont.GetHeight: Integer; 2321 2321 begin 2322 Result := Get VclFont.Height;2322 Result := GetNativeFont.Height; 2323 2323 end; 2324 2324 2325 2325 function TDpiFont.GetPixelsPerInch: Integer; 2326 2326 begin 2327 Result := Get VclFont.PixelsPerInch;2327 Result := GetNativeFont.PixelsPerInch; 2328 2328 end; 2329 2329 2330 2330 function TDpiFont.GetStyle: TFontStyles; 2331 2331 begin 2332 Result := Get VclFont.Style;2332 Result := GetNativeFont.Style; 2333 2333 end; 2334 2334 2335 2335 function TDpiFont.IsNameStored: Boolean; 2336 2336 begin 2337 Result := Get VclFont.Name <> 'default';2337 Result := GetNativeFont.Name <> 'default'; 2338 2338 end; 2339 2339 2340 2340 procedure TDpiFont.SetCharSet(AValue: TFontCharSet); 2341 2341 begin 2342 Get VclFont.CharSet := AValue;2342 GetNativeFont.CharSet := AValue; 2343 2343 end; 2344 2344 2345 2345 procedure TDpiFont.SetColor(AValue: TColor); 2346 2346 begin 2347 Get VclFont.Color := AValue;2347 GetNativeFont.Color := AValue; 2348 2348 end; 2349 2349 2350 2350 procedure TDpiFont.SetHeight(AValue: Integer); 2351 2351 begin 2352 Get VclFont.Height := AValue;2352 GetNativeFont.Height := AValue; 2353 2353 end; 2354 2354 2355 2355 procedure TDpiFont.SetName(AValue: string); 2356 2356 begin 2357 Get VclFont.Name := AValue;2357 GetNativeFont.Name := AValue; 2358 2358 end; 2359 2359 … … 2371 2371 begin 2372 2372 if Source is TDpiFont then begin 2373 Get VclFont.Assign((Source as TDpiFont).GetVclFont);2373 GetNativeFont.Assign((Source as TDpiFont).GetNativeFont); 2374 2374 Size := (Source as TDpiFont).Size; 2375 2375 FOnChange := (Source as TDpiFont).FOnChange; … … 2381 2381 function TDpiWinControl.GetHandle: HWND; 2382 2382 begin 2383 Result := Get VclWinControl.Handle;2383 Result := GetNativeWinControl.Handle; 2384 2384 end; 2385 2385 2386 2386 function TDpiWinControl.GetOnKeyDown: TKeyEvent; 2387 2387 begin 2388 Result := Get VclWinControl.OnKeyDown;2388 Result := GetNativeWinControl.OnKeyDown; 2389 2389 end; 2390 2390 2391 2391 function TDpiWinControl.GetOnKeyPress: TKeyPressEvent; 2392 2392 begin 2393 Result := Get VclWinControl.OnKeyPress;2393 Result := GetNativeWinControl.OnKeyPress; 2394 2394 end; 2395 2395 2396 2396 function TDpiWinControl.GetOnKeyUp: TKeyEvent; 2397 2397 begin 2398 Result := Get VclWinControl.OnKeyUp;2398 Result := GetNativeWinControl.OnKeyUp; 2399 2399 end; 2400 2400 2401 2401 function TDpiWinControl.GetTabOrder: TTabOrder; 2402 2402 begin 2403 Result := Get VclWinControl.TabOrder;2403 Result := GetNativeWinControl.TabOrder; 2404 2404 end; 2405 2405 2406 2406 function TDpiWinControl.GetTabStop: Boolean; 2407 2407 begin 2408 Result := Get VclWinControl.TabStop;2408 Result := GetNativeWinControl.TabStop; 2409 2409 end; 2410 2410 2411 2411 procedure TDpiWinControl.SetHandle(AValue: HWND); 2412 2412 begin 2413 Get VclWinControl.Handle := AValue;2413 GetNativeWinControl.Handle := AValue; 2414 2414 end; 2415 2415 2416 2416 procedure TDpiWinControl.SetOnKeyDown(AValue: TKeyEvent); 2417 2417 begin 2418 Get VclWinControl.OnKeyDown := AValue;2418 GetNativeWinControl.OnKeyDown := AValue; 2419 2419 end; 2420 2420 2421 2421 procedure TDpiWinControl.SetOnKeyPress(AValue: TKeyPressEvent); 2422 2422 begin 2423 Get VclWinControl.OnKeyPress := AValue;2423 GetNativeWinControl.OnKeyPress := AValue; 2424 2424 end; 2425 2425 2426 2426 procedure TDpiWinControl.SetOnKeyUp(AValue: TKeyEvent); 2427 2427 begin 2428 Get VclWinControl.OnKeyUp := AValue;2428 GetNativeWinControl.OnKeyUp := AValue; 2429 2429 end; 2430 2430 2431 2431 procedure TDpiWinControl.SetTabOrder(AValue: TTabOrder); 2432 2432 begin 2433 Get VclWinControl.TabOrder := AValue;2433 GetNativeWinControl.TabOrder := AValue; 2434 2434 end; 2435 2435 2436 2436 procedure TDpiWinControl.SetTabStop(AValue: Boolean); 2437 2437 begin 2438 Get VclWinControl.TabStop := AValue;2439 end; 2440 2441 function TDpiWinControl.Get VclControl: TControl;2442 begin 2443 Result := Get VclWinControl;2444 end; 2445 2446 function TDpiWinControl.Get VclWinControl: TWinControl;2438 GetNativeWinControl.TabStop := AValue; 2439 end; 2440 2441 function TDpiWinControl.GetNativeControl: TControl; 2442 begin 2443 Result := GetNativeWinControl; 2444 end; 2445 2446 function TDpiWinControl.GetNativeWinControl: TWinControl; 2447 2447 begin 2448 2448 Result := nil; … … 2487 2487 function TDpiScreen.GetWidth: Integer; 2488 2488 begin 2489 Result := ScaleFrom Vcl(Screen.Width);2489 Result := ScaleFromNative(Screen.Width); 2490 2490 end; 2491 2491 … … 2502 2502 function TDpiScreen.GetHeight: Integer; 2503 2503 begin 2504 Result := ScaleFrom Vcl(Screen.Height);2504 Result := ScaleFromNative(Screen.Height); 2505 2505 end; 2506 2506 … … 2578 2578 end; 2579 2579 2580 procedure TDpiScreen.UpdateActiveFormFrom VclScreen;2580 procedure TDpiScreen.UpdateActiveFormFromNativeScreen; 2581 2581 var 2582 2582 I: Integer; … … 2587 2587 for I := 0 to FormCount - 1 do begin 2588 2588 F := Forms[I]; 2589 if F.Get VclForm = Screen.ActiveForm then begin2589 if F.GetNativeForm = Screen.ActiveForm then begin 2590 2590 FActiveForm := F; 2591 2591 Break; … … 2597 2597 { TDpiButton } 2598 2598 2599 function TDpiButton.Get VclControl: TControl;2600 begin 2601 if not Assigned( VclButton) then VclButton := TButton.Create(nil);2602 Result := VclButton;2599 function TDpiButton.GetNativeControl: TControl; 2600 begin 2601 if not Assigned(NativeButton) then NativeButton := TButton.Create(nil); 2602 Result := NativeButton; 2603 2603 end; 2604 2604 2605 2605 destructor TDpiButton.Destroy; 2606 2606 begin 2607 FreeAndNil( VclButton);2607 FreeAndNil(NativeButton); 2608 2608 inherited; 2609 2609 end; … … 2620 2620 procedure TDpiControl.SetVisible(AValue: Boolean); 2621 2621 begin 2622 Get VclControl.Visible := AValue;2622 GetNativeControl.Visible := AValue; 2623 2623 end; 2624 2624 … … 2630 2630 end; 2631 2631 2632 function TDpiControl.Get VclControl: TControl;2632 function TDpiControl.GetNativeControl: TControl; 2633 2633 begin 2634 2634 Result := nil; 2635 2635 end; 2636 2636 2637 procedure TDpiControl.Update VclControl;2638 begin 2639 Font. VclFont := GetVclControl.Font;2640 Get VclControl.OnResize := @VclFormResize;2641 Get VclControl.OnChangeBounds := @VclChangeBounds;2642 TControlEx(Get VclControl).OnMouseDown := @MouseDownHandler;2643 TControlEx(Get VclControl).OnMouseUp := @MouseUpHandler;2644 TControlEx(Get VclControl).OnMouseMove := @MouseMoveHandler;2645 TControlEx(Get VclControl).OnMouseEnter := @MouseEnterHandler;2646 TControlEx(Get VclControl).OnMouseLeave := @MouseLeaveHandler;2647 TControlEx(Get VclControl).OnMouseWheel := @MouseWheelHandler;2637 procedure TDpiControl.UpdateNativeControl; 2638 begin 2639 Font.NativeFont := GetNativeControl.Font; 2640 GetNativeControl.OnResize := @NativeFormResize; 2641 GetNativeControl.OnChangeBounds := @NativeChangeBounds; 2642 TControlEx(GetNativeControl).OnMouseDown := @MouseDownHandler; 2643 TControlEx(GetNativeControl).OnMouseUp := @MouseUpHandler; 2644 TControlEx(GetNativeControl).OnMouseMove := @MouseMoveHandler; 2645 TControlEx(GetNativeControl).OnMouseEnter := @MouseEnterHandler; 2646 TControlEx(GetNativeControl).OnMouseLeave := @MouseLeaveHandler; 2647 TControlEx(GetNativeControl).OnMouseWheel := @MouseWheelHandler; 2648 2648 end; 2649 2649 … … 2651 2651 Shift: TShiftState; X, Y: Integer); 2652 2652 begin 2653 MouseDown(Button, Shift, ScaleFrom Vcl(X), ScaleFromVcl(Y));2654 if Assigned(FOnMouseDown) then FOnMouseDown(Self, Button, Shift, ScaleFrom Vcl(X), ScaleFromVcl(Y));2653 MouseDown(Button, Shift, ScaleFromNative(X), ScaleFromNative(Y)); 2654 if Assigned(FOnMouseDown) then FOnMouseDown(Self, Button, Shift, ScaleFromNative(X), ScaleFromNative(Y)); 2655 2655 end; 2656 2656 … … 2658 2658 Shift: TShiftState; X, Y: Integer); 2659 2659 begin 2660 MouseUp(Button, Shift, ScaleFrom Vcl(X), ScaleFromVcl(Y));2661 if Assigned(FOnMouseUp) then FOnMouseUp(Self, Button, Shift, ScaleFrom Vcl(X), ScaleFromVcl(Y));2660 MouseUp(Button, Shift, ScaleFromNative(X), ScaleFromNative(Y)); 2661 if Assigned(FOnMouseUp) then FOnMouseUp(Self, Button, Shift, ScaleFromNative(X), ScaleFromNative(Y)); 2662 2662 end; 2663 2663 … … 2665 2665 Y: Integer); 2666 2666 begin 2667 MouseMove(Shift, ScaleFrom Vcl(X), ScaleFromVcl(Y));2668 if Assigned(FOnMouseMove) then FOnMouseMove(Self, Shift, ScaleFrom Vcl(X), ScaleFromVcl(Y));2667 MouseMove(Shift, ScaleFromNative(X), ScaleFromNative(Y)); 2668 if Assigned(FOnMouseMove) then FOnMouseMove(Self, Shift, ScaleFromNative(X), ScaleFromNative(Y)); 2669 2669 end; 2670 2670 … … 2673 2673 begin 2674 2674 if Assigned(FOnMouseWheel) then FOnMouseWheel(Self, Shift, WheelDelta, 2675 ScalePointFrom Vcl(MousePos), Handled);2675 ScalePointFromNative(MousePos), Handled); 2676 2676 end; 2677 2677 … … 2712 2712 function TDpiControl.ScreenToClient(const APoint: TPoint): TPoint; 2713 2713 begin 2714 Result := ScalePointFrom Vcl(GetVclControl.ScreenToClient(ScalePointToVcl(APoint)));2714 Result := ScalePointFromNative(GetNativeControl.ScreenToClient(ScalePointToNative(APoint))); 2715 2715 end; 2716 2716 2717 2717 function TDpiControl.ClientToScreen(const APoint: TPoint): TPoint; 2718 2718 begin 2719 Result := ScalePointFrom Vcl(GetVclControl.ClientToScreen(ScalePointToVcl(APoint)));2719 Result := ScalePointFromNative(GetNativeControl.ClientToScreen(ScalePointToNative(APoint))); 2720 2720 end; 2721 2721 … … 2723 2723 const OnVisibleChangedEvent: TNotifyEvent; AsFirst: boolean); 2724 2724 begin 2725 Get VclControl.AddHandlerOnVisibleChanged(OnVisibleChangedEvent, AsFirst);2725 GetNativeControl.AddHandlerOnVisibleChanged(OnVisibleChangedEvent, AsFirst); 2726 2726 end; 2727 2727 … … 2729 2729 const OnVisibleChangedEvent: TNotifyEvent); 2730 2730 begin 2731 Get VclControl.RemoveHandlerOnVisibleChanged(OnVisibleChangedEvent);2731 GetNativeControl.RemoveHandlerOnVisibleChanged(OnVisibleChangedEvent); 2732 2732 end; 2733 2733 … … 2759 2759 procedure TDpiControl.Invalidate; 2760 2760 begin 2761 Get VclControl.Invalidate;2761 GetNativeControl.Invalidate; 2762 2762 end; 2763 2763 2764 2764 procedure TDpiControl.Repaint; 2765 2765 begin 2766 Get VclControl.Repaint;2766 GetNativeControl.Repaint; 2767 2767 end; 2768 2768 2769 2769 procedure TDpiControl.Update; 2770 2770 begin 2771 Get VclControl.Update;2771 GetNativeControl.Update; 2772 2772 end; 2773 2773 … … 2791 2791 if Assigned(TheOwner) and (TheOwner is TDpiWinControl) then 2792 2792 Parent := TDpiWinControl(TheOwner); 2793 Get VclControl;2794 Update VclControl;2793 GetNativeControl; 2794 UpdateNativeControl; 2795 2795 ScreenChanged; 2796 2796 end; … … 2812 2812 procedure TDpiControl.SetCaption(AValue: string); 2813 2813 begin 2814 Get VclControl.Caption := AValue;2814 GetNativeControl.Caption := AValue; 2815 2815 end; 2816 2816 … … 2821 2821 FParent.Controls.Remove(Self); 2822 2822 if Assigned(FParent) and (FParent is TDpiWinControl) then 2823 Get VclControl.Parent := nil;2823 GetNativeControl.Parent := nil; 2824 2824 end; 2825 2825 FParent := AValue; … … 2827 2827 FParent.Controls.Add(Self); 2828 2828 if Assigned(FParent) and (FParent is TDpiWinControl) then 2829 Get VclControl.Parent := TDpiWinControl(FParent).GetVclWinControl;2829 GetNativeControl.Parent := TDpiWinControl(FParent).GetNativeWinControl; 2830 2830 end; 2831 2831 end; … … 2839 2839 procedure TDpiControl.SetHint(AValue: string); 2840 2840 begin 2841 Get VclControl.Hint := AValue;2841 GetNativeControl.Hint := AValue; 2842 2842 end; 2843 2843 … … 2852 2852 function TDpiControl.GetAlign: TAlign; 2853 2853 begin 2854 Result := Get VclControl.Align;2854 Result := GetNativeControl.Align; 2855 2855 end; 2856 2856 2857 2857 function TDpiControl.GetAnchors: TAnchors; 2858 2858 begin 2859 Result := Get VclControl.Anchors;2859 Result := GetNativeControl.Anchors; 2860 2860 end; 2861 2861 2862 2862 function TDpiControl.GetClientHeight: Integer; 2863 2863 begin 2864 Result := ScaleFrom Vcl(GetVclControl.ClientHeight);2864 Result := ScaleFromNative(GetNativeControl.ClientHeight); 2865 2865 end; 2866 2866 2867 2867 function TDpiControl.GetClientWidth: Integer; 2868 2868 begin 2869 Result := ScaleFrom Vcl(GetVclControl.ClientWidth);2869 Result := ScaleFromNative(GetNativeControl.ClientWidth); 2870 2870 end; 2871 2871 2872 2872 function TDpiControl.GetColor: TColor; 2873 2873 begin 2874 Result := Get VclControl.Color;2874 Result := GetNativeControl.Color; 2875 2875 end; 2876 2876 2877 2877 function TDpiControl.GetCursor: TCursor; 2878 2878 begin 2879 Result := Get VclControl.Cursor;2879 Result := GetNativeControl.Cursor; 2880 2880 end; 2881 2881 2882 2882 function TDpiControl.GetEnabled: Boolean; 2883 2883 begin 2884 Result := Get VclControl.Enabled;2884 Result := GetNativeControl.Enabled; 2885 2885 end; 2886 2886 2887 2887 function TDpiControl.GetHint: string; 2888 2888 begin 2889 Result := Get VclControl.Hint;2889 Result := GetNativeControl.Hint; 2890 2890 end; 2891 2891 2892 2892 function TDpiControl.GetOnClick: TNotifyEvent; 2893 2893 begin 2894 Result := Get VclControl.OnClick;2894 Result := GetNativeControl.OnClick; 2895 2895 end; 2896 2896 2897 2897 function TDpiControl.GetShowHint: Boolean; 2898 2898 begin 2899 Result := Get VclControl.ShowHint;2899 Result := GetNativeControl.ShowHint; 2900 2900 end; 2901 2901 2902 2902 function TDpiControl.GetVisible: Boolean; 2903 2903 begin 2904 Result := Get VclControl.Visible;2904 Result := GetNativeControl.Visible; 2905 2905 end; 2906 2906 … … 2912 2912 procedure TDpiControl.SetAlign(AValue: TAlign); 2913 2913 begin 2914 Get VclControl.Align := AValue;2914 GetNativeControl.Align := AValue; 2915 2915 end; 2916 2916 2917 2917 procedure TDpiControl.SetAnchors(AValue: TAnchors); 2918 2918 begin 2919 Get VclControl.Anchors := AValue;2919 GetNativeControl.Anchors := AValue; 2920 2920 end; 2921 2921 … … 2927 2927 procedure TDpiControl.SetClientHeight(AValue: Integer); 2928 2928 begin 2929 Get VclControl.ClientHeight := ScaletoVcl(AValue);2929 GetNativeControl.ClientHeight := ScaleToNative(AValue); 2930 2930 end; 2931 2931 2932 2932 procedure TDpiControl.SetClientWidth(AValue: Integer); 2933 2933 begin 2934 Get VclControl.ClientWidth := ScaletoVcl(AValue);2934 GetNativeControl.ClientWidth := ScaleToNative(AValue); 2935 2935 end; 2936 2936 2937 2937 procedure TDpiControl.SetColor(AValue: TColor); 2938 2938 begin 2939 Get VclControl.Color := AValue;2939 GetNativeControl.Color := AValue; 2940 2940 end; 2941 2941 2942 2942 procedure TDpiControl.SetCursor(AValue: TCursor); 2943 2943 begin 2944 Get VclControl.Cursor := AValue;2944 GetNativeControl.Cursor := AValue; 2945 2945 end; 2946 2946 2947 2947 procedure TDpiControl.SetEnabled(AValue: Boolean); 2948 2948 begin 2949 Get VclControl.Enabled := AValue;2949 GetNativeControl.Enabled := AValue; 2950 2950 end; 2951 2951 … … 2958 2958 procedure TDpiControl.SetOnClick(AValue: TNotifyEvent); 2959 2959 begin 2960 Get VclControl.OnClick := AValue;2960 GetNativeControl.OnClick := AValue; 2961 2961 end; 2962 2962 … … 2969 2969 procedure TDpiControl.SetShowHint(AValue: Boolean); 2970 2970 begin 2971 Get VclControl.ShowHint := AValue;2972 end; 2973 2974 procedure TDpiControl. VclFormResize(Sender: TObject);2975 begin 2976 BoundsRect := ScaleRectFrom Vcl(GetVclControl.BoundsRect);2971 GetNativeControl.ShowHint := AValue; 2972 end; 2973 2974 procedure TDpiControl.NativeFormResize(Sender: TObject); 2975 begin 2976 BoundsRect := ScaleRectFromNative(GetNativeControl.BoundsRect); 2977 2977 DoFormResize; 2978 2978 end; 2979 2979 2980 procedure TDpiControl. VclChangeBounds(Sender: TObject);2980 procedure TDpiControl.NativeChangeBounds(Sender: TObject); 2981 2981 var 2982 2982 NewBounds: TRect; 2983 2983 begin 2984 NewBounds := ScaleRectFrom Vcl(GetVclControl.BoundsRect);2984 NewBounds := ScaleRectFromNative(GetNativeControl.BoundsRect); 2985 2985 if NewBounds <> BoundsRect then begin 2986 2986 BoundsRect := NewBounds; … … 3001 3001 function TDpiControl.GetCaption: string; 3002 3002 begin 3003 Result := Get VclControl.Caption;3003 Result := GetNativeControl.Caption; 3004 3004 end; 3005 3005 3006 3006 procedure TDpiControl.FontChanged(Sender: TObject); 3007 3007 begin 3008 Get VclControl.Font.Size := ScaleToVcl(Font.Size);3008 GetNativeControl.Font.Size := ScaleToNative(Font.Size); 3009 3009 end; 3010 3010 3011 3011 procedure TDpiControl.UpdateBounds; 3012 3012 begin 3013 Get VclControl.BoundsRect := ScaleRectToVcl(BoundsRect);3013 GetNativeControl.BoundsRect := ScaleRectToNative(BoundsRect); 3014 3014 end; 3015 3015 … … 3051 3051 function TDpiForm.GetBorderIcons: TBorderIcons; 3052 3052 begin 3053 Result := Get VclForm.BorderIcons;3053 Result := GetNativeForm.BorderIcons; 3054 3054 end; 3055 3055 3056 3056 function TDpiForm.GetBorderStyle: TFormBorderStyle; 3057 3057 begin 3058 Result := Get VclForm.BorderStyle;3058 Result := GetNativeForm.BorderStyle; 3059 3059 end; 3060 3060 3061 3061 function TDpiForm.GetDesignTimePPI: Integer; 3062 3062 begin 3063 Result := Get VclForm.DesignTimePPI;3063 Result := GetNativeForm.DesignTimePPI; 3064 3064 end; 3065 3065 3066 3066 function TDpiForm.GetFormState: TFormState; 3067 3067 begin 3068 Result := Get VclForm.FormState;3068 Result := GetNativeForm.FormState; 3069 3069 end; 3070 3070 3071 3071 function TDpiForm.GetFormStyle: TFormStyle; 3072 3072 begin 3073 Result := Get VclForm.FormStyle;3073 Result := GetNativeForm.FormStyle; 3074 3074 end; 3075 3075 3076 3076 function TDpiForm.GetKeyPreview: Boolean; 3077 3077 begin 3078 Result := Get VclForm.KeyPreview;3078 Result := GetNativeForm.KeyPreview; 3079 3079 end; 3080 3080 3081 3081 function TDpiForm.GetLCLVersion: string; 3082 3082 begin 3083 Result := Get VclForm.LCLVersion;3083 Result := GetNativeForm.LCLVersion; 3084 3084 end; 3085 3085 3086 3086 function TDpiForm.GetModalResult: TModalResult; 3087 3087 begin 3088 Result := Get VclForm.ModalResult;3088 Result := GetNativeForm.ModalResult; 3089 3089 end; 3090 3090 3091 3091 function TDpiForm.GetOnCloseQuery: TCloseQueryEvent; 3092 3092 begin 3093 Result := Get VclForm.OnCloseQuery;3093 Result := GetNativeForm.OnCloseQuery; 3094 3094 end; 3095 3095 3096 3096 function TDpiForm.GetOnCreate: TNotifyEvent; 3097 3097 begin 3098 Result := Get VclForm.OnCreate;3098 Result := GetNativeForm.OnCreate; 3099 3099 end; 3100 3100 3101 3101 function TDpiForm.GetOnDeactivate: TNotifyEvent; 3102 3102 begin 3103 Result := Get VclForm.OnDeactivate;3103 Result := GetNativeForm.OnDeactivate; 3104 3104 end; 3105 3105 3106 3106 function TDpiForm.GetOnDestroy: TNotifyEvent; 3107 3107 begin 3108 Result := Get VclForm.OnDestroy;3108 Result := GetNativeForm.OnDestroy; 3109 3109 end; 3110 3110 3111 3111 function TDpiForm.GetOnHide: TNotifyEvent; 3112 3112 begin 3113 Result := Get VclForm.OnHide;3113 Result := GetNativeForm.OnHide; 3114 3114 end; 3115 3115 3116 3116 function TDpiForm.GetOnShow: TNotifyEvent; 3117 3117 begin 3118 Result := Get VclForm.OnShow;3118 Result := GetNativeForm.OnShow; 3119 3119 end; 3120 3120 3121 3121 function TDpiForm.GetPosition: TPosition; 3122 3122 begin 3123 Result := Get VclForm.Position;3123 Result := GetNativeForm.Position; 3124 3124 end; 3125 3125 3126 3126 function TDpiForm.GetWindowState: TWindowState; 3127 3127 begin 3128 Result := Get VclForm.WindowState;3128 Result := GetNativeForm.WindowState; 3129 3129 end; 3130 3130 3131 3131 procedure TDpiForm.SetBorderIcons(AValue: TBorderIcons); 3132 3132 begin 3133 Get VclForm.BorderIcons := AValue;3133 GetNativeForm.BorderIcons := AValue; 3134 3134 end; 3135 3135 3136 3136 procedure TDpiForm.SetBorderStyle(AValue: TFormBorderStyle); 3137 3137 begin 3138 Get VclForm.BorderStyle := AValue;3138 GetNativeForm.BorderStyle := AValue; 3139 3139 end; 3140 3140 3141 3141 procedure TDpiForm.SetDesignTimePPI(AValue: Integer); 3142 3142 begin 3143 Get VclForm.DesignTimePPI := AValue;3143 GetNativeForm.DesignTimePPI := AValue; 3144 3144 end; 3145 3145 3146 3146 procedure TDpiForm.SetFormStyle(AValue: TFormStyle); 3147 3147 begin 3148 Get VclForm.FormStyle := AValue;3148 GetNativeForm.FormStyle := AValue; 3149 3149 end; 3150 3150 3151 3151 procedure TDpiForm.SetKeyPreview(AValue: Boolean); 3152 3152 begin 3153 Get VclForm.KeyPreview := AValue;3153 GetNativeForm.KeyPreview := AValue; 3154 3154 end; 3155 3155 3156 3156 procedure TDpiForm.SetLCLVersion(AValue: string); 3157 3157 begin 3158 Get VclForm.LCLVersion := AValue;3158 GetNativeForm.LCLVersion := AValue; 3159 3159 end; 3160 3160 3161 3161 procedure TDpiForm.SetModalResult(AValue: TModalResult); 3162 3162 begin 3163 Get VclForm.ModalResult := AValue;3163 GetNativeForm.ModalResult := AValue; 3164 3164 end; 3165 3165 3166 3166 procedure TDpiForm.SetOnCloseQuery(AValue: TCloseQueryEvent); 3167 3167 begin 3168 Get VclForm.OnCloseQuery := AValue;3168 GetNativeForm.OnCloseQuery := AValue; 3169 3169 end; 3170 3170 3171 3171 procedure TDpiForm.SetOnCreate(AValue: TNotifyEvent); 3172 3172 begin 3173 Get VclForm.OnCreate := AValue;3173 GetNativeForm.OnCreate := AValue; 3174 3174 end; 3175 3175 3176 3176 procedure TDpiForm.SetOnDeactivate(AValue: TNotifyEvent); 3177 3177 begin 3178 Get VclForm.OnDeactivate := AValue;3178 GetNativeForm.OnDeactivate := AValue; 3179 3179 end; 3180 3180 3181 3181 procedure TDpiForm.SetOnDestroy(AValue: TNotifyEvent); 3182 3182 begin 3183 Get VclForm.OnDestroy := AValue;3183 GetNativeForm.OnDestroy := AValue; 3184 3184 end; 3185 3185 3186 3186 procedure TDpiForm.SetOnHide(AValue: TNotifyEvent); 3187 3187 begin 3188 Get VclForm.OnHide := AValue;3188 GetNativeForm.OnHide := AValue; 3189 3189 end; 3190 3190 3191 3191 procedure TDpiForm.SetOnShow(AValue: TNotifyEvent); 3192 3192 begin 3193 Get VclForm.OnShow := AValue;3193 GetNativeForm.OnShow := AValue; 3194 3194 end; 3195 3195 3196 3196 procedure TDpiForm.DoOnCreate; 3197 3197 begin 3198 if Assigned(Get VclForm.OnCreate) then3199 Get VclForm.OnCreate(Self);3198 if Assigned(GetNativeForm.OnCreate) then 3199 GetNativeForm.OnCreate(Self); 3200 3200 end; 3201 3201 … … 3207 3207 procedure TDpiForm.SetPosition(AValue: TPosition); 3208 3208 begin 3209 Get VclForm.Position := AValue;3209 GetNativeForm.Position := AValue; 3210 3210 end; 3211 3211 3212 3212 procedure TDpiForm.SetWindowState(AValue: TWindowState); 3213 3213 begin 3214 Get VclForm.WindowState := AValue;3214 GetNativeForm.WindowState := AValue; 3215 3215 end; 3216 3216 … … 3225 3225 begin 3226 3226 DpiScreen.FActiveForm := DpiScreen.FActiveFormPrev; 3227 //DpiScreen.UpdateActiveFormFrom VclScreen;3227 //DpiScreen.UpdateActiveFormFromNativeScreen; 3228 3228 if Assigned(FOnDeactivate) then FOnDeactivate(Sender); 3229 3229 end; … … 3246 3246 procedure TDpiForm.CreateParams(var p: TCreateParams); 3247 3247 begin 3248 // TODO: VclForm.CreateParams(P);3248 // TODO: NativeForm.CreateParams(P); 3249 3249 end; 3250 3250 … … 3265 3265 end; 3266 3266 3267 function TDpiForm.Get VclScrollingWinControl: TScrollingWinControl;3268 begin 3269 Result := Get VclForm;3270 end; 3271 3272 function TDpiForm.Get VclForm: TForm;3273 begin 3274 if not Assigned( VclForm) then begin3275 VclForm := TFormEx.CreateNew(nil);3276 ( VclForm as TFormEx).OnMessage := @FormMessageHandler;3277 // VclForm := TForm.Create(nil);3278 end; 3279 Result := VclForm;3280 end; 3281 3282 procedure TDpiForm.Update VclControl;3267 function TDpiForm.GetNativeScrollingWinControl: TScrollingWinControl; 3268 begin 3269 Result := GetNativeForm; 3270 end; 3271 3272 function TDpiForm.GetNativeForm: TForm; 3273 begin 3274 if not Assigned(NativeForm) then begin 3275 NativeForm := TFormEx.CreateNew(nil); 3276 (NativeForm as TFormEx).OnMessage := @FormMessageHandler; 3277 //NativeForm := TForm.Create(nil); 3278 end; 3279 Result := NativeForm; 3280 end; 3281 3282 procedure TDpiForm.UpdateNativeControl; 3283 3283 begin 3284 3284 inherited; 3285 Get VclForm.OnActivate := @ActivateHandler;3286 Get VclForm.OnDeactivate := @DeactivateHandler;3287 Get VclForm.OnClose := @CloseHandler;3288 Get VclForm.OnCloseQuery := @CloseQueryHandler;3289 Get VclForm.Name := Name + 'Vcl';3285 GetNativeForm.OnActivate := @ActivateHandler; 3286 GetNativeForm.OnDeactivate := @DeactivateHandler; 3287 GetNativeForm.OnClose := @CloseHandler; 3288 GetNativeForm.OnCloseQuery := @CloseQueryHandler; 3289 GetNativeForm.Name := Name + 'Native'; 3290 3290 end; 3291 3291 … … 3298 3298 function TDpiForm.ShowModal: Integer; 3299 3299 begin 3300 Result := Get VclForm.ShowModal;3300 Result := GetNativeForm.ShowModal; 3301 3301 end; 3302 3302 … … 3358 3358 procedure TDpiForm.BringToFront; 3359 3359 begin 3360 Get VclForm.BringToFront;3360 GetNativeForm.BringToFront; 3361 3361 end; 3362 3362 … … 3383 3383 end; 3384 3384 ScreenChanged; 3385 Update VclControl;3385 UpdateNativeControl; 3386 3386 end; 3387 3387 … … 3395 3395 begin 3396 3396 // TODO: Can't destroy directly? 3397 //FreeAndNil( VclForm);3397 //FreeAndNil(NativeForm); 3398 3398 DpiScreen.RemoveForm(Self); 3399 3399 end; … … 3401 3401 initialization 3402 3402 3403 RegisterPropertyToSkip(TDpiForm, 'OldCreateOrder', ' VCLcompatibility property', '');3404 RegisterPropertyToSkip(TDpiForm, 'TextHeight', ' VCLcompatibility property', '');3405 RegisterPropertyToSkip(TDpiForm, 'Scaled', ' VCLcompatibility property', '');3406 RegisterPropertyToSkip(TDpiForm, 'TransparentColorValue', ' VCLcompatibility property', '');3403 RegisterPropertyToSkip(TDpiForm, 'OldCreateOrder', 'Native compatibility property', ''); 3404 RegisterPropertyToSkip(TDpiForm, 'TextHeight', 'Native compatibility property', ''); 3405 RegisterPropertyToSkip(TDpiForm, 'Scaled', 'Native compatibility property', ''); 3406 RegisterPropertyToSkip(TDpiForm, 'TransparentColorValue', 'Native compatibility property', ''); 3407 3407 DpiScreen := TDpiScreen.Create; 3408 3408 DpiApplication := TDpiApplication.Create(nil);
Note:
See TracChangeset
for help on using the changeset viewer.