handle CTRL_CLOSE_EVENT
Merge pull request #25 from southly/ctrl-close-event

handle CTRL_CLOSE_EVENT