Specifying the Control Parameter 

For functions that accept an ITCCTRL parameter, such as: ItEv_GetControlInfo, ItEv_SetCheck, ItEv_SetControlInfo, ItEv_SetCurPosByCtrl, ItEv_SetTableColumnPermutation, ItEv_SetValue, and ItEv_SetWidth, you can specify the ITCCTRL parameter using one of the following:

You specify the control as a string. The string is interpreted as the name of the control by default, unless you use one of the following two macros to specify that value name or index should be used:

For example, the following code selects (sets) the radio button whose label is "Attributes".

ItEv_SetCheck(pEvt, ITVALUE_NAME("Attributes"), 1);

The following example sets control # 4 on the screen (assuming that it is a check box or a radio button).

ItEv_SetCheck (pEvt, ITCTRL_IDX(4), 1);

Specifying Controls for the ItEv_FindControl* functions

You can use the above two macros with the ItEv_FindControl* functions, but you only need to use them if you do not specify the flags parameter of these functions. For example, the following code finds the first control with "Address" as a value.

ItEv_FindControl(pEvt, ITVALUE_NAME("Address"), 0);

Because the above example does not specify flags (that is, it specifies zero for the flags parameter), you need to specify how to interpret the specification of the control, as with the other ITEv_* functions.

However, if you specify flags with the ItEv_FindControl* functions, it is redundant to use either ITVALUE_NAME or ITCTRL_IDX, because the flags parameter allows you to use the macros FC_FIND_VALUE or FC_FIND_FIELD to specify how to interpret the ITCCTRL parameter. As the matter of fact, once you use one of these macros in the flags parameter, your specification at the ITCCTRL parameter is ignored (that is, specifying the FC_FIND_VALUE or the FC_FIND_FIELD in flags takes precedence). See the discussion in the topic Specifying ItEv_FindControl* Flags