When do cheque-based funds officially change hands?

From a legal POV, is an amount paid by cheque considered to have changed hands with the cheque itself or when the funds clear?
i.e. if the payee cancels a cheque before it clears, has he taken the money back or prevented the money from being given?