窗口查询 API

常用窗口查询 Win32 API

 

 

FindWindow Function


 

The FindWindow function retrieves a handle to the top-level window whose class name and window name match the specified strings. This function does not search child windows. This function does not perform a case-sensitive search.

To search child windows, beginning with a specified child window, use the FindWindowEx function.

 

Syntax

HWND FindWindow(      

    LPCTSTR lpClassName,     LPCTSTR lpWindowName );

 

FindWindowEx Function


The FindWindowEx function retrieves a handle to a window whose class name and window name match the specified strings. The function searches child windows, beginning with the one following the specified child window. This function does not perform a case-sensitive search.

Syntax

HWND FindWindowEx(      

    HWND hwndParent,     HWND hwndChildAfter,     LPCTSTR lpszClass,     LPCTSTR lpszWindow );

 

EnumWindows Function


The EnumWindows function enumerates all top-level windows on the screen by passing the handle to each window, in turn, to an application-defined callback function. EnumWindows continues until the last top-level window is enumerated or the callback function returns FALSE.

Syntax

BOOL EnumWindows(      

    WNDENUMPROC lpEnumFunc,     LPARAM lParam );

 

EnumWindowsProc Function


The EnumWindowsProc function is an application-defined callback function used with the EnumWindows or EnumDesktopWindows function. It receives top-level window handles. The WNDENUMPROC type defines a pointer to this callback function. EnumWindowsProc is a placeholder for the application-defined function name.

Syntax

BOOL CALLBACK EnumWindowsProc(      

    HWND hwnd,     LPARAM lParam );

 

EnumChildWindows Function


The EnumChildWindows function enumerates the child windows that belong to the specified parent window by passing the handle to each child window, in turn, to an application-defined callback function. EnumChildWindows continues until the last child window is enumerated or the callback function returns FALSE.

Syntax

BOOL EnumChildWindows(      

    HWND hWndParent,     WNDENUMPROC lpEnumFunc,     LPARAM lParam );

 

EnumChildProc Function


The EnumChildProc function is an application-defined callback function used with the EnumChildWindows function. It receives the child window handles. The WNDENUMPROC type defines a pointer to this callback function. EnumChildProc is a placeholder for the application-defined function name.

Syntax

BOOL CALLBACK EnumChildProc(      

    HWND hwnd,     LPARAM lParam );

 

WindowFromPoint Function


The WindowFromPoint function retrieves a handle to the window that contains the specified point.

Syntax

HWND WindowFromPoint(      

    POINT Point );

 

 

EnumThreadWindows Function


The EnumThreadWindows function enumerates all nonchild windows associated with a thread by passing the handle to each window, in turn, to an application-defined callback function. EnumThreadWindows continues until the last window is enumerated or the callback function returns FALSE. To enumerate child windows of a particular window, use the EnumChildWindows function.

Syntax

BOOL EnumThreadWindows(      

    DWORD dwThreadId,     WNDENUMPROC lpfn,     LPARAM lParam );
 
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值