Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. IWebBrowser2 focus problem with IE6

IWebBrowser2 focus problem with IE6

Scheduled Pinned Locked Moved C / C++ / MFC
comadobesysadminhelpquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    YaronNir
    wrote on last edited by
    #1

    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 :)

    PJ ArendsP 1 Reply Last reply
    0
    • Y YaronNir

      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 :)

      PJ ArendsP Offline
      PJ ArendsP Offline
      PJ Arends
      wrote on last edited by
      #2

      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!

      Within you lies the power for good; Use it!

      Y 1 Reply Last reply
      0
      • PJ ArendsP PJ Arends

        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!

        Y Offline
        Y Offline
        YaronNir
        wrote on last edited by
        #3

        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 :)

        PJ ArendsP 1 Reply Last reply
        0
        • Y YaronNir

          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 :)

          PJ ArendsP Offline
          PJ ArendsP Offline
          PJ Arends
          wrote on last edited by
          #4

          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!

          Within you lies the power for good; Use it!

          Y 1 Reply Last reply
          0
          • PJ ArendsP PJ Arends

            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!

            Y Offline
            Y Offline
            YaronNir
            wrote on last edited by
            #5

            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 :)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups