Line-by-line Anatomy of Menu.c
(Cont.)
objType = FrmGetObjectType( frm, focus );
This function FormObjectKind FrmGetObjectType( const FormType *formP, UInt16 objIndex ) returns the type of an object.
formP
: Pointer to the form object (FormType structure)
objIndex
: Index of an object in the form.
You can obtain this by using FrmGetObjectIndex( ).
return( TblGetCurrentField( FrmGetObjectPtr( frm, focus ) ) );
This function FieldPtr TblGetCurrentField( const TableType *tableP ) returns a pointer to the FieldType in which the user is currently editing a text item, or NULL
if the table is not in edit mode.
tableP
: Pointer to a table object. (See TableType.)
StrPrintF ( cursor, "%2d/%-2d", curRec+1, MAX_REC );
This function Int16 StrPrintF( Char *s, const Char *formatStr, ... ) implements a subset of the ANSI C sprintf
call, which writes formatted output to a string.
It returns number of characters written to destination string, or returns a negative number if there is an error.
s
: Pointer to a string into which the results are written
formatStr
: Pointer to the format specification string
...
: Zero or more arguments to be formatted as specified by formatStr
StrCopy( p, str );
This function Char *StrCopy( Char *dst, const Char *src ) copies one string to another.
dst
: Pointer to the destination string
src
: Pointer to the source string
Use this function instead of the standard ANSI C strcpy
routine.