Partager via


Creating an Internet Browser (Windows Embedded CE 6.0)

1/6/2010

Windows Embedded CE includes sample browser applications that provide a base for creating an Internet browser. You can use the IESample or IE XAML UI Sample 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 Embedded 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 Browser Window.

  4. Create a browser object. For more information, see Creating a Web Browser Object.

  5. 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.

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

  7. 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

Internet Explorer Embedded OS Design Development