DOCUMENT:Q89563 08-AUG-2001 [win95x] TITLE :INFO: Using SetParent() to Change a Window Parent PRODUCT :Microsoft Windows 95.x Retail Product PROD/VER:WINDOWS:3.11,95; winnt:3.51 OPER/SYS: KEYWORDS:kbSDKPlatform kbGrpDSUser kbWndw kbWndwProp kbUser kb16bitonly ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Windows 3.11 - Microsoft Windows 95 - Microsoft Windows NT Server version 3.51 - Microsoft Windows NT Workstation version 3.51 ------------------------------------------------------------------------------- SUMMARY ======= SetParent() can be used to change the parent window of a pop-up, overlapped, or child window. However, pop-up and overlapped windows were not designed to have a parent and they may function incorrectly if they are given a parent using SetParent. For example, messages like "WM_ACTIVATEAPP" that are sent only to top-level windows, will not be sent to a pop-up or overlapped window that has been given a parent. Child windows can be safely re-parented. The process that created the parent window can be the same as, or different than the process that created the window that is being re-parented. Additional query words: ====================================================================== Keywords : kbSDKPlatform kbGrpDSUser kbWndw kbWndwProp kbUser kb16bitonly Technology : kbWinNTsearch kbWinNTWsearch kbWinNT351search kbWinNTW351search kbWinNTW351 kbWinNTSsearch kbWinNTS351 kbWinNTS351search kbWin3xSearch kbWin95search kbZNotKeyword3 kbWin311 Version : WINDOWS:3.11,95; winnt:3.51 Issue type : kbinfo ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2001.