When creating a child window, you can use the hMenu argument as a child window identifier. This example uses the identifier 0xED. In real code, you should use a constant, rather than a magic number.
Once, you have a child window with an identifier, you can use the SendDlgItemMessage, GetDlgItemText and SetDlgItemText functions to interact with it:
CreateWindowEx(WS_EX_CLIENTEDGE, TEXT("EDIT"), TEXT("Write here!"), WS_CHILD | WS_VISIBLE,
0, 0, 0, 0,
hwnd, (HMENU) 0xED, GetModuleHandle(NULL), NULL);
Alternatively, if you need its HWND, you can use the GetDlgItem function:
SetDlgItemText(hwnd, 0xED, TEXT("Hello"));
The alternative method to interact with a child window is to store its HWND when you create it. However, using an identifier is generally preferable.
MoveWindow(GetDlgItem(hwnd, 0xED), rc.left, rc.top, rc.right, rc.bottom, TRUE);