Edit Control and CR count
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi, It is ever possible that nobody have met what I call the CR count problem of an Edit control ? What I mean is that an Edit control of Microsoft is not able to count right the CRLF characters ! Yes, just the ones that Microsoft itself keeps alive ! What it does is just to ignore the '\r' characters in the count, both when using
EM_GETSEL
andEM_SETSEL
I made a workaround, which is to count all the CR characters both before the beginning of a selection and inside the selection itself, and then make some adjust to the counts. But this code is CPU consuming and more orrible than here described. Does anyone know a better workaround, or better a solution for this ... ? Marcello