SAMPLE: Parent.exe Uses SetParent to Change Parent of Child

ID: Q75001


The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK) versions 3.0, 3.1
  • Microsoft Windows 2000


SUMMARY

Parent.exe is a sample application that demonstrates how to dynamically change the parent of a child window by using the SetParent function.

NOTE: This technique is very risky when applied to pop-up windows. Pop-up windows do not have a parent, instead they have an owner, which is a different relationship. Trying to change the parent of a pop-up window can cause the application or Windows to crash.


MORE INFORMATION

The following file is available for download from the Microsoft Software Library:

Parent.exe
For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services

Additional query words:

Keywords : kbfile kbsample kbMDI kbGrpUser kbWinOS310 kbWndw kbWndwProp kbWinOS300
Version : WINDOWS:3.0,3.1
Platform : WINDOWS
Issue type :


Last Reviewed: January 27, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.