Share via


Creating an Internet Browser

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

** Windows Embedded CE includes sample browser applications that provide a base for creating an Internet Browser. You can use the IESample browser application as is, or you can modify the source code to add or remove functionalities. Or, you can use the IESimple sample application to create a browser application that also provides a windowless or a full-screen mode. For more information about these samples, see Internet Explorer 6 Samples.**

Follow these steps to create a simple full-screen browser by using the WebBrowser control that adds browsing, document viewing, and data downloading capabilities to your applications. For more information about the WebBrowser Control, see this Microsoft Web site.

Procedures

To create an Internet browser:

  1. Create a class for your browser. For more information, see Creating a Browser Class.

  2. Register the browser window. For more information, see Registering the Browser Window.

  3. Create a window to hold the browser work area by implementing the IWebBrowser2 interface. For more information, see Creating a Web Browser Object.

  4. Set up the event sink by finding the DWebBrowserEvents2 connection point on the IWebBrowser2 object that was created in step 3, and then registering the event sinks. For more information, see Setting Up Event Sinks.

  5. Write a method that performs browsing operation by using IWebBrowser2 methods such as Navigate2. For more information, see Navigating to a Specified URL.

  6. In your browser application, set up an event loop to receive events from the browser. The following code example shows how to do this.

    while (GetMessage( &msg, NULL, 0, 0 ) )
    {
      if(msg.message == WM_QUIT)
        break;
      TranslateMessage(&msg);
      DispatchMessage(&msg);
    }
    

In This Section

See Also

Other Resources

Creating and Customizing an Internet Browser