diff --git a/sdk-api-src/content/winuser/nf-winuser-setwindowlonga.md b/sdk-api-src/content/winuser/nf-winuser-setwindowlonga.md index d2e365ae47fc..52d7c9b03129 100644 --- a/sdk-api-src/content/winuser/nf-winuser-setwindowlonga.md +++ b/sdk-api-src/content/winuser/nf-winuser-setwindowlonga.md @@ -103,6 +103,17 @@ Sets a new extended win Sets a new application instance handle. + + + +
+
GWL_HWNDPARENT
+
-8
+
+ + +Sets a new owner for a top-level window. + @@ -228,7 +239,11 @@ Calling SetWindowLong with the GWL_WNDPROC index creates a subclas Reserve extra window memory by specifying a nonzero value in the cbWndExtra member of the WNDCLASSEX structure used with the RegisterClassEx function. -You must not call SetWindowLong with the GWL_HWNDPARENT index to change the parent of a child window. Instead, use the SetParent function. +Do not call SetWindowLong with the GWL_HWNDPARENT index to change the parent of a child window. Instead, use the SetParent function. + +GWL_HWNDPARENT is used to change the owner of a top-level window, not the parent of a child window. + +A window can have either a parent or an owner, or neither, but never both simultaneously. If the window has a class style of CS_CLASSDC or CS_OWNDC, do not set the extended window styles WS_EX_COMPOSITED or WS_EX_LAYERED. diff --git a/sdk-api-src/content/winuser/nf-winuser-setwindowlongptra.md b/sdk-api-src/content/winuser/nf-winuser-setwindowlongptra.md index 731a54a72987..7af4064eddba 100644 --- a/sdk-api-src/content/winuser/nf-winuser-setwindowlongptra.md +++ b/sdk-api-src/content/winuser/nf-winuser-setwindowlongptra.md @@ -105,6 +105,17 @@ Sets a new extended win Sets a new application instance handle. + + + +
+
GWLP_HWNDPARENT
+
-8
+
+ + +Sets a new owner for a top-level window. + @@ -230,6 +241,10 @@ Reserve extra window memory by specifying a nonzero value in the Do not call SetWindowLongPtr with the GWLP_HWNDPARENT index to change the parent of a child window. Instead, use the SetParent function. +GWLP_HWNDPARENT is used to change the owner of a top-level window, not the parent of a child window. + +A window can have either a parent or an owner, or neither, but never both simultaneously. + If the window has a class style of CS_CLASSDC or CS_PARENTDC, do not set the extended window styles WS_EX_COMPOSITED or WS_EX_LAYERED. Calling SetWindowLongPtr to set the style on a progressbar will reset its position. diff --git a/sdk-api-src/content/winuser/nf-winuser-setwindowlongptrw.md b/sdk-api-src/content/winuser/nf-winuser-setwindowlongptrw.md index fd3a4d70a96c..32ffe8753933 100644 --- a/sdk-api-src/content/winuser/nf-winuser-setwindowlongptrw.md +++ b/sdk-api-src/content/winuser/nf-winuser-setwindowlongptrw.md @@ -105,6 +105,17 @@ Sets a new extended win Sets a new application instance handle. + + + +
+
GWLP_HWNDPARENT
+
-8
+
+ + +Sets a new owner for a top-level window. + @@ -230,6 +241,10 @@ Reserve extra window memory by specifying a nonzero value in the Do not call SetWindowLongPtr with the GWLP_HWNDPARENT index to change the parent of a child window. Instead, use the SetParent function. +GWLP_HWNDPARENT is used to change the owner of a top-level window, not the parent of a child window. + +A window can have either a parent or an owner, or neither, but never both simultaneously. + If the window has a class style of CS_CLASSDC or CS_PARENTDC, do not set the extended window styles WS_EX_COMPOSITED or WS_EX_LAYERED. Calling SetWindowLongPtr to set the style on a progressbar will reset its position. diff --git a/sdk-api-src/content/winuser/nf-winuser-setwindowlongw.md b/sdk-api-src/content/winuser/nf-winuser-setwindowlongw.md index 13d143b88474..c6d2a84e5229 100644 --- a/sdk-api-src/content/winuser/nf-winuser-setwindowlongw.md +++ b/sdk-api-src/content/winuser/nf-winuser-setwindowlongw.md @@ -103,6 +103,17 @@ Sets a new extended win Sets a new application instance handle. + + + +
+
GWL_HWNDPARENT
+
-8
+
+ + +Sets a new owner for a top-level window. + @@ -228,7 +239,11 @@ Calling SetWindowLong with the GWL_WNDPROC index creates a subclas Reserve extra window memory by specifying a nonzero value in the cbWndExtra member of the WNDCLASSEX structure used with the RegisterClassEx function. -You must not call SetWindowLong with the GWL_HWNDPARENT index to change the parent of a child window. Instead, use the SetParent function. +Do not call SetWindowLong with the GWL_HWNDPARENT index to change the parent of a child window. Instead, use the SetParent function. + +GWL_HWNDPARENT is used to change the owner of a top-level window, not the parent of a child window. + +A window can have either a parent or an owner, or neither, but never both simultaneously. If the window has a class style of CS_CLASSDC or CS_OWNDC, do not set the extended window styles WS_EX_COMPOSITED or WS_EX_LAYERED.