hi im trying to append text to and edit box that already have some text, i use EM_SETSEL but the new text allways replace the old one i created a edit box like:
Code:
EditB = CreateWindowEx(NULL,"EDIT","",
WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL |
ES_LEFT | ES_MULTILINE | ES_NOHIDESEL
| ES_AUTOHSCROLL | ES_AUTOVSCROLL,0,0,528,482,
hwnd,(HMENU)ID_EDIT,GetModuleHandle(NULL),NULL);
and the:
Code:
int tamanio = 0;
//...a loop starts here
...new string linea here(reading from file)
SetDlgItemText(hwnd,ID_EDIT,linea);
tamanio=GetWindowTextLength(EditB)
SendMessage(EditB,EM_SETSEL,tamanio,tamanio);
//...here a loop returns
i think the SetDlgItemText function is the problem, is there another way to append text to an editbox, or what im doing wrong?
thanks for any help