Can anyone help,
I am having problems displaying text in a non editable field. I am trying
to display ASCII characters that are coming in on the serial port, but I can
only display 5 characters on the emulator (and only 2 on the palm). If I
send less than 5 characters it will still display 5, the last ones will be
what ever was last in the buffer. Here is a sample of the code that I am
using
MemHandle htext;
FieldPtr fld;
FormPrt frm;
char* ptext;
buffer[81]
htext = MemHandleNew(81);
frm = FrmGetActiveForm();
fld = (FieldPtr)FrmGetObjectPtr (frm, FrmGetObjectIndex(frm, MyField));
FldSetTextHandle(fld, htext);
// charactors are loaded form port into buffer
ptext=MemHandleLock(htext);
StrCopy(ptext,buffer);
MemHandleUnlock(htext);
FrmDrawForm(frm);
// on exit from the program
MemHandleFree(htext);
Thanks
Brad
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/