Now that all dialogs have title bars, and most have close icons,
we need to handle the EVT_CLOSE event.  We can no longer call
self.Close() from self.onEnter(), because that could cause
infinite recursion, so we are calling self.EndModal(wx.ID_OK)
and self.EndModal(wx.ID_CANCEL) instead.