Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter NineDialog Functions (continued)

LoadIcon Function

Overview

The LoadIcon function .

Syntax/Parameters

Syntax

handle = LoadIcon ( string resource, [int h, int w] );

Parameters

resource

A string specifying a resource name or a filename. If the string contains illegal characters for a resource name (such as a ‘.’), it is assumed to be a filename. If the filename is not qualified, the script folder is used as a basis to qualify the path.

h    w

A pair of optional int values specifying the requested height and width. If omitted, the icon closest to the current system theme size is selected. If ‘0, 0’, the first icon size is selected. Otherwise the icon closest to the specified size is selected.

Return Value

A handle to a Resource Object or NULL_HANDLE on error. Use the GetLastError function to retrieve a formatted error code.

Remarks

If a file is referenced, once it is loaded, the file is released. If the resource object is handed to a window control or other item, the object should remain intact until the referencing window or object no longer needs the image. Using the CloseHandle function or if the handle is automatically closed will release all the resources and internal handles associated with the object.

Icon files or resources can contain multiple versions of the same ‘icon’ in various sizes and colors. The system will select the specific icon based on the request size.

Selection of an incorrect image format or other encoding errors will resource in an error being returned.

Related Functions

Platform Support

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

Legato IDE, Legato Basic