|
From: Per W. <pw...@ia...> - 2005-06-13 04:16:43
|
I'm not so sure if there is a question in here somewhere... Ever tried too
google? M$ have just about all information available online!
Anyway, WM_SETSEL is obviously wrong.
WPARAM is start, end LPARAM is end.
WM_REPLACESEL: WPARAM: Can undo, LPARAM text.
/Per W
On Sun, 12 Jun 2005, Noorez Kassam wrote:
> I'm testing replacing text in an EDIT control. The tutorials that I read
> weren't very clear. Here is the test method:
>
> void TEST(HWND main, HWND edit)
> {
> int nLength = GetWindowTextLength(GetDlgItem(main, IDC_MAIN_EDIT));
> char* pszText = "BYE";
> SendMessage(edit, EM_SETSEL, (WPARAM)nLength, (LPARAM)nLength);
> SendMessage(edit, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)pszText);
> }
>
|