heh having a little trouble
http://support.microsoft.com/default...;en-us;Q109550
my edit controls are set ES_READONLY by the way
Code:
hwndDisplayBox = CreateWindow("EDIT",
NULL,
WS_CHILD | WS_VISIBLE | WS_VSCROLL |
ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL | WS_BORDER | ES_READONLY,
0, 0, 0, 0,
hwnd,
(HMENU) ID_DISPLAYBOX,
(HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE),
NULL);
//lower down in another function :p
CHAR szBuffer []= "Connecting to server";
HWND hEdit = GetDlgItem (hwndDisplayBox, ID_DISPLAYBOX);
int ndx = GetWindowTextLength (hEdit);
SendMessage (hEdit, EM_SETSEL, (WPARAM)ndx, (LPARAM)ndx);
SendMessage (hEdit, EM_REPLACESEL, 0, (LPARAM) ((LPSTR) szBuffer));
unfortunatly im not getting any text showing up from the above...
i removed the setfocus as it seemed redundant according to msdn since im not allowing the user to input anything...
well im puzzled