pub trait WindowExtWindows {
    // Required methods
    fn hinstance(&self) -> HINSTANCE;
    fn hwnd(&self) -> HWND;
    fn set_enable(&self, enabled: bool);
    fn set_taskbar_icon(&self, taskbar_icon: Option<Icon>);
    fn set_skip_taskbar(&self, skip: bool);
    fn set_undecorated_shadow(&self, shadow: bool);
}
Available on windows_platform only.
Expand description

Additional methods on Window that are specific to Windows.

Required Methods§

source

fn hinstance(&self) -> HINSTANCE

Returns the HINSTANCE of the window

source

fn hwnd(&self) -> HWND

Returns the native handle that is used by this window.

The pointer will become invalid when the native window was destroyed.

source

fn set_enable(&self, enabled: bool)

Enables or disables mouse and keyboard input to the specified window.

A window must be enabled before it can be activated. If an application has create a modal dialog box by disabling its owner window (as described in WindowBuilderExtWindows::with_owner_window), the application must enable the owner window before destroying the dialog box. Otherwise, another window will receive the keyboard focus and be activated.

If a child window is disabled, it is ignored when the system tries to determine which window should receive mouse messages.

For more information, see https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enablewindow#remarks and https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features#disabled-windows

source

fn set_taskbar_icon(&self, taskbar_icon: Option<Icon>)

This sets ICON_BIG. A good ceiling here is 256x256.

source

fn set_skip_taskbar(&self, skip: bool)

Whether to show or hide the window icon in the taskbar.

source

fn set_undecorated_shadow(&self, shadow: bool)

Shows or hides the background drop shadow for undecorated windows.

Enabling the shadow causes a thin 1px line to appear on the top of the window.

Implementors§