-        button = wxButton(panel, 1003, "Close Me")
-        button.SetPosition(wxPoint(15, 15))
-        EVT_BUTTON(self, 1003, self.OnCloseMe)
-        EVT_CLOSE(self, self.OnCloseWindow)
+        wx.MiniFrame.__init__(self, parent, -1, title, pos, size, style)
+        panel = wx.Panel(self, -1)
+
+        button = wx.Button(panel, -1, "Close Me")
+        button.SetPosition((15, 15))
+        self.Bind(wx.EVT_BUTTON, self.OnCloseMe, button)
+        self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)