Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   Printing an HTML file with Win32 API's... (http://www.velocityreviews.com/forums/t163066-printing-an-html-file-with-win32-apis.html)

sammy_lb_2000@netzero.com 10-04-2005 10:08 PM

Printing an HTML file with Win32 API's...
 
Hello Group,

Can I print an HTML file by using the Win32 API's functions ?

for example,

CreateDC()
StartDoc()

http://msdn.microsoft.com/library/de...vcons_5g83.asp


http://msdn.microsoft.com/library/de...tspol_95sz.asp

Thanks for help.


Oli Filth 10-04-2005 11:35 PM

Re: Printing an HTML file with Win32 API's...
 
sammy_lb_2000@netzero.com said the following on 04/10/2005 23:08:
> Hello Group,
>
> Can I print an HTML file by using the Win32 API's functions ?
>
> for example,
>
> CreateDC()
> StartDoc()
>


If you can find an appropriate renderer, such as MFC's CHtmlView, then
of course you can (bearing in mind that a CHtmlView probably renders
similarly to IE, i.e. shite). But this is a question that should be
asked in a Win32/MFC/.NET NG, as it has nothing to do with HTML per se.

--
Oli

rf 10-05-2005 12:31 AM

Re: Printing an HTML file with Win32 API's...
 
Oli Filth wrote
> sammy_lb_2000@netzero.com said the following on 04/10/2005 23:08:
> > Hello Group,
> >
> > Can I print an HTML file by using the Win32 API's functions ?
> >
> > for example,
> >
> > CreateDC()
> > StartDoc()
> >

>
> If you can find an appropriate renderer, such as MFC's CHtmlView, then
> of course you can


No, you can't.

MSHTML, the collection of objects that CHtmlView wraps, does not expose
anything you could use a DC on. MSHTML handles all printing, and screen
output for that matter, internally. Basically, if you can't do it with
jscript then you can't do it with MSHTML, or CHtmlView.

The closest you can get (apart from the IHTMLWindow3.print method) is print
templates (search microsoft.com).

Cheers
Richard.




All times are GMT. The time now is 06:04 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.