窗口查询 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 );
 
 

你可能感兴趣的:(windows,function,api,search,callback,each)