Guten Morgen Ben,
das ClipBoard-Format von EasyGPS ist
XML. Ich kann es so auslesen:
Delphi-Quellcode:
uses
ClipBrd,
Msxml2;
const
CF_GPX = 49628;
function LoadXmlFromClipboard(doc: IXMLDOMDocument2; cf: Word): Boolean;
var
ch: THandle;
pwc: PWideChar;
begin
Result := ClipBoard.HasFormat(cf);
if Result then
begin
ClipBoard.Open;
try
ch := Clipboard.GetAsHandle(cf);
pwc := GlobalLock(ch);
Result := doc.loadXML(WideCharToString(pwc));
GlobalUnlock(ch);
finally
Clipboard.Close;
end;
end;
end;
procedure TDemoForm.ButtonClick(Sender: TObject);
var
doc: IXMLDOMDocument2;
begin
doc := CoDOMDocument40.Create;
doc.async := False;
if LoadXmlFromClipboard(doc, CF_GPX) then
ShowMessage(doc.xml);
doc := nil;
end;
Grüße vom marabu