So, you'd need to retrieve the text from your edit control, store that and then transfer it to your static control. You could try something like what is shown below, though it's an old, layman's way of doing it.
Code:
char* temp_buf;
std::string AddString;
int len = GetWindowTextLength(GetDlgItem(hwnd,ID_EDITBOX));
if(len > 0 )
{
temp_buf = (char*)GlobalAlloc(GPTR, len + 1);
GetDlgItemText(hwnd, ID_EDITBOX, temp_buf, len + 1);
AddString = temp_buf;
SetDlgItemText((HWND)hwnd,IDS_STATICBOX, AddString.c_str());
GlobalFree((HANDLE)temp_buf);
}