>I used to think, FrmCopyLabel() works similar to StrCopy() - copying the
>data from source to destination and overwrite's it.
>That's why the new string must not be longer than the initial string. In
>this case, there would be no reason, why the source string has to exist as
>long as the label. And the Palm OS reference manual doesn't say so either.
You're correct; FrmCopyLabel calls StrCopy internally to copy the text into
the memory already allocated for the label. The parameter passed to
FrmCopyLabel doesn't need to exist after the routine returns.
I think the previous poster was confusing FrmCopyLabel with CtlSetLabel,
which merely stores the pointer given to it, and doesn't make a copy of the
string. (And it isn't for label objects, but for changing the text on a
Control, like a button or something. A label isn't a control, it is a
label. Yes, this can be confusing.)
-David Fedor
Palm Developer Support
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/