Aldo, You may want to consider adding the following function to the RichEdit control:
########################################################################### # (@)METHOD:TextLength() # Returns the text length of the RichEdit control LRESULT TextLength(handle) HWND handle PREINIT: GETTEXTLENGTHEX tl; CODE: ZeroMemory(&tl, sizeof(GETTEXTLENGTHEX)); tl.flags = GTL_DEFAULT; tl.codepage = CP_ACP; RETVAL = SendMessage( handle, EM_GETTEXTLENGTHEX, (WPARAM) (GETTEXTLENGTHEX FAR *) &tl, 0 ); OUTPUT: RETVAL Trevor S Garside [EMAIL PROTECTED]