Einzelnen Beitrag anzeigen

Hofes

Registriert seit: 11. Apr 2019
10 Beiträge
 
Delphi 10.3 Rio
 
#14

AW: WM_TOUCH und GetTouchInputInfo

  Alt 11. Apr 2019, 15:13
Ich hoffe das ist das was du meintest.
Bekomme beim touchen dann genau das hier raus:


(0021DB2D){MultiTouch.exe} [0061EB2D] Unknown function at TMethodImplementationIntercept + $1583FD
(0021BD1F){MultiTouch.exe} [0061CD1F] Unknown function at TMethodImplementationIntercept + $1565EF
(0021DB38){MultiTouch.exe} [0061EB38] Unknown function at TMethodImplementationIntercept + $158408
//hier wird gettouchinputinfo() ausgeführt
(0021DB2D){MultiTouch.exe} [0061EB2D] Unknown function at TMethodImplementationIntercept + $1583FD
(0021BD1F){MultiTouch.exe} [0061CD1F] Unknown function at TMethodImplementationIntercept + $1565EF
(0021DB38){MultiTouch.exe} [0061EB38] Unknown function at TMethodImplementationIntercept + $158408

Der Vorgang wurde erfolgreich beendet



Code:
procedure TForm1.AppMessage(var Msg: tagMSG; var Handled: Boolean);
var
  le: DWORD;
  i: integer;
  lp: HTOUCHINPUT;
begin
  if Msg.message = WM_TOUCH then
  begin
    Handled := false;
    lp := Msg.lParam;
    SetLength(touchinput, Msg.wParam);
    Memo1.Clear;
    SetLastError(0);
    Memo1.Lines.Add(GetCurrentStack);
    succes := GetTouchInputInfo(lp, UINT(Msg.wParam), @touchinput[0], SizeOf(TTouchinput));
    Memo1.Lines.Add(GetCurrentStack);
    if succes then
    begin
      Memo1.Lines.Add('suceeded: ' + BoolToStr(succes));
      Memo1.Lines.Add('msg.wparam: ' + IntToStr(Msg.wParam));
      Memo1.Lines.Add('msg.lparam: ' + IntToStr(Msg.lParam));
      Memo1.Lines.Add('msg.lparam: ' + IntToStr(lp));
      Memo1.Lines.Add('msg.hwnd: ' + IntToStr(Msg.hwnd));

      for i := 0 to Msg.wParam - 1 do
      begin
        Memo1.Lines.Add(IntToStr(touchinput[i].cxContact));
        Memo1.Lines.Add(IntToStr(touchinput[i].cyContact));
      end;
      Handled := true;
    end
    else
    begin
      Memo1.Lines.Add(SysErrorMessage(GetLastError));
    end;

    if Handled then
    begin
      CloseTouchInputHandle(lp);
    end;
  end;
end;
  Mit Zitat antworten Zitat