procedure TMyWin.HandleButtonFind(var Msg: TMessage);
var
   reply : integer;
   pStr  : pStrType;                                              
   Key   : String;
   Position : integer;
begin
     if (not IsEmpty(CheckBook)) then
        begin
             StrPCopy(pStr, '');
             reply := (Application^.ExecDialog(New(PInputDialog,
                       Init(@self, 'Find PayTo','Enter string to find:', pStr, sizeOf(Key)))));
             if (reply = id_OK) then
                begin
                     Key := StrPas(pStr);
                     FindPayTo(CheckBook, Key, Position);
                     if (Position > 0) then
                         LB^.SetSelIndex(Position - 1)
                     else
                         MessageBox(HWindow,'Not Found', 'Info', mb_OK + mb_IconInformation);
                end
        end
     else
         MessageBox(HWindow,'No checks available for searching','Warning',mb_OK + mb_IconInformation);
end;