[−][src]Function native_windows_gui::bind_event_handler
pub fn bind_event_handler<F>(
handle: &ControlHandle,
parent_handle: &ControlHandle,
f: F
) -> EventHandler where
F: Fn(Event, EventData, ControlHandle) + 'static,
Hook the window subclass with the default event dispatcher. The hook is applied to the control and its parent. All common controls send their events to their parent.
Arguments: - handle: Handle to the main control to hook - parent_handle: Parent to the main control. - f: User event callback
Returns a EventHandler
that can be passed to unbind_event_handler
to remove the callbacks.