I’ve created a simple window with:
CreateWindowExW(
WS_EX_TOPMOST,
L"RichEdit20W",
L"window_text",
WS_OVERLAPPEDWINDOW | WS_BORDER | WS_HSCROLL | WS_VSCROLL | ES_MULTILINE //...
now every time I hange “window text” parameter, both control and window title is changing, the same with SetWindowTextW() and SendMessageW(hwnd, WM_SETTEXT, ...).
Edit controls (and rich edit controls) are not really designed to have “titles” as such. It is quite unusual to use a control as a top-level window. Instead, you should register your own window class to use for the top-level window (which can then have its own caption text) and make the edit control a child window.