if you want to get ALL the text in the window you could use:
Code:
GetWindowText(hEdit, text, GetWindowTextLength (hedit) + 1);