简体   繁体   English

如何使用ActiveX控件在窗口/对话框中呈现HTML文件

[英]how to render html file in window/dialog box using activex control

I am working on visual++ and trying to render a preview of a html file on a dialog box/Window created by me. 我正在使用Visual ++,并尝试在我创建的对话框/窗口上呈现html文件的预览。 (just as we get preview pane on window explorer on hmlFile.html single click) . (就像我们在单击hmlFile.html时在窗口资源管理器上获得预览窗格一样)。 I tried lot of search on google but resulted in un-success. 我在Google上尝试了很多搜索,但未成功。 I got idea from somewhere that it can be accomplished by using activex control. 我从某个地方知道可以通过使用Activex控件来实现。 My project is already rendering FileName.png image(i mean already working for .png image) in the dialog box i created. 我的项目已经在我创建的对话框中渲染FileName.png图像(我的意思是已经为.png图像工作)。

But now the next task is to make the preview render for .html files. 但是现在下一个任务是使.html文件的预览呈现。 I have no ideas of how to accomplish this task . 我不知道如何完成这项任务。 any ideas ?? 有任何想法吗 ?? If by ActiveX Control ?? 如果通过ActiveX控件? For ;png file the idea was to store the contents of .png file in the stream(which is generated by single button click on .png file) and then create decoder and then create bitmap source to 32bppHbitmap and then preview on preview pane/window created/dialog Box and i also know about .xml files -in this case we create a style sheet) but i dont' know how to do for html files ??? 对于; png文件,其想法是将.png文件的内容存储在流中(通过单击单个按钮单击.png文件生成),然后创建解码器,然后将位图源创建为32bppHbitmap,然后在预览窗格/窗口上进行预览创建/对话框,我也知道.xml文件-在这种情况下,我们创建了样式表),但我不知道该如何处理html文件?

Any help ?? 有帮助吗?? or good links ???? 或良好的链接?

The MFC library makes this rather easy. MFC库使此操作相当容易。 Here is a link to a sample program that uses MFC CHtmlView to create a browser: 这是使用MFC CHtmlView创建浏览器的示例程序的链接:

http://msdn.microsoft.com/en-us/library/ms177540(v=VS.80).aspx http://msdn.microsoft.com/zh-CN/library/ms177540(v=VS.80).aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM