更新时间:2023-10-14 09:10:58
您可以简单地使用 EM_SETSEL
第一,然后做你的 EM_REPLACESEL
。
You can simply use a EM_SETSEL
first and then do your EM_REPLACESEL
.
例如:
SendMessage(hwnd, EM_SETSEL, WPARAM(0), LPARAM(-1) );
SendMessage(hwnd, EM_REPLACESEL, WPARAM(TRUE), LPARAM(str) );