Re: Drawing HTML text

"Alex Blekhman" <tkfx.N05P4M@xxxxxxxxx> wrote in message

> Do you want to display HTML formatted input in your program or to
> be able to edit HTML document visually (akin to "Design" mode of
> Visual Studio HTML editor)?....

Thanks Alex.

Further specification of the problem is in order:

Picture a CMyDocument derived from CDocument, which is a map,
showing coastline, roads, towns, etc. Each town has a name
(CString), a rectangle (CRect) in which to draw the name, and a font
(LOGFONT) - all members of CMyDocument.

In CMyView::OnDraw() and CMyView::OnPrint() the map (and place
names) are drawn on the supplied DC.

The place names are *currently* drawn with:

pDC->DrawText( "My Place Name", ..., &rectangle, ...);

What I *want* is something equivalent for HTML formated text:

My <b>Place</b> <em>Name</em>
.... &rectangle, ..);

Would be nice if it existed!.

So how to do it?

A CHtmlView doesn't seem right as the labels are only small
components of the document.

On the screen I suppose I could create transparent, CHtmlEditCtrl's
as child windows over my CMyView, occupying the appropriate
rectangles, each with its own DC and and each rendering its own

But I can't see that printing my document could be achieved like

What would be nice is an HTML renderer into a given rectangle on a
given DC.

> Process of rendering and displaying HTML content is up to
> WebBrowser control entirely. You don't need to draw it yourself.

That is what I wanted but, as far as I can see, there is no way to
pass it a CDC *, and CRect *, and tell it - "put it there!"

Or is there?

David Webber
Author MOZART the music processor for Windows -
For discussion/support see