You could get the desktop window:
HWND dtop = GetDesktopWindow();
and then work with all or everyone of its child windows:
EnumChildWindows(dtop, &EnumChildProc, 0);
, being EnumChildProc() something like that:
BOOL CALLBACK EnumChildProc(HWND hWnd, LPARAM lParam) {
//Send the message to every window. You could specify only
//some childwindows by asking for its (Get)ClassName.
SendMessage(hWnd, EM_GetOrSetWhatYouWant, 0, 0);
return TRUE;
}
Hope useful.