Generalized Dyck paths of bounded height