"20. In child custody matters, the ordinary remedy lies only under the Hindu Minority and Guardianship Act or the Guardians and Wards Act as the case may be. In cases arising out of the proceedings under the Guardians and Wards Act, the jurisdiction of the court is determined by whether the minor ordinarily resides within the area on which the court exercises such jurisdiction. There are significant differences between the enquiry under the Guardians and Wards Act and the exercise of powers by a writ court which is of summary in nature. What is important is the welfare of the child. In the writ court, rights are determined only on the basis of affidavits. Where the court is of the view that a detailed enquiry is required, the court may decline to exercise the extraordinary jurisdiction and direct the parties to approach the civil court. It is only in exceptional cases, the rights of the parties to the custody of the minor will be determined in exercise of extraordinary jurisdiction on a petition for habeas corpus."