I have a problem on using a wxDialog derived class:
I've created a small dialog witch is showing a few buttons.
When I click on a button, it makes a SetReturnCode(...) and the, hides the dialog.
Code: Select all
void MyDialog::OnButtonClick(wxCommandEvent& event)
{
SetReturnCode(10); // for example
Hide();
}
Code: Select all
void MyFrame::ShowDialog()
{
MyDialog* dlg=new MyDialog(this);
int iRet=dlg->ShowModal();
....................................
delete dlg;
}
Under windows, the returned value is the correct one (10 in this example)
Is it a bug , or a known issue, or am I making a coding error ?
Thanks for your replies...