+void wxGenericHyperlinkCtrl::ConnectMenuHandlers()
+{
+ // Connect the event handlers for the context menu.
+ Connect( wxEVT_RIGHT_UP, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnRightUp) );
+ Connect( wxHYPERLINK_POPUP_COPY_ID, wxEVT_MENU,
+ wxCommandEventHandler(wxGenericHyperlinkCtrl::OnPopUpCopy) );
+}
+
+wxSize wxGenericHyperlinkCtrl::DoGetBestClientSize() const
+{
+ wxClientDC dc((wxWindow *)this);
+ return dc.GetTextExtent(GetLabel());