2) Click on the Event Handlers tab, and put a check mark into the first
box, which should be wxEVT_INIT_DIALOG. This will create a function
called OnInitDialog() in the dialog class.
3) Make sure at least one button has a given name (rather than an
automatically generated name) by entering that name into the "Name"
field associated with the button. Let's say that button name is, for
example, m_CloseButton. Save the project and this regenerates the C++ code.
4) In the C++ code make sure your OnInitDialog() function has a line
with the "SetFocus()" call, like this:
void dialog_freeroute_exchange::OnInitDialog( wxInitDialogEvent& event )
{
m_CloseButton->SetFocus(); // <----add this line
////@begin wxEVT_INIT_DIALOG event handler for
ID_DIALOG_FREEROUTE_EXCHANGE in dialog_freeroute_exchange.
// Before editing this code, remove the block markers.
event.Skip();
////@end wxEVT_INIT_DIALOG event handler for
ID_DIALOG_FREEROUTE_EXCHANGE in dialog_freeroute_exchange.
}