Scaling Theory for Finite-Size Effects in the Critical Region