Example Outlook: its only one process but can have multiple windows (user can double click on the email to open it in its own window)
So, I cannot use Process.GetProcess() to iterate through the processes and compare title.
FindWindow() needs full title; I know the title but Outlook window adds its own in the end i.e. - Message (Rich Text) or - Message (HTML) .. etc.
Can I get all the email windows (handles) for Outlook ? then iterate over those to find my window using GetWindowText() ? Any pointers will be highly appreciated.
You can use EnumWindow to enumerate through all the windows finding the one you want.
http://www.pinvoke.net/default.aspx/user32.enumwindows
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With