pub fn main_window(pid: u32) -> Result<WindowHandle>Expand description
Returns the main window of process pid.
For a classic application that is its visible, unowned top-level window. A packaged (UWP)
app has no such window: the frame that hosts it belongs to ApplicationFrameHost.exe, so
the frame containing a window of pid is returned instead. Closing that frame closes the
app, exactly like its close button.