endless edit control
1).well as the topic says im trying to create an edit control where when the edit box reaches a length of 50 lines it removes the top line and shifts the text up and therefore always has 50 lines in it
any ideas or suggestions? i think i may be going about this a little backwards... im guessing that by replacing the top line with a "" i can clear the \r\n so it will move... up i seem to be having some trouble doing this :(
SendMessage (hedit, EM_SETSEL, 0, linelength);//select all of the first line
SendMessage (hedit, EM_REPLACESEL, 0, (LPARAM) ((LPSTR) ""));//replace with nothing so i can move this line up
int ndx = GetWindowTextLength (hedit);
SendMessage (hedit, EM_SETSEL, (WPARAM)ndx, (LPARAM)ndx);
SendMessage (hedit, EM_REPLACESEL, 0, (LPARAM) ((LPSTR) message.c_str()));
2). how would i go about having a data entry box that clears after each enter? is this a special type of control or do i have to check my input and if i get a return clear the edit control?
i await your help and insight
1. See if the attached helps you...
2. You can subclass the edit control to catch the return then use SetWindowText() to blank the control.
i manadged to implement the subclass though and its working well :)
Don't you just hate that when that happens!