Article View: borland.public.cppbuilder.internet.web
Article #1255Re: TCppWebBrowser - How to disable resizing with scripts
From: Serkan �zkan
Date: Sat, 02 Apr 2005 19:39
Date: Sat, 02 Apr 2005 19:39
20 lines
2316 bytes
2316 bytes
Hi Hans,> Could you please show the source for a minimal html page> with
javascript that behaves like that ?> > Hans.******************
<html><head><script language="javascript" type="text/javascript">var fixedW
= 700var fixedH = 520function fixWindowSize(){ this.resizeTo(fixedW,
fixedH); return true;}function fixSizeOnLoad(){ var offW, offH, diffW,
diffH; if(document.all){ offW = document.body.offsetWidth; offH =
document.body.offsetHeight; window.resizeTo(fixedW, fixedH); diffW =
document.body.offsetWidth - offW; diffH = document.body.offsetHeight -
offH; fixedW = (fixedW + ((fixedW - diffW) - offW)); fixedH = (fixedH +
((fixedH - diffH) - offH)); fixWindowSize();
this.onresize=fixWindowSize; } return true;}</script></head><body
onLoad="fixSizeOnLoad()">Test</body></html>********************I guess the
endless loop problem is caused by "this.onresize=fixWindowSize;" By the way
I found this page from msdn
http://msdn.microsoft.com/workshop/browser/hosting/reference/ifaces/IHTMLOMWindowServices/IHTMLOMWindowServices.aspwhich
says "IHTMLOMWindowServices InterfaceAllows applications hosting the
WebBrowser Control to intercept the window object calls moveTo, moveBy,
resizeTo, and resizeBy for manipulating the host's window coordinates from
Dynamic HTML (DHTML) script."But I could not find a way to implement this
yet.Thanks
Technical Details
Message-ID:
<424ef4e8$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<424ee3f7@newsgroups.borland.com> <424eedbb$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,e9c082ebaee051d5 X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Serkan �zkan" <serkan@insaat.org> Newsgroups: borland.public.cppbuilder.internet.web References: <424ee3f7@newsgroups.borland.com> <424eedbb$1@newsgroups.borland.com> Subject: Re: TCppWebBrowser - How to disable resizing with scripts Date: Sat, 2 Apr 2005 22:39:13 +0300 Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: 85.97.62.67 Message-ID: <424ef4e8$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1112470760 85.97.62.67 (2 Apr 2005 11:39:20 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail