I'm use this code for get pressure property but does not work. Why GetPointerPenInfo function return false?
LastError function return 87 (incorrect parameter)
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Winapi.wmPointer, Vcl.StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
private
{ Private declarations }
public
{ Public declarations }
procedure PenEvent(var msg: TWMPointerUpdate); message WM_POINTERUPDATE;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ TForm1 }
{ TForm1 }
procedure TForm1.PenEvent(var msg: TWMPointerUpdate);
var
pInfo: PPointerPenInfo;
begin
if GetPointerPenInfo(msg.pointerId, pInfo) then
Label1.Caption := inttostr(pInfo.pressure);
end;
end.