Compartilhar via


CTEXT Control (Compact 2013)

3/28/2014

This resource-definition statement creates a centered-text control. The control is a simple rectangle that displays the specified text centered in the rectangle. The text is formatted before it is displayed. Words that would extend past the end of a line are automatically wrapped to the beginning of the next line.

CTEXT text, id, x, y, width, height [[, style [[, extended-style]]]]

Parameters

  • text
    Specifies the text that is displayed in the center of the control.
  • style
    Specifies the control styles. This value can be any combination of the following styles: SS_CENTER, WS_TABSTOP, and WS_GROUP.

    If you do not specify a style, the default style is SS_CENTER | WS_GROUP.

Remarks

The CTEXT statement, which you can use only in a DIALOG statement, defines the text, identifier, dimensions, and attributes of the control.

Example

The following code example shows how to create a centered-text control that is labeled Filename.

CTEXT "Filename", 101, 10, 10, 100, 100 

See Also

Reference

Resource-Definition Statements
CONTROL Control
DIALOG Resource
LTEXT Control
RTEXT Control