I take what happens on Stack Exchange as example.
When you used all your votes to close questions, the dialog box is still shown, and (if you select the question that is duplicated) the "Vote To Close" button is enabled.
What would be better?
- Enable it as it happens now, and show an error message if the user click on that button
- Keep the button disabled, and show an error message directly on the dialog box
- Highlight the part of the dialog box showing the number of votes the user has
- Avoid showing the dialog box to close the question, and show the message error directly.