GetDlgItemText(hwnd, ID_EDITBOX, szBuffer, MAX_PATH);
int len = strlen(szBuffer)
szBuffer[len-1]=0;
SetDlgItemText(hwnd,ID_EDITBOX,szBuffer);
The above removes one character from the edit control, so that if the edit control originally read "textbox" the new result in the edit control would read "textbo"