0

According this question CustomPage for Serial Number in Inno Setup, I already realized the serial number pasting by "Ctr+C" and "Ctr+V". Now I need to paste the serial number by right-click the mouse and paste.

Can I add a wndproc in the edit so that I can catch the WM_PASTE message?

Community
  • 1
  • 1
XHLin
  • 301
  • 1
  • 3
  • 13

1 Answers1

0

Change the code from previous answer like this:

procedure OnSerialEditChange(Sender: TObject);
var
  Edit: TEdit;
  EditIndex: Integer;

begin
  Edit := TEdit(Sender);
  EditIndex := Edit.TabOrder - SerialEdits[0].TabOrder;

  if ((EditIndex = 0) and (IsValidInput = False)) then
  begin
    TryPasteSerialNumber;
  end;

  WizardForm.NextButton.Enabled := IsValidInput;
end;
Slappy
  • 5,250
  • 1
  • 23
  • 29
  • Thank you for your answer. But it doesn't solve my problem yet, I need to paste the serial number when I right-click the edit and click the "paste" option on the popup menu. – XHLin Jan 21 '17 at 07:37