New Message window loses focus when launched via Simple MAPI
-
I have an app that's trying to send email via Simple MAPI. When the default client is Oulook, the New Message window that comes up appears to lose focus. I am able to tab thru the varous controls on the message window, but I cannot set the focus to anything inside the window (New Message) with the mouse. Clicking on a different app and then coming back to the New Message window "fixes" the problem. I'm passing 0 for the parent window handle. I've tried passing in the handle of the main application window, but it did not make a difference. Any help would be greatly appreciated. Here is what my two MAPI calls look like: error = MAPILogon(IntPtr.Zero, null, null, MapiNewSession | MapiLogonUi, 0, ref session); error = MAPISendMail(session, IntPtr.Zero, mapiMessage, MapiDialog | MapiLogonUi, 0);
cobra2005