Brenton S.
March 23rd, 2006, 03:39 PM
In the "New Message" dialog of Outlook Express, there is a rich edit control in which the user types the recipient's name. I'm am trying to set the text of the control by using the following code:
HWND hwndOutlook;
HWND hwndTo;
CHAR szTo[] = "name@domain.com (name@domain.com)";
hwndOutlook = FindWindow("ATH_Note", "New Message"); // Get a handle to the New Message wnd
hwndTo = FindWindowEx(FindWindowEx(hwndOutlook, NULL, "OE_Envelope", NULL), NULL, "RichEdit20W", NULL); // Get a handle to the rich edit control
SendMessage(hwndTo, WM_SETTEXT, 0, (LPARAM)szTo); // Set the text of the rich edit control to szTo
But, the richedit control is not recieving the message. :confused:
Does anyone know what the problem is?
HWND hwndOutlook;
HWND hwndTo;
CHAR szTo[] = "name@domain.com (name@domain.com)";
hwndOutlook = FindWindow("ATH_Note", "New Message"); // Get a handle to the New Message wnd
hwndTo = FindWindowEx(FindWindowEx(hwndOutlook, NULL, "OE_Envelope", NULL), NULL, "RichEdit20W", NULL); // Get a handle to the rich edit control
SendMessage(hwndTo, WM_SETTEXT, 0, (LPARAM)szTo); // Set the text of the rich edit control to szTo
But, the richedit control is not recieving the message. :confused:
Does anyone know what the problem is?