Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Big B

HTML in MFC app

This topic is 6012 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
Im not trying to display a file, but dynamically created html.


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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!