🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #638

TWebBrowser stealing focus and scrolling back up upon changes

#638
From: Sally
Date: Thu, 29 Jun 2006 07:30
20 lines
1715 bytes
I have a TWebBrowser control, Borland C++ 6, and everytime I change the 
page data (particularly a few numbers on the page), it scrolls all the 
way up AND the form that the TWebBrowser control is in also jumps in 
front of other windows (steals focus). Any thoughts how to solve this, 
example code would be greatly appreciated. Here is the code I'm using:

  IDispatch* doc = Document;
  if(!doc) { gotoEmptyPage(); doc = Document; }

  IHTMLDocument2* theDoc = NULL; doc->QueryInterface(IID_IHTMLDocument2, 
(void**) &theDoc);
  doc->Release();

  const int arrayBounds[] = {0, 0};
  Variant v = VarArrayCreate(arrayBounds, 1, varVariant);
  v.PutElement(dataCString, 0);

  theDoc->write((SAFEARRAY*) v.VArray);
  theDoc->close();
  theDoc->Release();
Technical Details
Message-ID: <44a381b2$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,d8c319f76137ac2,start
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Sally" <nospamforme@spamme.com>
From: "Sally" <nospamforme@spamme.com>
Newsgroups: borland.public.cppbuilder.internet.web
Subject: TWebBrowser stealing focus and scrolling back up upon changes
Date: Thu, 29 Jun 2006 01:30:22 -0600
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 66.18.210.235
Message-ID: <44a381b2$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1151566258 66.18.210.235 (29 Jun 2006 00:30:58 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail