+void MyFrame::OnOpenURL(wxCommandEvent& WXUNUSED(event))
+{
+ static wxString s_filename;
+
+ wxString filename = wxGetTextFromUser
+ (
+ _T("Enter the URL"),
+ _T("exec sample"),
+ s_filename,
+ this
+ );
+
+ if ( filename.empty() )
+ return;
+
+ s_filename = filename;
+
+ if ( !wxLaunchDefaultBrowser(s_filename) )
+ wxLogError(_T("Failed to open URL \"%s\""), s_filename.c_str());
+}
+