IsWindow function

来源:互联网 发布:caffe bene 编辑:程序博客网 时间:2024/06/05 10:49

Determines whether the specified window handle identifies an existing window.

通过所指定的窗口句柄判断窗口是否存在

Syntax

C++
Copy
BOOL WINAPI IsWindow(  _In_opt_  HWND hWnd);

Parameters

参数

hWnd [in, optional](可选

Type: HWND

A handle to the window to be tested.

需要测试的窗口的句柄。

Return value

返回值

Type:

Type: BOOL

If the window handle identifies an existing window, the return value is nonzero.

如果窗口句柄指向的窗口存在,则返回值为非零

If the window handle does not identify an existing window, the return value is zero.

如果窗口句柄指向的窗口不存在,则返回值为

Remarks

备注

A thread should not use IsWindow for a window that it did not create because the window could be destroyed after this function was called. Further, because window handles are recycled the handle could even point to a different window.

一个线程不能为没有创建的窗口而使用IsWindow函数,因为这个函数被调用后,窗口会被破坏掉。并且,由于窗口句柄是回收利用的,因此还有可能指向不同的窗口。

Examples

For an example, see Creating a Modeless Dialog Box.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Reference
IsWindowEnabled
IsWindowVisible
Conceptual
Windows
原创粉丝点击