IWebBrowser2 focus problem with IE6
-
Hi all, I have web browser object in my dialog, and i run flash advertisement in it. problem is some of the flash advertisement steal the focus from my dialog, so if i am typing inside an edit box and advertisement is changed, focus is being steal from my edit to the internet explorer server object..... is there a way to prevent it? thanks Yaron
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
-
Hi all, I have web browser object in my dialog, and i run flash advertisement in it. problem is some of the flash advertisement steal the focus from my dialog, so if i am typing inside an edit box and advertisement is changed, focus is being steal from my edit to the internet explorer server object..... is there a way to prevent it? thanks Yaron
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
You could try handling the WM_KILLFOCUS message and reset the focus back to your edit control if the browser object was the one that grabbed the focus from the edit control.
You may be right I may be crazy -- Billy Joel -- Within you lies the power for good - Use it!
-
You could try handling the WM_KILLFOCUS message and reset the focus back to your edit control if the browser object was the one that grabbed the focus from the edit control.
You may be right I may be crazy -- Billy Joel -- Within you lies the power for good - Use it!
thank you for your reply... i tried what you said but the problem is that clicking on the advertisemnt should launch a web page but if i click the advertisement and the kill focus from the edit is called, the focus is set back to the edit and the web page is never launched... how can i bypass that? thanks again Yaron
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
-
thank you for your reply... i tried what you said but the problem is that clicking on the advertisemnt should launch a web page but if i click the advertisement and the kill focus from the edit is called, the focus is set back to the edit and the web page is never launched... how can i bypass that? thanks again Yaron
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
-
You should be able to check if the user switched the focus (via the keyboard or mouse) or if the ad window grabbed the focus.
You may be right I may be crazy -- Billy Joel -- Within you lies the power for good - Use it!
thanks for the help.... how do i during OnKillFocus obtain mouse or keyboard click?
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)