🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Converting HTML page from TCppWebBrowser into Image

#239
From: Eduardo Jauch
Date: Tue, 06 Feb 2007 02:48
48 lines
2407 bytes
Trevor Keegan escreveu:
> Hi,
> 
> I have been looking at some code from that describes how to convert a HTML 
> page into an image (http://starkravingfinkle.org/blog/2004/09/).  The 
> problem is before I get started, I see code like:
> IHTMLDocument2 * pDoc = ....;
> IHTMLELEMENT * pBodyElement = 0
> HRESULT hr = pDoc->get_body(&pBodyElement);
> if( SUCCEED(hr))
> {
>   IHTMLElement * pBody = 0;
>   hr = pBodyElem - >QueryInterface( IID_IHTMLBodyElement, 
> (void**)&bBody );
> :
> :
> }
> 
> The problem is I do not know what variables like amp and gt should be.
> 
> I would also like to understand what the purpose of things like pDoc-&gt are 
> (I would appear to be getting a pointer to something).....I get the feeling 
> that there should be another way of writing this.
> HRESULT hr = pDoc->get_body(&pBodyElement);
>   hr = pBodyElem - >QueryInterface( IID_IHTMLBodyElement, 
> (void**)&bBody );
> 
> Regards
> Trevor Keegan 
> 
> 

These are NOT variables. Are HTML codes to sp�cial caracters like "�"

In this case, the correct code is something like this:

IHTMLDocument2 * pDoc = NULL;
IHTMLELEMENT * pBodyElement = NULL;
HRESULT hr = pDoc->get_body( pBodyElement );
if( SUCCEED(hr) )
{
   IHTMLElement * pBody = NULL;
   hr = pBodyElem->QueryInterface( IID_IHTMLBodyElement, (void**)bBody );
}

You may have problems with the HTML you are viewing...

:)	
Technical Details
Message-ID: <45c7e8a8$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.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
References: <45c7e3f6@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,4384ebb9896c72c9
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII
Date: Tue, 06 Feb 2007 00:48:21 -0200
From: Eduardo Jauch <eduardo.jauch@gmail.com>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.web
Subject: Re: Converting HTML page from TCppWebBrowser into Image
References: <45c7e3f6@newsgroups.borland.com>
In-Reply-To: <45c7e3f6@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 201.14.26.139
Message-ID: <45c7e8a8$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1170729128 201.14.26.139 (5 Feb 2007 18:32:08 -0800)
Lines: 48
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.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