Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion sdk-api-src/content/winuser/nf-winuser-setwindowlonga.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ Sets a new <a href="/windows/desktop/winmsg/extended-window-styles">extended win
<td width="60%">
Sets a new application instance handle.

</td>
</tr>
<tr>
<td width="40%"><a id="GWL_HWNDPARENT"></a><a id="gwl_hwndparent"></a><dl>
<dt><b>GWL_HWNDPARENT</b></dt>
<dt>-8</dt>
</dl>
</td>
<td width="60%">
Sets a new owner for a top-level window.

</td>
</tr>
<tr>
Expand Down Expand Up @@ -228,7 +239,11 @@ Calling <b>SetWindowLong</b> with the <b>GWL_WNDPROC</b> index creates a subclas
Reserve extra window memory by specifying a nonzero value in the
<b>cbWndExtra</b> member of the <a href="/windows/desktop/api/winuser/ns-winuser-wndclassexa">WNDCLASSEX</a> structure used with the <a href="/windows/desktop/api/winuser/nf-winuser-registerclassexa">RegisterClassEx</a> function.

You must not call <b>SetWindowLong</b> with the <b>GWL_HWNDPARENT</b> index to change the parent of a child window. Instead, use the <a href="/windows/desktop/api/winuser/nf-winuser-setparent">SetParent</a> function.
Do not call <b>SetWindowLong</b> with the <b>GWL_HWNDPARENT</b> index to change the parent of a child window. Instead, use the <a href="/windows/desktop/api/winuser/nf-winuser-setparent">SetParent</a> function.

<b>GWL_HWNDPARENT</b> 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 <b>CS_CLASSDC</b> or <b>CS_OWNDC</b>, do not set the extended window styles <b>WS_EX_COMPOSITED</b> or <b>WS_EX_LAYERED</b>.

Expand Down
15 changes: 15 additions & 0 deletions sdk-api-src/content/winuser/nf-winuser-setwindowlongptra.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,17 @@ Sets a new <a href="/windows/desktop/winmsg/extended-window-styles">extended win
<td width="60%">
Sets a new application instance handle.

</td>
</tr>
<tr>
<td width="40%"><a id="GWLP_HWNDPARENT"></a><a id="gwlp_hwndparent"></a><dl>
<dt><b>GWLP_HWNDPARENT</b></dt>
<dt>-8</dt>
</dl>
</td>
<td width="60%">
Sets a new owner for a top-level window.

</td>
</tr>
<tr>
Expand Down Expand Up @@ -230,6 +241,10 @@ Reserve extra window memory by specifying a nonzero value in the

Do not call <b>SetWindowLongPtr</b> with the <b>GWLP_HWNDPARENT</b> index to change the parent of a child window. Instead, use the <a href="/windows/desktop/api/winuser/nf-winuser-setparent">SetParent</a> function.

<b>GWLP_HWNDPARENT</b> 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 <b>CS_CLASSDC</b> or <b>CS_PARENTDC</b>, do not set the extended window styles <b>WS_EX_COMPOSITED</b> or <b>WS_EX_LAYERED</b>.

Calling <b>SetWindowLongPtr</b> to set the style on a progressbar will reset its position.
Expand Down
15 changes: 15 additions & 0 deletions sdk-api-src/content/winuser/nf-winuser-setwindowlongptrw.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,17 @@ Sets a new <a href="/windows/desktop/winmsg/extended-window-styles">extended win
<td width="60%">
Sets a new application instance handle.

</td>
</tr>
<tr>
<td width="40%"><a id="GWLP_HWNDPARENT"></a><a id="gwlp_hwndparent"></a><dl>
<dt><b>GWLP_HWNDPARENT</b></dt>
<dt>-8</dt>
</dl>
</td>
<td width="60%">
Sets a new owner for a top-level window.

</td>
</tr>
<tr>
Expand Down Expand Up @@ -230,6 +241,10 @@ Reserve extra window memory by specifying a nonzero value in the

Do not call <b>SetWindowLongPtr</b> with the <b>GWLP_HWNDPARENT</b> index to change the parent of a child window. Instead, use the <a href="/windows/desktop/api/winuser/nf-winuser-setparent">SetParent</a> function.

<b>GWLP_HWNDPARENT</b> 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 <b>CS_CLASSDC</b> or <b>CS_PARENTDC</b>, do not set the extended window styles <b>WS_EX_COMPOSITED</b> or <b>WS_EX_LAYERED</b>.

Calling <b>SetWindowLongPtr</b> to set the style on a progressbar will reset its position.
Expand Down
17 changes: 16 additions & 1 deletion sdk-api-src/content/winuser/nf-winuser-setwindowlongw.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ Sets a new <a href="/windows/desktop/winmsg/extended-window-styles">extended win
<td width="60%">
Sets a new application instance handle.

</td>
</tr>
<tr>
<td width="40%"><a id="GWL_HWNDPARENT"></a><a id="gwl_hwndparent"></a><dl>
<dt><b>GWL_HWNDPARENT</b></dt>
<dt>-8</dt>
</dl>
</td>
<td width="60%">
Sets a new owner for a top-level window.

</td>
</tr>
<tr>
Expand Down Expand Up @@ -228,7 +239,11 @@ Calling <b>SetWindowLong</b> with the <b>GWL_WNDPROC</b> index creates a subclas
Reserve extra window memory by specifying a nonzero value in the
<b>cbWndExtra</b> member of the <a href="/windows/desktop/api/winuser/ns-winuser-wndclassexa">WNDCLASSEX</a> structure used with the <a href="/windows/desktop/api/winuser/nf-winuser-registerclassexa">RegisterClassEx</a> function.

You must not call <b>SetWindowLong</b> with the <b>GWL_HWNDPARENT</b> index to change the parent of a child window. Instead, use the <a href="/windows/desktop/api/winuser/nf-winuser-setparent">SetParent</a> function.
Do not call <b>SetWindowLong</b> with the <b>GWL_HWNDPARENT</b> index to change the parent of a child window. Instead, use the <a href="/windows/desktop/api/winuser/nf-winuser-setparent">SetParent</a> function.

<b>GWL_HWNDPARENT</b> 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 <b>CS_CLASSDC</b> or <b>CS_OWNDC</b>, do not set the extended window styles <b>WS_EX_COMPOSITED</b> or <b>WS_EX_LAYERED</b>.

Expand Down