Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter SeventeenApplication Integration Functions (continued)

GetEditWindowHandle Function

Overview

The GetEditWindowHandle function returns the handle to a window as managed by the Edit Manager.

Syntax/Parameters

Syntax

handle = GetEditWindowHandle ( [int index], [int view] );

Parameters

index

An optional int representing the zero-based window index within the Edit Manager. If the value is omitted (view must also be omitted), the active window is returned. Use -1 to return the window handle for the active window when also requesting view.

view

An optional int representing a zero-based index of which view handle to retrieve. If omitted or -1, the Client Window handle is returned. The Client Window is the container for all view windows within a document being edited. The maximum value of view is MAX_MDI_VIEWS (512).

Return Value

Returns a handle representing the window or NULL_HANDLE on failure. Use the GetLastError function to retrieve error information.

Remarks

The return value is a Windows handle, which is managed by the Edit Manager and the operating system. It is not a handle to a managed Legato object. Window handles are assigned by the operating system and uniquely identify a window. These handles can be used to access information and perform various functions within Legato. Messages can also be directly sent to windows but programmers are cautioned that this is an advanced operation that requires understanding of Windows messaging dynamics. It is also possible to adversely affect the application by performing certain windows commands without working through published script functions. Window handle values are persistent as long as the window is open. If the window is closed and reopened, the handle value will change. Since a window handle is managed by Windows, it does not need to be closed, and if the CloseHandle function is called, it will essentially do nothing.

Most text edit windows will have two views while data style windows may have a large number of views. The data contained within each view may or may not be synchronized.

Related Functions

Platform Support

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

Legato IDE