+void wxGenericDirCtrl::OnTreeSelChange(wxTreeEvent &event)
+{
+ wxTreeEvent changedEvent(wxEVT_COMMAND_DIRCTRL_CHANGED, GetId());
+
+ changedEvent.SetEventObject(this);
+ changedEvent.SetItem(event.GetItem());
+ changedEvent.SetClientObject(m_treeCtrl->GetItemData(event.GetItem()));
+
+ if (GetEventHandler()->SafelyProcessEvent(changedEvent) && !changedEvent.IsAllowed())
+ {
+ event.Veto();
+ }
+ else
+ {
+ event.Skip();
+ }
+}
+