Specifying the Flags Parameter  

The flags parameter of the ItEv_FindControl and ItEv_FindControlEx functions is a set of bits creating a mask that controls how you search for controls on the screen. The flags parameter has two roles:

Specifying How the Search is Performed

The GUI Library provides a set of macros for specifying the various aspects of the search. The following table describes these macros and how to use them:

Macro

Use to Specify

FC_FIND_STARTING_FROM(x)

The index of the control to start the search from.

x is the zero-based index of the control on the screen.

For example, if you wish to start searching after the third control on the screen, specify FC_FIND_STARTING_FROM(3).

FC_LEFT

Searching to the left

FC_RIGHT

Searching to the right

FC_DOWN

Searching down

FC_UP

Searching going up

FC_COUNT(int)

How many controls to search through.

Int is the number of controls to search.

For example if you specified FC_FIND_STARTING_FROM(2), and you specify FC_COUNT(6) the search starts at the third control and continues for six controls, stopping the search after the eighth control.

FC_FIND_TYPE(typ)

The type of control to search for. For example typ can be CTRL_EDIT for an edit box type of control.

See dlgtype values for the values you can specify for control type in typ.

You do not have to specify any of the above parameters of the search.

Specifying How to Interpret the ITCCTRL Parameter

You can also use the flags parameter of the ItEv_FindControl and ItEv_FindControlEx functions to specify how to interpret the specification of the ITCCTRL parameter, that is whether the ITCCTRL parameter specified using the name of the control or the contents of the control.

Use one of the following macros to specify how the ITCCTRL parameter of the function is interpreted:

Macro

Specifies that..

FC_FIND_VALUE

the control specified in the ITCCTRL parameter of the function is using the value (contents) of the control.

FC_FIND_FIELD

the control specified in the ITCCTRL parameter of the function is using the technical name of the control.

You do not have to use either of these macros. Another way to specify how to interpret the ITCCTRL parameter of the ItEv_FindControl or ItEv_FindControlEx function is to do so directly in the ITCCTRL parameter (see the topic Specifying the Control Parameter).

However, if you do use either the FC_FIND_VALUE or the FC_FIND_FIELD macros as part of specifying the flags parameter, this specification takes precedence over how you specify the control parameter directly in the function.

Note that these two macros are mutually exclusive: you can only use one of them. If you specify both, they are both ignored.