网站首页  词典首页

请输入您要查询的函数:

 

术语 destroywindow
释义 DestroyWindow
语法:
BOOL DestroyWindow( HWND hWnd
);
DestroyWindow函数
在DestroyWindow函数销毁指定的窗口。函数发送WM_DESTROY和WM_NCDESTROY消息窗口以停用,并从中删除键盘焦点。该功能还破坏了窗口的菜单,刷新线程消息队列,销毁定时器,删除剪贴板的所有权,并打破了剪贴板查看器链(如果窗口是在观众链的顶端)。
如果指定的窗口是父母或所有者窗口,DestroyWindow自动销毁相关的儿童或拥有的窗口时,它破坏了父母或所有者窗口。函数的第一个孩子或销毁所有窗口,然后它破坏了父母或所有者窗口。
DestroyWindow也破坏了的createDialog函数创建无模式对话框。
参数
hWnd
[in]的窗口句柄被摧毁。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
一个线程不能使用DestroyWindow来摧毁一个不同的线程创建的一个窗口。
如果窗口被破坏是一个子窗口没有WS_EX_NOPARENTNOTIFY作风,WM_PARENTNOTIFY消息发送到父。
例如
有关示例,请参见摧毁一个窗口。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为Unicode版本。
参见
视窗概览的createDialog,CreateWindow,CreateWindowEx,WM_DESTROY消息,WM_NCDESTROY,WM_PARENTNOTIFY
==英文原文==DestroyWindow Function
The DestroyWindow function destroys the specified window. The function sends WM_DESTROY and WM_NCDESTROY messages to the window to deactivate it and remove the keyboard focus from it. The function also destroys the window's menu, flushes the thread message queue, destroys timers, removes clipboard ownership, and breaks the clipboard viewer chain (if the window is at the top of the viewer chain).
If the specified window is a parent or owner window, DestroyWindow automatically destroys the associated child or owned windows when it destroys the parent or owner window. The function first destroys child or owned windows, and then it destroys the parent or owner window.
DestroyWindow also destroys modeless dialog boxes created by the CreateDialog function.
Syntax
BOOL DestroyWindow( HWND hWnd
);
Parameters
hWnd
[in] Handle to the window to be destroyed.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
A thread cannot use DestroyWindow to destroy a window created by a different thread.
If the window being destroyed is a child window that does not have the WS_EX_NOPARENTNOTIFY style, a WM_PARENTNOTIFY message is sent to the parent.
Example
For an example, see Destroying a Window .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as Unicode version.
See Also
Windows Overview , CreateDialog , CreateWindow , CreateWindowEx , WM_DESTROY , WM_NCDESTROY , WM_PARENTNOTIFY
==原始网址==http://msdn.microsoft.com/en-us/library/ms632682(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:26:34