+int BC_TextBox::wdemand(int len)
+{
+ if( wtext && wsize >= len ) return 0;
+ int nsize = len + wlen/2 + BCTEXTLEN;
+ wchar_t *ntext = new wchar_t[nsize+1];
+ ntext[nsize] = 0;
+ memcpy(ntext, wtext, wsize*sizeof(wtext[0]));
+ delete [] wtext; wtext = ntext; wsize = nsize;
+ return 1;
+}
+
+int BC_TextBox::tdemand(int len)
+{
+ if( text && tsize >= len ) return 0;
+ int tlen = !text ? 0 : strlen(text);
+ int nsize = len + tlen/2 + BCTEXTLEN;
+ char *ntext = new char[nsize+1];
+ ntext[nsize] = 0;
+ memcpy(ntext, text, tsize*sizeof(text[0]));
+ delete [] text; text = ntext; tsize = nsize;
+ return 1;
+}
+