December 21, 2024

Dynamic Windows Function [dw_window_set_pos]

Syntax

void dw_window_set_pos(HWND handle, long x, long y)

Parameters

HWND handle: Window (widget) handle.
long x: X location from the bottom left.
long y: Y location from the bottom left.

Description

Sets the position of a given window (widget).

Remarks

The calculated position is dependent on the window size and gravity. Before the window is shown it is recommended that you set the gravity (if needed) and size prior to setting the position.

If you attempt to position an unsized window, auto-sizing will be attempted so make sure you are finished packing your window before setting the position, or use dw_window_set_pos_size().

As of version 3.2, this function does nothing on iOS, Android and GTK3/4 using Wayland.