Struct winsafe::gui::WindowControlOpts[][src]

pub struct WindowControlOpts {
    pub class_name: String,
    pub class_style: CS,
    pub class_icon: HICON,
    pub class_cursor: HCURSOR,
    pub class_bg_brush: HBRUSH,
    pub position: POINT,
    pub size: SIZE,
    pub style: WS,
    pub ex_style: WS_EX,
    pub ctrl_id: u16,
}
Expand description

Options to create a WindowControl programmatically with WindowControl::new.

Fields

class_name: String

Window class name to be registered.

Defaults to an auto-generated string.

class_style: CS

Window class styles to be registered.

Defaults to co::CS::DBLCLKS.

class_icon: HICON

Window main icon to be registered.

Defaults to none.

class_cursor: HCURSOR

Window cursor to be registered.

Defaults to co::IDC::ARROW.

class_bg_brush: HBRUSH

Window background brush to be registered.

Defaults to co::COLOR::WINDOW.

position: POINT

Position of control within parent’s client area, in pixels, to be created.

Will be adjusted to match current system DPI.

Defaults to 0 x 0.

size: SIZE

Size of window, in pixels, to be created.

Will be adjusted to match current system DPI.

Defaults to 0 x 0.

style: WS

Window styles to be created.

Defaults to WS::CHILD | WS::TABSTOP | WS::GROUP | WS::VISIBLE | WS::CLIPCHILDREN | WS::CLIPSIBLINGS.

ex_style: WS_EX

Extended window styles to be created.

Defaults to WS_EX::LEFT.

Suggestion:

  • WS_EX::CLIENTEDGE to have a border.
ctrl_id: u16

The control ID.

Defaults to an auto-generated ID.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.