Re: Tabbing Between and Inside WebBrowser Ctrl and other Controls

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 06/02/04


Date: Wed, 2 Jun 2004 15:46:05 -0400


"Apurva Lawale" <apudeepa@pacific.net.sg> wrote in message
news:ucXZNfMSEHA.3848@TK2MSFTNGP09.phx.gbl
> I have made a dll which hosts all the functions related to WebBrowser
> Hosting. I even managed to get key events worked inside the dll.
>
> This allows me to create a webbrowser ctrl in a window and also
> allows me to use the Tab key inside the webbrowser control. But now I
> am having a problem of getting it to tab to other controls in the
> window.
>
> How do I make it work such that the Tabs in the web browser control
> work and also I manage to Tab through rest of the controls in the
> window.

This is how I do it. Preprocess window messages at the message pump
(right after GetMessage but before DispatchMessage). MFC has
PreTranslateMessage method for it, other frameworks provide similar
facilities. If the message happens to be a keyboard message, check
whether HWND of the message is a descendant (a direct or indirect child)
or WebBrowser control window, using IsChild API. If it is, call
IOleInPlaceActiveObject::TranslateAccelerator on WebBrowser. If this
call returns S_FALSE, or if the window was not the child of WB in the
first place, call IsDialogMessage on the dialog.

-- 
With best wishes,
    Igor Tandetnik
"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Relevant Pages

  • Re: Detect if dialog page is active and button enabled
    ... very risky way to control another program. ... then rather than sendkeys I would suggest ... Appleman doesn't talk about the tab control. ... window, by sending a WM_NOTIFY message ...
    (microsoft.public.vb.winapi)
  • Re: Image not from image or picture component?
    ... by the phrase, "webbrowser components page". ... its Enterprise Edition controls and I can't see a WebBrowser control. ... Can I add it from Project / Components Dag? ... I haven't tried finding the window handle with the findwindow APIs, ...
    (comp.lang.basic.visual.misc)
  • Re: Screen capture control using WebBrowser control and GDI+ in a web app
    ... I suspect the Web Browser requires a hosting container to work with a window. ... is of a remote website rather than of my PC. ... using the .NET WebBrowser control to load the website URL into. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Tab key issue in Tab Control in Win32 SDK
    ... WS_EX_CONTROLPARENT should be set on any Window that contains Child Windows, ... With regards navigating the Tab control itself, TAB is not used to change ...
    (microsoft.public.win32.programmer.ui)
  • Re: CAN I ACCESS A WEB SITE FROM WITHIN A MS ACCESS FORM?
    ... Run_point_Address_D is indeed on a control on a different form to the ... same form as WebBrowser, it shouldn't be necessary to worry about the ... The tab control name never needs to be used when referring to controls on ... loads the web address forGoogle maps, ...
    (microsoft.public.access.forms)