Please enable JavaScript to view this site.

When a control is created (CTLOP_ADD), an internal numeric ID is assigned to it and returned to you. For all other operations on the control (change, delete, etc.) you typically need to specify the ID value in order to identify the control. The standard data type for a control ID is B,2. For controls that are never manipulated after creation, such as static text controls, and which will be deleted indirectly by deleting the parent dialog or group, or by using Tab(-1,0), you may not have any use for the control ID and can just specify a literal zero in its place when creating the control.

It is also possible to use alphanumeric control identifiers, in which case you can pre-establish your own ID's, possibly eliminating the need to save the ID returned from the control creation operation. Alphanumeric ID's can be up to 23 characters long, are case-sensitive, must start with a letter, and may contain letters, numbers, dashes and apostrophes. They also must be unique across all controls that exist at one time.

When you specify an alphanumeric control identifier in the ctlid parameter, the value is not updated on return from the CTLOP_ADD operation. But a numeric control ID is nonetheless assigned internally. Subsequent uses of the alphanumeric ID are internally converted to the equivalent numeric ID. Although most routines allow either the numeric or alphanumeric ID, there are some which only support the numeric ID. In that case, you can get the numeric ID by one of these methods:

On return from the CTLOP_ADD operation, the cstatus variable will be set to the numeric ID. If successful; a value less than zero indicates an error.
Opcode CTLOP_INFO may be used: specify the alphanumeric ID in the ctlid parameter; the corresponding numeric ID will be returned in the cstatus parameter.

See Control names for additional information on this topic.

Created with Help+Manual 9 and styled with Premium Pack Version 5 © by EC Software