The first line on the Win32 Reference Manual about 'EM_EXSETSEL' says:
Code:
The EM_EXSETSEL message selects a range of characters and/or OLE objects in a rich edit control.
See also the CHARRANGE definition:
Code:
The CHARRANGE structure specifies a range of characters in a rich edit control.
I'm not tested it, but maybe you want try to create a rich edit control instead an edit control. On a simple edit control (no matter if multiline, autoscrolls, etc), the message to get the text length is WM_GETTEXTLENGTH.
Hope that helps
Niara