[wxMSW,WXGTK] Modeless dialog, how to handle OK event
Carsten A. Arnholm
arnholm at offline.no
Sat Sep 29 15:12:46 PDT 2007
Hi,
I have a dialog which is always modeless
MyDialog* dialog = new MyDialog(this);
dialog->Show();
During creation this dialog calls CreateButtons(wxOK|wxCANCEL);
to create an OK and a Cancel button
What is the proper way to handle OK being pushed, so a different action from
what happens when Cancel is pushed can be taken?
I have done this in MyDialog
Connect(wxID_OK,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&MyDialog::OnOk);
And it seems to work. But I wonder if this is the proper way.
--
Carsten A. Arnholm
http://arnholm.org/
N59.776 E10.457
More information about the wx-users
mailing list