Hi,

Look at
Code:
int GetWindowText(
  HWND hWnd,        // handle to window or control
  LPTSTR lpString,  // text buffer
  int nMaxCount     // maximum number of characters to copy
);

WM_GETTEXT

WM_GETTEXTLENGTH