If I use CtlNewControl as follows:

Char ctl_label[100];
FormPtr form;
ControlPtr ctl;
UInt16 x, y, height, width;

StrCopy (ctl_label, "Selecting...");
form = FrmGetActiveForm();
FntSetFont (boldFont);
width = 10+FntCharsWidth(ctl_label, StrLen(ctl_label));
x = 160-width;
x /= 2;
height = 10+FntCharHeight();
y = 160-height;
y /= 2;
FntSetFont (stdFont);
ctl = CtlNewControl (&form, 9999, buttonCtl, ctl_label, x, y, width, height, boldFont, 
0, false);


As soon as I call this, one of the other objects on my form suddenly has
its label corrupted. 9999 is unique, but I've tried changing it to others,
/w no success. What's up with this?




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to