win12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WinSetOwner (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINMESSAGEMGR
 
BOOL WinSetOwner(hwnd, hwndNewOwner)
HWND hwnd;            /* handle of the window whose owner is changed */
HWND hwndNewOwner;    /* handle of the new owner window              */
 
The WinSetOwner function changes the owner of a specified window. The owner
window and the owned window must have been created by the same thread.
 
The WinQueryWindow function can be used to obtain the handle of the owner
window.
 
Parameter     Description
────────────────────────────────────────────────────────────────────────────
 
hwnd          Identifies the window whose owner is changed.
 
hwndNewOwner  Identifies the new owner window. If this parameter is NULL,
              the window's owner is set to NULL.
 
Return Value
 
The return value is TRUE if the function is successful or FALSE if an error
occurs.
 
See Also
 
WinQueryWindow, WinSetParent