Printing an HTML file with Win32 API's...

Discussion in 'HTML' started by sammy_lb_2000@netzero.com, Oct 4, 2005.

  1. Guest

    , Oct 4, 2005
    #1
    1. Advertising

  2. Oli Filth Guest

    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
     
    Oli Filth, Oct 5, 2005
    #2
    1. Advertising

  3. rf Guest

    Oli Filth wrote
    > 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.
     
    rf, Oct 5, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shameek
    Replies:
    1
    Views:
    12,741
    Roedy Green
    Dec 27, 2005
  2. Thomas Thomassen
    Replies:
    2
    Views:
    161
    Thomas Thomassen
    Dec 29, 2010
  3. Ziv Tepman
    Replies:
    0
    Views:
    75
    Ziv Tepman
    Jan 21, 2014
  4. Ziv Tepman
    Replies:
    0
    Views:
    91
    Ziv Tepman
    Jan 21, 2014
  5. Chris Angelico
    Replies:
    0
    Views:
    76
    Chris Angelico
    Jan 21, 2014
Loading...

Share This Page