Using the form pointer passed to the form, field, or event function, you can get the pointer to the current item.
To get the pointer to the current item on the form, call curitemp():
|
Caution: You will have to cast the returned pointer to the appropriate type.
curitemp() returns a pointer to the current item, which may be a data field, menu field, memo, pushbutton, or scrollable region.
If you know that the current item is a field, and that it cannot be a scrollable region, you can use the more specific function, curfldp():
|
Alternatively, if you know that the current item is of a certain type, you can use the following functions, which do the casting for you. These functions are only valid in the appropriate context. For instance, if you are writing a begin-field or end-field function for a data field, you can call:
|
to get the pointer to the data field.
To get the pointer to the current memo field for the form, call:
|
To get the pointer to the current menu field for a menu form, call:
|
To get the pointer to the current scrollable region for the form, call:
|
This function returns a NULLP if the user is not in a scrollable region.