GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Nine — Dialog Functions (continued)
Images can be added to a script application by direct reference or stored as resources. Such resources can be later displayed on dialog pages using button or static controls or used on menus and ribbons. The Resource Object can be used to load and manage such resources include the operating system handles. Resource objects can be held for the life of a script or can be loaded on demand an discarded when no loader needed. For controls, when an image is displayed, the Resource Object must be maintained while the image is displayed.
9.8.2 ICON and BITMAP Resource Structure
Icon and bitmap resources can be declared anywhere within the resource portion or portions of a script. Both types allow a file to be referenced or the image data to be provided as an embedded hexadecimal data:
name BITMAP "filename.bmp"
name ICON "filename.ico"
Or,
name BITMAP
{
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
. . .
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
}
name ICON
{
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
. . .
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
}
Or,
name BITMAP
begin compact
424D3E010000000000003E00000028000000400000002000000001000100000000000001000000... FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
end
name ICON
begin compact
424D3E010000000000003E00000028000000400000002000000001000100000000000001000000... FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
end
When a filename is referenced and the path is not qualified, the path will be qualified based on the path of the source script. The statements ‘begin’ and ‘end’ can be interchanged with ‘{’ and ‘}’.
Optionally, image data can be hex encoded directly into the resource stream. The data must be a byte-for-byte encoding of the binary data to hexadecimal. The first embedded mode requires the hexadecimal content to be surrounded with single quotes and each byte to have a space delimiter. Any number of bytes can be placed on a line but is usually 16 except for the last line which is 16 or less. This is the conventional resource format for Windows resource files.
The last example illustrates the ‘compact’ mode, removing the spaces and quotes to reduce file size. This mode is not accepted by third-party editors.
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.