If you know in advance the handles of the edits then sending a WM_SETTEXT msg with appropriate params will work (SetDlgItemText does the same thing, SetWindowText too) to set the text to anything you want, including clearing all text. To respond to user input you must trap the EN_CHANGE msg within the parent's WM_COMMAND handler.
If you don't know in advance what the edit handles are, or if there are a variety of cntrls then you might want to consider using EnumChildWindows. You will have to define a callback fn which is called for each child cntrl. The callback will be sent the handle of each child wnd in turn so you can use GetClassName on that handle to see whether it is "EDIT". Return FALSE from the callback fn to signal you are finished.
eg.
Code:
const int NUM_EDITS=10; //eg you have 10 edit cntrls
int nNumEditCntrls=NUM_EDITS;
BOOL CALLBACK MyEnumChildProc(HWND hwnd,LPARAM lParam)
{
if (!lstrcmp(CharUpper(GetClassName(hwnd)),TEXT("EDIT")))
{
//cntrl is EDIT so clear it
SetWindowText(hwnd,TEXT(""));
nNumEditCntrls--;
if (!nNumEditCntrls)
{
return FALSE; //no more edits
}
}
return TRUE; //keep enumerating child wnd's
}
////////////////////////////////
//To call the EnumChildProc:
EnumChildWindows(hParent,MyEnumChildProc,0);
Hope that is of some use to you.