Am I meant to derive a class from wxDialog and use that somehow with the resource file dialog_connect.xrc?
That is one way to do it. You can use LoadOnDialog to load the resource on an existing dialog instance that has the event handlers setup the way you want (presumably the handlers for the buttons will call EndModal):
res.LoadOnDialog(myDlg, parent, "DLG_CONNECT")
Or you can ensure that the ID's you use for the buttons are the standard wxID_OK and wxID_CANCEL and then it will use the default EVT_BUTTON handlers for those IDs and you can just check for them as the return values of ShowModal.
ยทยทยท
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!