AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein GUI-Design mit VCL / FireMonkey / Common Controls Seltsames Drag&Drop Problem in Firemonkey seit Delphi 10.42
Thema durchsuchen
Ansicht
Themen-Optionen

Seltsames Drag&Drop Problem in Firemonkey seit Delphi 10.42

Ein Thema von SpockHH · begonnen am 1. Mai 2021 · letzter Beitrag vom 1. Mai 2021
Antwort Antwort
jziersch

Registriert seit: 9. Okt 2003
Ort: München
258 Beiträge
 
Delphi 10.4 Sydney
 
#1

AW: Seltsames Drag&Drop Problem in Firemonkey seit Delphi 10.42

  Alt 1. Mai 2021, 14:39
In dem DragOver handler brauchst Du diesen code:

Scale := WindowHandleToPlatform(FForm.Handle).Scale; // JZ
P.X := Round( P.X / Scale );
P.Y := Round( P.Y / Scale );

Siehe auch: https://quality.embarcadero.com/browse/RSP-33045
und meinen fix hier https://quality.embarcadero.com/browse/RSP-33733
WPCubed GmbH
Komponenten für Delphi:
WPTools, wPDF, WPViewPDF
  Mit Zitat antworten Zitat
SpockHH

Registriert seit: 17. Apr 2019
Ort: Hamburg
4 Beiträge
 
Delphi 10.4 Sydney
 
#2

AW: Seltsames Drag&Drop Problem in Firemonkey seit Delphi 10.42

  Alt 1. Mai 2021, 18:48
Hallo jziersch,

Deine Lösung funktioniert zwar nicht (DragOver wird ja gar erst ausgelöst), aber Du hast mich auf die richtige Spur gebracht. Vielen Dank dafür.

Man muss die Unit FMX.Platform.Win modifizieren, hier der geänderte Codeschnipsel (Änderungen sind mit "// nol+" gekennzeichnet):

function TWinDropTarget.DragOver(grfKeyState: Longint; pt: TPoint; var dwEffect: Longint): HRESULT;
var
P: TPointF;
Operation: TDragOperation;
LScale: single; // nol+
begin
Result := E_UNEXPECTED;
try
dwEffect := DROPEFFECT_NONE;
P := PointF(pt.X, pt.Y);

// nol+ begin
LScale := WindowHandleToPlatform(Form.Handle).Scale; // var LScale: single;
P.X := Round( P.X / LScale );
P.Y := Round( P.Y / LScale );
// nol+ end
Arnd
  Mit Zitat antworten Zitat
Antwort Antwort

 

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:04 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz