Widget::GetOwningWindow
Defined in:
Returns the window to which a widget belongs.
C4Widgets.h
Prototype
Window *GetOwningWindow(void) const;
Description
The GetOwningWindow
function returns a pointer to the window to which a widget belongs. If the widget is not part of a window, then the return value is nullptr
.Note that the
GetOwningWindow
function does not necessarily return the same widget as the Widget::GetRootWidget
function when a widget is in a window. It is possible for a window to contain other types of root widgets that contain widgets themselves.
See Also