DlgControlId function

DlgControlId(Identifier)

Used within a dialog function to return the numeric identifier for the dialog box control specified by Identifier, the string identifier of the dialog box control. Numeric identifiers are numbers, starting at 0 (zero) , that correspond to the positions of the dialog box control instructions within a dialog box definition. For example, consider the following instruction in a dialog box definition:
CheckBox 90, 50, 30, 12, , .MyCheckBox

The instruction DlgControlId(MyCheckBox) returns 0 (zero) if the CheckBox instruction is the first instruction in the dialog box definition, 1 if it is the second, and so on.

In most cases, your dialog functions perform actions based on the string identifier of the control that was selected.