Opening an HTML Resource as the Default Page in a Web Browser Application

Home Page (HTML Resource)OverviewHow Do I ... Topics

Your Web browser-style application can be a container for any Web-style content, including HTML resources that are part of your project. You use the OnInitialUpdate function of the view class to specify the content that you want initially displayed by the application.

Within OnInitialUpdate, the Navigate2 method displays an URL that uses the http: protocol. For example:

   Navigate2(_T("http://www.microsoft.com/visualc/"),NULL,NULL);

To display an HTML resource that is part of your project, use the LoadFromResource function instead. For example:

   LoadFromResource(IDR_MyHTMLResource);

Note   If your HTML page contains calls to bitmaps or other graphic images that are compiled as part of your project's resource script (.rc file), you must use the res: protocol to display them. The res: protocol supports displaying a resource that resides in a compiled .dll or .exe module.

What do you want to know more about?

Navigate2 method

LoadFromResource function

Res: protocol

What do you want to do?

Create a Web browser-style application

Create a new HTML resource

Import an existing HTML file as a resource

Preview the HTML resource