#define TEXT_MAX_LEN 20 char strText[TEXT_MAX_LEN+1]; GetDlgItemText(hWndDlg, IDC_EDIT_ITEM, strText, TEXT_MAX_LEN);