Hi,

I'm trying to write text to a field by using FldSetTextPtr. However, the Ptr
I'm pointing the field to is used to write to more than one field, and so is
slightly 'turbulent' (It's being re-initialized/re-written lots). Is it ok
to use this method, or should I assign individual memory space for each text
field that I have?

static Boolean FldWrite (Word FieldID, CharPtr newtext)
{
        FieldPtr fld;

        fld=GetFldPtr(FieldID);

        if(fld==NULL)
                FrmCustomAlert(CustomAlert,"","FldWrite:Not a valid field for this
form","");
        else


                FldSetTextPtr(fld, newtext);    //gets text pointer in valid field
                FldDrawField(fld);
        }
        return (0);
}

Thanks,

Stuart Norton,
University of Southampton, UK

Reply via email to