Using HtmlView apart from Tecno Preview | CodeGuru

Using HtmlView apart from Tecno Preview

Download demo code 158K In the upcoming Visual C++ 6.0, we’ll have a view class wrapper for the Internet Explorer, providing us with an html view. While waiting for VC6.0, we can have the HtmlView downloading the huge Tecno Preview from Microsoft. For those of you who needs, of all the Tecno Preview, only the […]

Written By
CodeGuru Staff
CodeGuru Staff
Aug 6, 1998
2 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Download demo code 158K

In the upcoming Visual C++ 6.0, we’ll have a view class wrapper for the Internet Explorer, providing

us with an html view.

While waiting for VC6.0, we can have the HtmlView downloading the huge Tecno Preview from Microsoft.

For those of you who needs, of all the Tecno Preview, only the HtmlView, I’ve “ported” it here. In the

demo there is a CHView class which is basically the CHtmlView from tecno preview.

How to use it

You simply need to add the CHView files (ViewH.cpp and ViewH.h files) to your project; then copy the

directory “fromTecno” of the project in yours and add to your project the fromTecnouuid.lib file.

You’ll need the 2 files in the fromTecno directory or the app won’t compile (they are from the tecno preview).

You’ll also need to provide the command identifier for the HtmlView basic functions, ID_WEBBACK,

ID_WEBFORWARD, .. look at the CHView message map); a fast way is to delete the IDR_MAINFRAME toolbar

of your app and put the one of the demo instead.

Then derive manually the CView based view of your project from the CHView (use search / replace for

CView to CHView in your view header and cpp files).

I added to the CHView a CString variable, csHomePage, holding the “homepage” to be opened at start; in the demo,

I puttet this article you are reading in the “html” directory; to find the right path, I get the

startup directory in the app OnInitInstance, put it in a global CString csAppDir variable, find out

the path of the home page in the CHView contructor and load the html page in the CHView OnInitialUpdate.

To load a page in the view, use the view Navigate2(url) function.

Remember that is works only with Internet Explorer 4 installed on your system!

If you want to know more about HtmlView and Tecno Preview, try at Microsoft Visual C++

pages.

Last updated: 2 July 1998

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.