Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter NineDialog Functions (continued) 

9.6 Dialog Controls and Common Controls

9.6.1 Control Types

Dialog pages are essentially a collection of various Windows Common Controls and custom controls. This section covers the common controls and styles.

The appearance of common control varies between versions of Windows and may also change depending on the selected display theme.

The codes for window styles are placed into a style word and an extended style word. For example, WS_CAPTION tells Windows to add a caption to the window. These styles occupy the high word (16-bits) of the window style dword (32-bits) while the low word is reserved for bit related to the specific window or control. Style bits can be set for each control and for the containing dialog as part of the dialog resource.

For example:

CONTROL "", 101, "listbox", LBS_NOTIFY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_Vscroll | WS_TABSTOP, 12, 17, 160, 84, 0

The styles consist of WS_ items for defining the control style as a child window (of the dialog page), initially visible, with a border with adding a vertical scrollbar and as a tab stop within the dialog page. The LBS_ style belongs to the specific class “listbox” telling that control how to behave.

For the complete dialog:

STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION 

In this case, three WS_ styles are from the same set expressing how the main dialog page (which is also the contain dialog) is to look and behave. The DS_ style expresses how the dialog manager should behave.

After a window or control has been created, some of the styles can be changed. Legato does not directly support access to the styles once set.

Styles break into two broad types: Windows window types and specific control styles. Window styles generally apply to all windows and deal with things like containing borders, shading and overall behavior with respect to interaction with other windows. To slightly complicate matters as Windows functionality has expanded over the years, extended styles have been added as a separate style word known as extended window styles. Their designators start with WS_EX_ prefix.

Styles are always ORed using the | operator.

9.6.2 Window Styles

Windows styles set many behaviors, some of which may conflict. For a complete discussion of styles and all style definitions, see MSDN. While these styles (amongst others) can be used on most any window, the columns “Dialog or Page” and “Control” can be used as a guide for best or typical use.

The table below is an overview of the window styles relevant to dialogs and controls:

  Windows
Definition
  Bitwise
Value
  Dialog
or Page
  Control   Description  
  WS_BORDER   0x00800000   N   Y   The window is created with a thin-line border.  
  WS_CAPTION   0x00C00000   Y   N   The window has a title bar (includes the WS_BORDER style).  
  WS_CHILD   0x40000000   Y   Y   The window is a child window. A window with this style cannot have a menu bar. This style cannot be used with the WS_POPUP style.  
  WS_DISABLED   0x08000000   N   Y   The window is initially disabled. A disabled window cannot receive input from the user. To change this after a window has been created, use the ControlEnable or ControlDisable function.  
  WS_DLGFRAME   0x00400000   Y   N   The window has a border of a style typically used with dialog boxes. A window with this style cannot have a title bar.  
  WS_GROUP   0x00020000   N   Y   The window is the first control of a group of controls. The group consists of this first control and all controls defined after it, up to the next control with the WS_GROUP style. The first control in each group usually has the WS_TABSTOP style so that the user can move from group to group. The user can subsequently change the keyboard focus from one control in the group to the next control in the group by using the direction keys.  
  WS_HSCROLL   0x00100000   Y   Y   The window has a horizontal scrollbar.  
  WS_SYSMENU   0x00080000   Y   N   The window has a window menu on its title bar. The WS_CAPTION style must also be specified.  
  WS_TABSTOP   0x00010000   N   Y   The window is a control that can receive the keyboard focus when the user presses the TAB key. Pressing the TAB key changes the keyboard focus to the next control with the WS_TABSTOP style.  
  WS_VISIBLE   0x10000000   N   Y   The window is initially visible.  
  WS_VSCROLL   0x00200000   Y   Y   Adds a vertical scrollbar.  

 

The relevant extended styles are as follows:

  Windows
Definition
  Bitwise
Value
  Dialog
or Page
  Control   Description  
 WS_EX_ACCEPTFILES   0x00000010   Y   Y   The window accepts drag-drop files. There is no procedure for drop files.  
 WS_EX_APPWINDOW   0x00040000   Y   N   Forces a top-level window onto the taskbar when the window is visible.  
 WS_EX_CLIENTEDGE   0x00000200   Y   Y   The window has a border with a sunken edge.  
 WS_EX_CONTEXTHELP   0x00000400   Y   N   The title bar of the window includes a question mark. When the user clicks the question mark, the cursor changes to a question mark with a pointer.  
 WS_EX_DLGMODALFRAME   0x00000001   Y   N  The window has a double border; optionally, the window can be created with a title bar by specifying the WS_CAPTION style in the regular parameter. This is not generally used on property sheet pages.  
 WS_EX_STATICEDGE   0x00020000   Y   Y   The window has a three-dimensional border style intended to be used for items that do not accept user input.  
 WS_EX_TRANSPARENT   0x00000020   Y   Y   The window should not be painted until siblings beneath the window (that were created by the same thread) have been painted. The window appears transparent because the bits of underlying sibling windows have already been painted.  
 WS_EX_WINDOWEDGE   0x00000100   Y   Y   The window has a border with a raised edge.  

9.6.3 Control Class Names

Class names used are either embedded into the installed operating system, by the application or by third-party applications. Legato supports the following embedded common controls and their styles:

  Defined Name   Class Name   Description  
  WC_BUTTON   Button   Press/push button style controls such as buttons, checkboxes, radio buttons. Use the Button and Checkbox functions to access.  
  WC_COMBOBOX   ComboBox   Combination edit and list box. Use the ComboBox functions to access.  
  WC_COMBOBOXEX   ComboBoxEx32   Combination edit and list box. Use the ComboBox functions to access.  
  DATETIMEPICK_CLASS   SysDateTimePick32   Date and time pickers. Use the Date and Time control functions to access.  
  WC_EDIT   Edit   Single and multiple line edit input control. Use the Edit functions to access.  
  WC_HEADER   SysHeader32   Header control. There are presently no specific access functions.  
  WC_IPADDRESS   SysIPAddress32   IP address control. There are presently no specific access functions.  
  WC_LINK   SysLink   A static style text control with link highlighting. Use the HypertextControl functions to access.  
  WC_LISTBOX   ListBox   List box control. Use the ListBox functions to access.  
  WC_LISTVIEW   SysListView32   List box style control. There are presently no specific access functions.  
  WC_NATIVEFONTCTL   NativeFontCtl   Windows control. There are presently no specific access functions.  
  WC_PAGESCROLLER   SysPager   Windows control. There are presently no specific access functions.  
  WC_TABCONTROL   SysTabControl32   Tab rack control. Use the TabControl functions to access.  
  WC_TRACKBAR   msctls_trackbar32   Trackbar Control. Use the Trackbar functions to access.  
  WC_TREEVIEW   SysTreeView32   Tree style control. There are presently no specific access functions.  
  WC_SCROLLBAR   ScrollBar   Scrollbar control. Use the Scrollbar functions to access.  
  WC_STATIC   Static   Static display control for text, lines, rectangles, bitmaps and icons. Use the StaticControl functions to access.  
             

 

Additional window classes can be used but must be manually accessed. Many controls respond to EditSetText and EditGetText.

Application embedded classes can include:

  Class Name   Description  
  data_control   Spread sheet style control embedded into Legato. Use the DataControl functions to access.  
  img_preview_control   A control to allow the previewing of various image types. Use the EditSetText function to display an image.  
  page_view   An HTML page editor. Use the Page Control functions to access. This control is only available on applications with HTML editing enabled.  

 

9.6.4 Button Class Styles

The following table lists the style bits that can be used with the button common control window class. Note that some of the styles dramatically change the appearance and behavior of the control. Also note, that when a control type such as AUTOCHECKBOX is employed, it will automatically fold in certain style bits.

  Constant   Description  
  BS_3STATE   Creates a button that is the same as a check box, except that the box can be grayed as well as checked or cleared. Use the grayed state to show that the state of the check box is not determined.  
  BS_AUTO3STATE   Creates a button that is the same as a three-state check box, except that the box changes its state when the user selects it. The state cycles through checked, indeterminate, and cleared.  
  BS_AUTOCHECKBOX   Creates a button that is the same as a check box, except that the check state automatically toggles between checked and cleared each time the user selects the check box.  
  BS_AUTORADIOBUTTON   Creates a button that is the same as a radio button, except that when the user selects it, the system automatically sets the button’s check state to checked and automatically sets the check state for all other buttons in the same group to cleared.  
  BS_BITMAP   Specifies that the button displays a bitmap.  
  BS_BOTTOM   Places text at the bottom of the button rectangle.  
  BS_CENTER   Centers text horizontally in the button rectangle.  
  BS_CHECKBOX   Creates a small, empty check box with text. By default, the text is displayed to the right of the check box. To display the text to the left of the check box, combine this flag with the BS_LEFTTEXT style (or with the equivalent BS_RIGHTBUTTON style).  
  BS_DEFPUSHBUTTON   Creates a push button that behaves like a BS_PUSHBUTTON style button, but has a distinct appearance. If the button is in a dialog box, the user can select the button by pressing the ENTER key, even when the button does not have the input focus. This style is useful for enabling the user to quickly select the most likely (default) option.  
  BS_FLAT   Specifies that the button is two-dimensional; it does not use the default shading to create a 3-D image. Note that the default Windows 10 theme is flat.  
  BS_GROUPBOX   Creates a rectangle in which other controls can be grouped. Any text associated with this style is displayed in the rectangle’s upper left corner.  
  BS_ICON   Specifies that the button displays an icon.  
  BS_LEFT   Left-justifies the text in the button rectangle. However, if the button is a check box or radio button that does not have the BS_RIGHTBUTTON style, the text is left justified on the right side of the check box or radio button.  
  BS_LEFTTEXT   Places text on the left side of the radio button or check box when combined with a radio button or check box style. Same as the BS_RIGHTBUTTON style.  
  BS_MULTILINE   Wraps the button text to multiple lines if the text string is too long to fit on a single line in the button rectangle.  
  BS_NOTIFY   Enables a button to send BN_KILLFOCUS and BN_SETFOCUS notification codes to its parent window. Note that buttons send the BN_CLICKED notification code regardless of whether it has this style. To get BN_DBLCLK notification codes, the button must have the BS_RADIOBUTTON or BS_OWNERDRAW style.  
  BS_OWNERDRAW   Creates an owner-drawn button. The owner window receives a WM_DRAWITEM message when a visual aspect of the button has changed. Note that this is not supported well within Legato.  
  BS_PUSHBUTTON   Creates a push button that posts a WM_COMMAND message to the owner window when the user selects the button.  
  BS_PUSHLIKE   Makes a button (such as a check box, three-state check box, or radio button) look and act like a push button. The button looks raised when it isn’t pushed or checked, and sunken when it is pushed or checked.  
  BS_RADIOBUTTON   Creates a small circle with text. By default, the text is displayed to the right of the circle. To display the text to the left of the circle, combine this flag with the BS_LEFTTEXT style (or with the equivalent BS_RIGHTBUTTON style). Use radio buttons for groups of related, but mutually exclusive choices.  
  BS_RIGHT   Right-justifies text in the button rectangle. However, if the button is a check box or radio button that does not have the BS_RIGHTBUTTON style, the text is right justified on the right side of the check box or radio button.  
  BS_RIGHTBUTTON   Positions a radio button’s circle or a check box’s square on the right side of the button rectangle. Same as the BS_LEFTTEXT style.  
  BS_TEXT   Specifies that the button displays text.  
  BS_TOP   Places text at the top of the button rectangle.  
  BS_VCENTER   Places text in the middle (vertically) of the button rectangle.  

 

9.6.5 ComboBox Class Styles

The following table lists the style bits that can be used with the combobox common control window class.

  Constant   Description  
  CBS_AUTOHSCROLL   Automatically scrolls the text in an edit control to the right when the user types a character at the end of the line. If this style is not set, only text that fits within the rectangular boundary is allowed.  
  CBS_DISABLENOSCROLL   Shows a disabled vertical scrollbar in the list box when the box does not contain enough items to scroll. Without this style, the scrollbar is hidden when the list box does not contain enough items.  
  CBS_DROPDOWN   Similar to CBS_SIMPLE, except that the list box is not displayed unless the user selects an icon next to the edit control.  
  CBS_DROPDOWNLIST   Similar to CBS_DROPDOWN, except that the edit control is replaced by a static text item that displays the current selection in the list box.  
  CBS_HASSTRINGS   Specifies that an owner-drawn combo box contains items consisting of strings. The combo box maintains the memory and address for the strings so the application can use the CB_GETLBTEXT message to retrieve the text for a particular item. For accessibility issues, see Exposing Owner-Drawn Combo Box Items  
  CBS_LOWERCASE   Converts to lowercase all text in both the selection field and the list.  
  CBS_NOINTEGRALHEIGHT   Specifies that the size of the combo box is exactly the size specified by the application when it created the combo box. Normally, the system sizes a combo box so that it does not display partial items.  
  CBS_OEMCONVERT   Converts text entered in the combo box edit control from the Windows character set to the OEM character set and then back to the Windows character set. This style is most useful for combo boxes that contain file names and applies only to combo boxes created with the CBS_SIMPLE or CBS_DROPDOWN style.  
  CBS_OWNERDRAWFIXED   Specifies that the owner of the list box is responsible for drawing its contents and that the items in the list box are all the same height. The owner window receives a WM_MEASUREITEM message when the combo box is created and a WM_DRAWITEM message when a visual aspect of the combo box has changed.  
  CBS_OWNERDRAWVARIABLE   Specifies that the owner of the list box is responsible for drawing its contents and that the items in the list box are variable in height. The owner window receives a WM_MEASUREITEM message for each item in the combo box when you create the combo box and a WM_DRAWITEM message when a visual aspect of the combo box has changed.  
  CBS_SIMPLE   Displays the list box at all times. The current selection in the list box is displayed in the edit control.  
  CBS_SORT   Automatically sorts strings added to the list box.  
  CBS_UPPERCASE   Converts to uppercase all text in both the selection field and the list.  

 

9.6.6 Edit Class Styles

  Constant   Description  
  ES_AUTOHSCROLL   Automatically scrolls text to the right by 10 characters when the user types a character at the end of the line. When the user presses the ENTER key, the control scrolls all text back to position zero.  
  ES_AUTOVSCROLL   Automatically scrolls text up one page when the user presses the ENTER key on the last line.  
  ES_CENTER   Centers text in a single-line or multi-line edit control.  
  ES_LEFT   Aligns text with the left margin.  
  ES_LOWERCASE   Converts all characters to lowercase as they are typed into the edit control.  
  ES_MULTILINE   Designates a multi-line edit control. The default is single-line edit control. When the multi-line edit control is in a dialog box, the default response to pressing the ENTER key is to activate the default button. To use the ENTER key as a carriage return, use the ES_WANTRETURN style. When the multi-line edit control is not in a dialog box and the ES_AUTOVSCROLL style is specified, the edit control shows as many lines as possible and scrolls vertically when the user presses the ENTER key. If you do not specify ES_AUTOVSCROLL, the edit control shows as many lines as possible and beeps if the user presses the ENTER key when no more lines can be displayed. If you specify the ES_AUTOHSCROLL style, the multi-line edit control automatically scrolls horizontally when the caret goes past the right edge of the control. To start a new line, the user must press the ENTER key. If you do not specify ES_AUTOHSCROLL, the control automatically wraps words to the beginning of the next line when necessary. A new line is also started if the user presses the ENTER key. The window size determines the position of the Wordwrap. If the window size changes, the Wordwrapping position changes and the text is redisplayed. Multi-line edit controls can have scrollbars. An edit control with scrollbars processes its own scrollbar messages. Note that edit controls without scrollbars. scrolling as described in the previous paragraphs and process any scroll messages sent by the parent window.  
  ES_NOHIDESEL   Negates the default behavior for an edit control. The default behavior hides the selection when the control loses the input focus and inverts the selection when the control receives the input focus. If you specify ES_NOHIDESEL, the selected text is inverted, even if the control does not have the focus.  
  ES_NUMBER   Allows only digits to be entered into the edit control. Note that, even with this set, it is still possible to paste non-digits into the edit control.  
  ES_OEMCONVERT   Converts text entered in the edit control. The text is converted from the Windows character set to the OEM character set and then back to the Windows character set.  
  ES_PASSWORD   Displays an asterisk (*) for each character typed into the edit control. This style is valid only for single-line edit controls.  
  ES_READONLY   Prevents the user from typing or editing text in the edit control. To change this style after the control has been created, use the EM_SETREADONLY message.  
  ES_RIGHT   Right-aligns text in a single-line or multiline edit control.  
  ES_UPPERCASE   Converts all characters to uppercase as they are typed into the edit control.  
  ES_WANTRETURN   Specifies that a carriage return be inserted when the user presses the ENTER key while entering text into a multiline edit control in a dialog box. If you do not specify this style, pressing the ENTER key has the same effect as pressing the dialog box’s default push button. This style has no effect on a single-line edit control.  

 

9.6.7 ListBox Class Styles

  Constant   Description  
  LBS_COMBOBOX   Notifies a list box that it is part of a combo box. This allows coordination between the two controls so that they present a unified UI. The combo box itself must set this style. If the style is set by anything but the combo box, the list box will regard itself incorrectly as a child of a combo box and a failure will result.  
  LBS_DISABLENOSCROLL   Shows a disabled horizontal or vertical scrollbar when the list box does not contain enough items to scroll. If you do not specify this style, the scrollbar is hidden when the list box does not contain enough items. This style must be used with the WS_VSCROLL or WS_HSCROLL style.  
  LBS_EXTENDEDSEL   Allows multiple items to be selected by using the SHIFT key and the mouse or special key combinations.  
  LBS_HASSTRINGS   Specifies that a list box contains items consisting of strings. The list box maintains the memory and addresses for the strings so that the application can use the LB_GETTEXT message to retrieve the text for a particular item. By default, all list boxes except owner-drawn list boxes have this style. You can create an owner-drawn list box either with or without this style.For owner-drawn list boxes without this style, the LB_GETTEXT message retrieves the value associated with an item (the item data).  
  LBS_MULTICOLUMN   Specifies a multi-column list box that is scrolled horizontally. The list box automatically calculates the width of the columns, or an application can set the width by using the LB_SETCOLUMNWIDTH message. If a list box has the LBS_OWNERDRAWFIXED style, an application can set the width when the list box sends the WM_MEASUREITEM message. A list box with the LBS_MULTICOLUMN style cannot scroll vertically–it ignores any WM_VSCROLL messages it receives. The LBS_MULTICOLUMN and LBS_OWNERDRAWVARIABLE styles cannot be combined. If both are specified, LBS_OWNERDRAWVARIABLE is ignored.  
  LBS_MULTIPLESEL   Turns string selection on or off each time the user clicks or double-clicks a string in the list box. The user can select any number of strings.  
  LBS_NODATA   Specifies a no-data list box. Specify this style when the count of items in the list box will exceed one thousand. A no-data list box must also have the LBS_OWNERDRAWFIXED style, but must not have the LBS_SORT or LBS_HASSTRINGS style. A no-data list box resembles an owner-drawn list box except that it contains no string or bitmap data for an item. Commands to add, insert, or delete an item always ignore any specified item data; requests to find a string within the list box always fail. The system sends the WM_DRAWITEM message to the owner window when an item must be drawn. The itemID member of the DRAWITEMSTRUCT structure passed with the WM_DRAWITEM message specifies the line number of the item to be drawn. A no-data list box does not send a WM_DELETEITEM message.  
  LBS_NOINTEGRALHEIGHT   Specifies that the size of the list box is exactly the size specified by the application when it created the list box. Normally, the system sizes a list box so that the list box does not display partial items. For list boxes with the LBS_OWNERDRAWVARIABLE style, the LBS_NOINTEGRALHEIGHT style is always enforced.  
  LBS_NOREDRAW   Specifies that the list box’s appearance is not updated when changes are made. To change the redraw state of the control, use the WM_SETREDRAW message.  
  LBS_NOSEL   Specifies that the list box contains items that can be viewed but not selected.  
  LBS_NOTIFY   Causes the list box to send a notification code to the parent window whenever the user clicks a list box item (LBN_SELCHANGE), double-clicks an item (LBN_DBLCLK), or cancels the selection (LBN_SELCANCEL).  
  LBS_OWNERDRAWFIXED   Specifies that the owner of the list box is responsible for drawing its contents and that the items in the list box are the same height. The owner window receives a WM_MEASUREITEM message when the list box is created and a WM_DRAWITEM message when a visual aspect of the list box has changed.  
  LBS_OWNERDRAWVARIABLE   Specifies that the owner of the list box is responsible for drawing its contents and that the items in the list box are variable in height. The owner window receives a WM_MEASUREITEM message for each item in the box when the list box is created and a WM_DRAWITEM message when a visual aspect of the list box has changed. This style causes the LBS_NOINTEGRALHEIGHT style to be enabled. This style is ignored if the LBS_MULTICOLUMN style is specified.  
  LBS_SORT   Sorts strings in the list box alphabetically.  
  LBS_STANDARD   Sorts strings in the list box alphabetically. The parent window receives a notification code whenever the user clicks a list box item, double-clicks an item, or cancels the selection. The list box has a vertical scrollbar, and it has borders on all sides. This style combines the LBS_NOTIFY, LBS_SORT, WS_VSCROLL, and WS_BORDER styles.  
  LBS_USETABSTOPS   Enables a list box to recognize and expand tab characters when drawing its strings. Use the ListBoxSetTabPositions function to set the tab stops in dialog units.  
  LBS_WANTKEYBOARDINPUT   Specifies that the owner of the list box receives WM_VKEYTOITEM messages whenever the user presses a key and the list box has the input focus. This enables an application to perform special processing on the keyboard input.  

 

9.6.8 Scrollbar Class Styles

  Constant   Description  
  SBS_BOTTOMALIGN   Aligns the bottom edge of the scrollbar with the bottom edge of the rectangle defined by the x, y, nWidth, and nHeight parameters of control resource. The scrollbar has the default height for system scrollbars. Use this style with the SBS_HORZ style.  
  SBS_HORZ   Designates a horizontal scrollbar. If neither the SBS_BOTTOMALIGN nor SBS_TOPALIGN style is specified, the scrollbar has the height, width, and position specified by the x, y, nWidth, and nHeight parameters of control resource.  
  SBS_LEFTALIGN   Aligns the left edge of the scrollbar with the left edge of the rectangle defined by the x, y, nWidth, and nHeight parameters of control resource. The scrollbar has the default width for system scrollbars. Use this style with the SBS_VERT style.  
  SBS_RIGHTALIGN   Aligns the right edge of the scrollbar with the right edge of the rectangle defined by the x, y, nWidth, and nHeight parameters of control resource. The scrollbar has the default width for system scrollbars. Use this style with the SBS_VERT style.  
  SBS_SIZEBOX   Designates a size box. If you do not specify either the SBS_SIZEBOXBOTTOMRIGHTALIGN or the SBS_SIZEBOXTOPLEFTALIGN style, the size box has the height, width, and position specified by the x, y, nWidth, and nHeight parameters of the control resource.  
  SBS_SIZEBOXBOTTOMRIGHTALIGN   Aligns the lower right corner of the size box with the lower right corner of the rectangle specified by the x, y, nWidth, and nHeight parameters of control resource. The size box has the default size for system size boxes. Use this style with the SBS_SIZEBOX style.  
  SBS_SIZEBOXTOPLEFTALIGN   Aligns the upper left corner of the size box with the upper left corner of the rectangle specified by the x, y, nWidth, and nHeight parameters of control resource. The size box has the default size for system size boxes. Use this style with the SBS_SIZEBOX style.  
  SBS_SIZEGRIP   Same as SBS_SIZEBOX, but with a raised edge.  
  SBS_TOPALIGN   Aligns the top edge of the scrollbar with the top edge of the rectangle defined by the x, y, nWidth, and nHeight parameters of the control resource. The scrollbar has the default height for system scrollbars. Use this style with the SBS_HORZ style.  
  SBS_VERT   Designates a vertical scrollbar. If you do not specify either the SBS_RIGHTALIGN or the SBS_LEFTALIGN style, the scrollbar has the height, width, and position specified by the x, y, nWidth, and nHeight parameters of the control resource.  

  

9.6.9 Static Class Styles

  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 and the text is centered 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 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 multi-line 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 and the text is left-aligned 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 and the text is left-aligned 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, and thus 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 LoadIcon. SS_REALSIZEIMAGE is always used in conjunction with SS_ICON. SS_REALSIZEIMAGE uses LoadIcon, overriding the process normally followed under SS_ICON.  
  SS_RIGHT   A simple rectangle and the text is right-aligned 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 and 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.  

 

9.6.10 Trackbar Class Styles

  Constant   Description  
  TBS_AUTOTICKS   The trackbar control has a tick mark for each increment in its range of values. The frequency of the ticks can be adjusted via the TrackbarSetTickFrequency function.  
  TBS_BOTH    The trackbar control displays tick marks on both sides of the control. This will be both top and bottom when used with TBS_HORZ or both left and right if used with TBS_VERT  
  TBS_BOTTOM    The trackbar control displays tick marks below the control. This style is valid only with TBS_HORZ  
  TBS_DOWNISLEFT    By default, the trackbar control uses down equal to right and up equal to left. Use the TBS_DOWNISLEFT style to reverse the default, making down equal left and up equal right.   
  TBS_ENABLESELRANGE    The trackbar control displays a selection range only. The tick marks at the starting and ending positions of a selection range are displayed as triangles (instead of vertical dashes), and the selection range is highlighted.  
  TBS_FIXEDLENGTH    The trackbar control allows the size of the slider to be changed with TrackbarSetSliderSize function.   
  TBS_HORZ    The trackbar control is oriented horizontally. This is the default orientation.  
  TBS_LEFT    The trackbar control displays tick marks to the left of the control. This style is valid only with TBS_VERT  
  TBS_NOTHUMB    The trackbar control does not display a slider.  
  TBS_NOTICKS    The trackbar control does not display any tick marks.   
  TBS_NOTIFYBEFOREMOVE    Trackbar should notify parent before repositioning the slider due to user action (enables snapping). When present, the TRBN_THUMBPOSCHANGING is sent via the action procedure.  
  TBS_REVERSED    This style bit is used for "reversed" trackbars, where a smaller number indicates "higher" and a larger number indicates "lower." It has no effect on the control; it is simply a label that can be checked to determine whether a trackbar is normal or reversed.   
  TBS_RIGHT    The trackbar control displays tick marks to the right of the control. This style is valid only with TBS_VERT.  
  TBS_TOP    The trackbar control displays tick marks above the control. This style is valid only with TBS_HORZ.  
  TBS_TOOLTIPS    The trackbar control supports tooltips. When a trackbar control is created using this style, it automatically creates a default tooltip control that displays the slider's current position. You can change where the tooltips are displayed by using the TrackbarSetToolTipPosition function.  
  TBS_TRANSPARENTBKGND    Background is painted by the parent.  
  TBS_VERT    The trackbar control is oriented vertically. The default is horizontal.