|
From: Noorez K. <lor...@ho...> - 2005-06-12 23:24:19
|
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);
}
_________________________________________________________________
Take advantage of powerful junk e-mail filters built on patented Microsoft®
SmartScreen Technology.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.
|