IT_CTRL 

Use

The IT_CTRL structure provides information on a single control on the screen.

The parent structure, IT_SCREEN points to as many IT_CTRL structures as there are controls on the screen.

 

The IT_CTRL structure describes the type of control, its location on the screen, its relationship to other controls on the same screen, and it also indicates its state, for example, whether the control was changed or selected in the current event.

If the control is a table control or if it is a tab strip, then the IT_CTRL also points to the IT_TABLEINFO or IT_TABSTRIPINFO structures, holding information specific to the table or the tab strip respectively.

Syntax

typedef struct IT_CTRL_t {
short dlgtype;
short flags;
char name[MAX_NAME];
char value[MAX_VALUE];
long top;
long left;
long bottom;
long right;
long dwStyle;
long dwOffset;
unsigned short nAreaID;
unsigned short nBlockID;
unsigned short nGroupID;
unsigned short nContainerID;
HANDLE hCtl;
short cParent;
short cChild;
short cNext;
short nColor;
char szTableName[MAX_TABLE_NAME]; /* if CTRL_FLAGS_FIELDNAMES */
char szFieldName[MAX_FIELD_NAME]; /* if CTRL_FLAGS_FIELDNAMES */
char szDataElement[MAX_DATA_ELEM]; /* only GV_EXTENDED_SCREEN */
char szDESupplement[MAX_DE_SUPP]; /* only GV_EXTENDED_SCREEN */
} IT_CTRL;
typedef IT_CTRL *PIT_CTRL;
#define IT_CTRL_SIZE (sizeof(IT_CTRL))

Members

dlgtype

Values describing the control type

flags

Indicates additional information about the control if the control had changed during this event.

name

String name of control. If CTRL_FLAGS_FIELDNAMES is on, the batch input name of the control; otherwise a string indicating the type of control.

value

Contents or value of control.

top

Coordinates of top of the control on screen. See the discussion of Specifying Control Coordinates.

left

Coordinates of the left of the control on screen. See the discussion of Specifying Control Coordinates.

bottom

Coordinates of bottom of the control on screen. See the discussion of Specifying Control Coordinates.

right

Coordinates of right of the control on screen. See the discussion of Specifying Control Coordinates.

dwStyle

Flags indicating visual style of the control:

dwOffset

If CTRL_FLAGS_CONTROLINFO is set (which indicates that the control described by IT_CTRL is either a table or a tabstrip control), then dwOffset is the offset to add to the IT_EVENT pointer to get a to the table control or the tab strip control information.

If the control is not a table control or a tabstrip control, then dwOffset is zero.

nAreaID

Screen area ID.

nBlockID

Block ID within a step loop.

nGroupID

Group ID for radio buttons. Radio buttons with the same area, block, and group Ids are in the same group and are mutually exclusive.

nContainerID

Container ID for a manager. For non-manager controls, the container ID for the controlís parent manager.

hCtl

Handle to the control.

cParent

Index of parent of this control. -1 if no parents.

cChild

Index of the first child of this control.

cNext

Index to the next peer of this control.

nColor

Color number of specified control.

szTableName

Name of table, available when CTRL_FLAGS_FIELDNAMES is set.

szFieldName

Name of field, available when CTRL_FLAGS_FIELDNAMES is set.

szDataElement

Data element, available only when GV_EXTENDED_SCREEN is used.

szDESupplement

Data element supplement, available only when GV_EXTENDED_SCREEN is used.

Comments

All fields in IT_CTRL are read-only except value and bModified. To send information back to the server, change "value" and set bModified to TRUE.

See Also

IT_EVENT, IT_SCREEN, IT_TABLEINFO, Control Hierarchy, Specifying Control Coordinates, Finding Controls.