procedure TMyWin.HandleButtonDelete(var Msg: TMessage);
var
   SelectedItem : integer;
   pStr : pStrType;
   reply : integer;
begin
     SelectedItem := LB^.GetSelIndex;
     if (LB^.GetSelString(pStr,2) > 0) then
        begin
             reply := MessageBox(HWindow,'Really delete ?','Delete Item',mb_OKCancel + mb_IconQuestion);
             if (reply = id_OK) then
                begin
                     Findith(CheckBook, SelectedItem + 1);
                     Delete(CheckBook);
                     RedoListBox;
                     isDirty := true;
                end;
        end
     else
         MessageBox(HWindow,'Please select an item first','Warning',mb_OK + mb_IconStop);
end;