Window parentΒΆ

parent = window_id

Optional. Every window may be assigned a parent window, in which case it becomes a child window. If no parent is specified, the window is a top-level window, at the same level as the task window, and has the desktop as its parent.

The co-ordinates of a child window are relative to the top left corner of the parent. If the parent window is moved, any child windows it possesses are automatically moved with it. A child window may not be moved beyond the borders of the parent window.

Note however that if the child window has the style flag WS_OWNED assigned to it, none of the statements in the previous paragraph apply.

A tab control window must always have a parent. The child windows of such a window form the tabs.

Specifying the desktop as a parent is not permitted. The desktop automatically becomes the parent of any window which omits the parent clause or sets it to 0.

All standard pre-defined windows are top-level windows whose parent is the desktop.

The parent() function is used to retrieve the parent of a window or window control.


RELATED TOPICS

Windows

Hierarchy of windows