HTML in MFC app

Started by
3 comments, last by Big B 21 years, 10 months ago
I am trying to display HTML in a MFC window based on a string. This would lend itself naturally to CHTMLView, but after some inspection, it only will display HTML that you have navigated to using a URL. Is there any way to specify the HTML to be display inside a CHTMLView other than using the internet to connect to it? Or is there another HTML rendering engine that will plug in easily to an MFC app? I dont feel like writing a web server would be best idea.
University is a fountain of knowledge, and students go there to drink.
Advertisement
can you just do file://C:\myhtml.htm instead of specifying an url
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
Im not trying to display a file, but dynamically created html.


University is a fountain of knowledge, and students go there to drink.
The best you can do is to dynamically create your html, write it to a file, then refresh the CHtmlView, or have it load your dynamically created file.

I couldn''t find any way to write text directly to the view without having the intermediate file.

Maybe you could use SetWindowText, since it''s derived from a CWnd ultimately?
SetWindowText didnt do anything. Also writing intermediate files would cause the performance to drop something fierce. The HTML to display will change constantly so writing to files wouldnt be a solution I''d like to avoid.

Since this program requires a server to work correctly, I will just add some simple HTTP functionality to the server. Thanks anyway.


University is a fountain of knowledge, and students go there to drink.

This topic is closed to new replies.

Advertisement