예제 #1
0
// wxTextCtrl doesn't provide a handler for urls, so we use an almost
// undocumented event handler provided by wx
void dlgAbout::OnTxtCtrlUrlClick(wxTextUrlEvent &event)
{
    wxString URL;
    wxTextCtrl *Control;
    wxMouseEvent MouseEvent;
       
    MouseEvent = event.GetMouseEvent();
    
    if (MouseEvent.LeftDown())
    {
        Control = wxDynamicCast(event.GetEventObject(), wxTextCtrl);
        
        URL = Control->GetRange(event.GetURLStart(), event.GetURLEnd());
    
        wxLaunchDefaultBrowser(URL);
    
        event.Skip();
    }
}
예제 #2
0
void wxTerminal::OnURL(wxTextUrlEvent& event) { event.Skip(); }