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 thisCode:int boxlength=SendMessage(hedit,EM_GETLINECOUNT,0,0); int linelength=SendMessage(hedit,EM_LINELENGTH,0,0); if(boxlength>49) { 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); message+="\r\n"; 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



LinkBack URL
About LinkBacks



