Caret problems with IE7

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



System: Windows XP SP2
IE version: 7 RC1
Language: VC6

We are creating an e-mail program, using WebBrowser to display HTML e-mails.
Our e-mail editor consists of the typical controls you'd see on an e-mail
editor: "To" button, "To" edit control, (ditto for CC and BCC), Subject
edit control, a checkbox that lets the user save a copy of the e-mail when
sending, the WebBrowser, and a custom ListView that displays attachments.

Everything worked fine and dandy until I installed IE7. Now if I have focus
in the WebBrowser and then try to click on one of the recipient edit
controls, focus does switch, but the caret doesn't show up. When I click in
another recipient edit control and back, the caret reappears.

I'm not sure if these details will help, but here they are:
The window that these controls are contained in is a CFormView.
I traced this behavior down to: COccManager::IsDialogMessage(), eventually
called from CFormView::PreTranslateMessage(). If I don't execute
UIDeactivateIfNecessary(), the caret show up appropriately.

To me, it seems that what is going on here is that the WebBrowser control is
not relinquishing control of the caret resource. If I try to call any caret
methods (ShowCaret, SetCaretPos, etc.) on the window that just received
focus, I get an access denied error. Creating a new caret does work, but
that's not really what I want to do.

I can work around this by forcing focus to a different control and then back
to the control in question. And I will do this if I have to. But I'm
wondering if I'm just missing something here, or if there is a bug in IE7?
The fact that it worked fine with IE6 leads me to think it is a bug in IE7.

Thanks for any help.

Mark Smith

P.S. Sorry if this isn't the right group. Please let me know if there
would be a better one to ask this question in!


.



Relevant Pages

  • 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: Caret problems with IE7
    ... Mark Smith ... We are creating an e-mail program, using WebBrowser to display HTML ... Subject edit control, a checkbox that lets the user save a copy of the ... in another recipient edit control and back, the caret reappears. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Tabbing Between and Inside WebBrowser Ctrl and other Controls
    ... > I have made a dll which hosts all the functions related to WebBrowser ... > This allows me to create a webbrowser ctrl in a window and also ... > allows me to use the Tab key inside the webbrowser control. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Image not from image or picture component?
    ... will generate an error from the control. ... Dim web_hwnd As Long ... window handle so you need to do a little work to get it. ... ("Shell Embedding" for the WebBrowser). ...
    (comp.lang.basic.visual.misc)