Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagedelphi
titleDelphi
linenumberstrue
const WM_PADBUTTON_PRESS      = WM_USER + $20A$0012;

type
  TMainForm = class(TForm)
		...
		StepOverSignatureDevice1: TStepOverSignatureDevice;
		...
		procedure StepOverSignatureDevice1DeviceButtonEx(Sender: TObject;  ButtonEvent, LParam: Integer);
	private:
		procedure OnPadButtonPress(var Msg: TMessage);                  message WM_PADBUTTON_PRESS;
	...
end;

procedure TEsoMainForm.StepOverSignatureDevice1DeviceButtonEx(Sender: TObject; ButtonEvent, LParam: Integer);
begin
    // do not block this message !, so we send ourself a new message
    PostMessage(Handle, WM_PADBUTTON_PRESS, ButtonEvent, LParam);
end;

procedure TEsoMainForm.OnPadButtonPress(var Msg: TMessage);
var
    padmode     : Integer;
    buttoncode  : Integer;
    ButtonEvent : Cardinal;
begin
    ButtonEvent := Msg.WParam;

    buttoncode  := (Cardinal(ButtonEvent) shr 16) and $0000FFFF;
    padmode     :=  Cardinal(ButtonEvent)         and $0000FFFF;

    // Check for ID    
    case ID of       
        206: begin	//  OK Button
             end;
                
		207: begin	//  Repeat Button
			 end;
                
		208: begin  //  Abort Button
             end;       
	 end;
end;

...