I think the way you handled it was perfect. We don't want to discourage users from posting, but we also want to make sure we keep the site full of good, useful information. Downvoting a user who consistently doesn't provide a good question is a good way to show them what they are doing is incorrect but it doesn't remove their question from everyone's view.
I searched for a bit and couldn't really find anything related to this, but I had an idea that maybe we should provide new users some sort of consolidated feedback on what we as a community expect their questions to be like. Using that as inspiration, I started this thread - Tips and Tricks for Asking a Good Question? - to discuss tips and tricks we can give users. Hopefully in future situations like this we can link to a thread like that and have the user get a wealth of information to provide us a perfect question which in turn will enable us to provide a perfect answer.