GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Nine — Dialog Functions (continued)
This section covers functions to set and retrieve information from static controls. For the most part, this is limited to setting and retrieving text and setting images. Note that depending on the style of static control, text may not be displayed.
Static controls can take a number of forms depending on the class style bits set in the resource control statement. These are as follows:
Constant | Description | ||
---|---|---|---|
SS_BITMAP | A bitmap is to be displayed in the static control. The text is the name of a bitmap (not a filename) defined elsewhere in the resource file. The style ignores the nWidth and nHeight parameters; the control automatically sizes itself to accommodate the bitmap. | ||
SS_BLACKFRAME | A box with a frame drawn in the same color as the window frames. This color is black in the default color scheme. | ||
SS_BLACKRECT | A rectangle filled with the current window frame color. This color is black in the default color scheme. | ||
SS_CENTER | A simple rectangle; centers the text in the rectangle. The text is formatted before it is displayed. Words that extend past the end of a line are automatically wrapped to the beginning of the next centered line. Words that are longer than the width of the control are truncated. | ||
SS_CENTERIMAGE | A bitmap is centered in the static control that contains it. The control is not resized, so that a bitmap too large for the control will be clipped. If the static control contains a single line of text, the text is centered vertically in the client area of the control. Unused portions of the control will remain the background color. | ||
SS_EDITCONTROL | The static control duplicates the text-displaying characteristics of a multiline edit control. Specifically, the average character width is calculated in the same manner as with an edit control and the function does not display a partially visible last line. | ||
SS_ENDELLIPSIS | If the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses. Using this style will force the control’s text to be on one line with no word wrap. Compare with SS_PATHELLIPSIS and SS_WORDELLIPSIS. | ||
SS_ENHMETAFILE | An enhanced metafile is to be displayed in the static control. The text is the name of a metafile. An enhanced metafile static control has a fixed size; the metafile is scaled to fit the static control’s client area. | ||
SS_GRAYFRAME | A box with a frame drawn with the same color as the screen background (desktop). This color is gray in the default color scheme. | ||
SS_GRAYRECT | A rectangle filled with the current screen background color. This color is gray in the default color scheme. | ||
SS_ICON | An icon to be displayed in the dialog box. If the control is created as part of a dialog box, the text is the name of an icon (not a filename) defined elsewhere in the resource file. | ||
SS_LEFT | A simple rectangle; left-aligns the text in the rectangle. The text is formatted before it is displayed. Words that extend past the end of a line are automatically wrapped to the beginning of the next left-aligned line. Words that are longer than the width of the control are truncated. | ||
SS_LEFTNOWORDWRAP | A simple rectangle; left-aligns the text in the rectangle. Tabs are expanded but words are not wrapped. Text that extends past the end of a line is clipped. | ||
SS_NOPREFIX | Prevents interpretation of any ampersand (&) characters in the control’s text as accelerator prefix characters. These are displayed with the ampersand removed and the next character in the string underlined. This static control style may be included with any of the defined static controls. You can combine SS_NOPREFIX with other styles. This can be useful when filenames or other strings that may contain an ampersand (&) must be displayed in a static control in a dialog box. | ||
SS_NOTIFY | Sends the parent window STN_CLICKED, STN_DBLCLK, STN_DISABLE, and STN_ENABLE notification codes when the user clicks or double-clicks the control. | ||
SS_PATHELLIPSIS | Replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, SS_PATHELLIPSIS preserves as much as possible of the text after the last backslash. Using this style will force the control’s text to be on one line with no word wrap. Compare with SS_ENDELLIPSIS and SS_WORDELLIPSIS. | ||
SS_REALSIZECONTROL | Adjusts the bitmap to fit the size of the static control. For example, changing the locale can change the system font, so controls might be resized. If a static control had a bitmap, the bitmap would no longer fit the control. This style bit dictates automatic redimensioning of bitmaps to fit their controls. If SS_CENTERIMAGE is specified, the bitmap or icon is centered (and clipped, if needed). If SS_CENTERIMAGE is not specified, the bitmap or icon is stretched or shrunk. Note that the redimensioning in the two axes are independent and the result may have a changed aspect ratio. Compare with SS_REALSIZEIMAGE. | ||
SS_REALSIZEIMAGE | Specifies that the actual resource width is used and the icon is loaded using LoadImage. SS_REALSIZEIMAGE is always used in conjunction with SS_ICON. SS_REALSIZEIMAGE uses LoadImage, overriding the process normally followed under SS_ICON. It does not load cursors; if LoadImage fails, no further attempts to load are made. It uses the actual resource width. The static control is resized accordingly, but the icon remains aligned to the originally specified left and top edges of the control. | ||
SS_RIGHT | A simple rectangle; right-aligns the text in the rectangle. The text is formatted before it is displayed. Words that extend past the end of a line are automatically wrapped to the beginning of the next right-aligned line. Words that are longer than the width of the control are truncated. | ||
SS_RIGHTJUST | The lower right corner of a static control with the SS_BITMAP or SS_ICON style is to remain fixed when the control is resized. Only the top and left sides are adjusted to accommodate a new bitmap or icon. | ||
SS_SIMPLE | A simple rectangle; displays a single line of left-aligned text in the rectangle. The text line cannot be shortened or altered in any way. Also, if the control is disabled, the control does not gray its text. | ||
SS_SUNKEN | Draws a half-sunken border around a static control. | ||
SS_TYPEMASK | A composite style bit that results from using the OR operator on SS_* style bits. Can be used to mask out valid SS_* bits from a given bitmask. Note that this is out of date and does not correctly include all valid styles. Thus, you should not use this style. | ||
SS_WHITEFRAME | A box with a frame drawn with the same color as the window background. This color is white in the default color scheme. | ||
SS_WHITERECT | A rectangle filled with the current window background color. This color is white in the default color scheme. | ||
SS_WORDELLIPSIS | Truncates any word that does not fit in the rectangle and adds ellipses. Using this style will force the control’s text to be on one line with no word wrap. Compare with SS_ENDELLIPSIS and SS_PATHELLIPSIS. |
Static controls (or text controls for labels) will send STN_ notifications via the “action” procedure. These are:
Define | Value | Description | |||
STN_CLICKED | 0x0000 | Sent when the user clicks a static control that has the SS_NOTIFY style. | |||
STN_DBLCLK | 0x0001 | Sent when the user double-clicks a static control that has the SS_NOTIFY style. | |||
STN_DISABLE | 0x0003 | Sent when a static control is disabled. The static control must have the SS_NOTIFY style to receive this notification code. | |||
STN_ENABLE | 0x0002 | Sent when a static control is enabled. The static control must have the SS_NOTIFY style to receive this notification code. |
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.