Trait winsafe::prelude::GuiChildFocus
source · pub trait GuiChildFocus: GuiChild {
// Provided method
fn focus(&self) { ... }
}
Available on crate features
kernel
and gui
only.Expand description
Any child window which can be focused.
Prefer importing this trait through the prelude:
use winsafe::prelude::*;
Provided Methods§
sourcefn focus(&self)
fn focus(&self)
In a raw, ordinary window, simply calls
HWND:SetFocus
.
In a dialog window, sends a
wm::NextDlgCtl
message. This is preferable to the HWND::SetFocus
because it takes care of border highlighting, like the native
Button
control needs.