void PostEvent(int type, wxString str = wxEmptyString) { wxCommandEvent eventCustom(ENUM_CUSTOMEVENT_REFRESH); eventCustom.SetInt(type); if (!str.IsEmpty()) eventCustom.SetString(str); wxPostEvent(m_pWindows->GetEventHandler(), eventCustom); }
void CMusikListCtrl::FireListSelChanged(wxListEvent &event) { if(!m_bSuppressListItemStateEvents &&!m_bLISTSEL_CHANGED_Fired ) { m_bLISTSEL_CHANGED_Fired = true; wxCommandEvent eventCustom(wxEVT_LISTSEL_CHANGED_COMMAND); if(((wxLC_SINGLE_SEL & GetWindowStyle()) == wxLC_SINGLE_SEL) || (wxLIST_STATE_SELECTED & GetItemState(event.GetIndex(),wxLIST_STATE_SELECTED)) == wxLIST_STATE_SELECTED) { eventCustom.SetInt(event.GetIndex()); } else { long i = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); eventCustom.SetInt(i); } eventCustom.SetId(event.GetId()); wxPostEvent(this,eventCustom); } }
void CStaticText::OnClickEvent(wxMouseEvent& /*arEvent*/) { wxCommandEvent eventCustom(wxEVT_MY_CUSTOM_COMMAND); wxPostEvent(this, eventCustom); }
void TestFrame::OnFireCustom_2(wxCommandEvent& WXUNUSED(event)) { wxCommandEvent eventCustom(wxEVT_MY_CUSTOM_COMMAND); wxPostEvent(this, eventCustom); }