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.
WinDestroyWindow (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINWINDOWMGR
BOOL WinDestroyWindow(hwnd)
HWND hwnd; /* handle of the window to destory */
The WinDestroyWindow function destroys a window and any child windows of
that window. If the window is locked, this function will not return until
the window has been unlocked (and destroyed).
Parameter Description
────────────────────────────────────────────────────────────────────────────
hwnd Identifies the window to be destroyed.
Return Value
The return value is TRUE if the function is successful or FALSE if an error
occurs.
Comments
The window to be destroyed must have been created by the thread that issues
this call. Before the window identified by the hwnd parameter is itself
destroyed, all child windows it owns are also destroyed.
Note that any presentation spaces created with the WinGetPS function must be
released by calling the WinReleasePS function. This must be done before
calling WinDestroyWindow.
The following messages are sent by this function:
Value Meaning
────────────────────────────────────────────────────────────────────────────
WM_ACTIVATE Sent with the first message parameter equal to
FALSE if the window being destroyed is the active
window.
WM_DESTROY Always sent to the window being destroyed after the
window has been hidden on the device, but before
its child windows have been destroyed.
WM_OTHERWINDOWDESTROYED Sent to all main windows if the window being
destroyed, or any of its descendants, has been
registered with the WinRegisterWindowDestroy
function.
WM_RENDERALLFMTS Sent if the clipboard owner is being destroyed and
there are unrendered formats in the clipboard.
If the window being destroyed is the active window, then both the active
window and the input-focus window are transferred to another window when the
window is destroyed.
See Also
WinCreateStdWindow, WinCreateWindow, WinGetPS, WinLockWindow,
WinRegisterWindowDestroy, WinReleasePS, WinDestroyAccelTable,
WinDestroyAtomTable, WinDestroyCursor, WinDestroyHeap, WinDestroyMsgQueue,
WinDestroyPointer, WM_ACTIVATE, WM_DESTROY
♦