- int len = ::SizeofResource(wxGetInstance(), hResource) + 1;
- wxChar *s = new wxChar[len];
- wxStrlcpy(s, theText, len);
+ int len = ::SizeofResource(wxGetInstance(), hResource);
+ char *s = new char[len + 1];
+ memcpy(s, theText, len);
+ s[len] = '\0'; // NUL-terminate in case the resource itself wasn't