Hi,
I sequentially created a number of controls using CtlNewControl with
labels "A" to "Z":
CtlNewControl(ppFrm, wIdCtl, pushButtonCtl, rtcBuf,
Rect.topLeft.x,
Rect.topLeft.y,
Rect.extent.x,
Rect.extent.y,
(FontID)HebComFontId, 0, true);
rtcBuf is a 2Char long Textbuffer for the label and always has an End-0.
PalmOS places the textbuffer directly after the ControlType structure in
memory. When button "U" is created, it is placed immediately after the
text buffer of button "T". This was no problem for all buttons "A" to
"T". But starting with button "U", the text buffer of the button which
is situated in memory immediately before it, is injured and transformed
from 0x54,0x00 to 0x54,0x06. Consequently, next refresh time
(1) Nonsens is written on button "T", because a '\0' at the end is
missing (it is necessary)
(2) the label received from CtlGetLabel is nonsense, maybe something
like "[EMAIL PROTECTED]".
I can't tell how to handle this. Can you?
Thank you!
PS
If that helps - I was able to observe, that button "T" was moved in
memory some bytes forward, when button "U" was created.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/