I'd like to write a small C# application which sends some text to the Outlook 2007 Search box.
Spy++ reveals that the control has a class of
with an empty caption and is part of the overall main window:
caption: Inbox - Microsoft Outlook
While I managed to get a handle to the main window using the user32.dll GetWindow() method, I cannot get a handle to the rich text box. I tried everything I can imagine so far. The problem might be, that all overloads of FindWindow() and FindWindowEx() seem to expect a String caption but the rich text box has an empty one. Passing in an empty string ("") does not yield any results.
How can I get a handle to that control, when all I know is the class name?