Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter FifteenWindows/OS Functions (continued)

FindWindow Function

Overview

The FindWindow function is a low-level function that locates a system wide window within a specified scope and returns the handle to that window.

Syntax/Parameters

Syntax

handle = FindWindow ( string class, [string title], [handle parent], [handle child] );

Parameters

class

A string specifying the class name of the window to find.

title

An optional string specifying the title of the window to match.

parent

An optional handle of the parent window to constrain the search. If the parameter is omitted or specified as NULL_HANDLE, the desktop is used, thus search all windows on the desktop.

child

An optional handle specifying the starting child window to start the search. The search begins with the next child window in the window Z-order.

Return Value

Returns a handle to the application frame window or NULL_HANDLE (0) if the window is not open. The handle should not be closed.

Remarks

The FindWindow function supports locating windows within the desktop tree of the current user. To find an edit window, use the FindEditWindow function.

The title is matched against the window text or caption for the window. The window text can also be the content or other data of the window depending on the class of window. It is generally set with the SetWindowText function, via resources of a number of other methods.

When specifying a child window parameter, the window must be a direct child window of parent window (not just a descendant of the parent window). If child is NULL_HANDLE or omitted, the search begins with the first child window of parent window. If both parent and child parameters are NULL_HANDLE or omitted, the function searches all top-level and message-only windows.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic