-static char *getdlgitemtext_alloc(HWND hwnd, int id)
-{
- char *ret = NULL;
- int size = 0;
-
- do {
- size = size * 4 / 3 + 512;
- ret = sresize(ret, size, char);
- GetDlgItemText(hwnd, id, ret, size);
- } while (!memchr(ret, '\0', size-1));
-
- return ret;
-}
-