- IWebBrowser2 focus problem
- Posted by Sue on August 10th, 2007
Hi,
I create a modeless dialog and its child is a IWebBrowser2 window. I'm
developing a application to chat. The problem now is that if a user is
typing in one window and another window pop up since another person
ttry to chat with this person, the new window steal the focus. I try
all different ways to fix it, I used SetWindowPos with SWP_NOMOVE |
SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW flags and
also setfous to desktop window in Onsetfocus. Nothing works.
Is it possible that when the page is loaded in the new window, it
steal the focus? can anyone tell me how to fix this? Thanks.
- Posted by Kellie Fitton on August 10th, 2007
On Aug 9, 7:21 pm, Sue <jean....@gmail.com> wrote:
Hi,
You can use the following APIs/approach to make the foreground
window disable calls to the SetForegroundWindow function:
SetForegroundWindow()
LockSetForegroundWindow()
http://msdn2.microsoft.com/en-us/library/ms633539.aspx
http://msdn2.microsoft.com/en-us/library/ms633532.aspx
Kellie.
- ShowWindow not hiding new window opened by IWebBrowser2 (Development Resources) by jmpinchot@gmail.com
- OT: XP focus problem (Software & Applications) by Terry Pinnell
- [MFC] Using IWebBrowser2 => Navigate with TargetFrameName (Development Resources) by Emin Tarajan
- How to print XSL formatted XML in MFC using IWebBrowser2 (Development Resources) by Paresh
- IWebbrowser2 Sessions persist across multiple invocations (Development Resources) by tsantosh.kumar@iflexsolutions.com

