Creating an Internet Browser (Windows CE 5.0)
Microsoft® Windows® 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. Alternatively, 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.
Use the following 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.
To create an Internet browser:
Create a class for your browser. For more information, see Creating a Browser Class.
Register the browser window. For more information, see Registering the Browser Window.
Create a window to hold the browser work area by implementing the IWebBrowser2 interface. For more information see Creating a Web Browser Object.
Setup the event sink by finding the DWebBrowserEvents2 connection point on the IWebBrowser2 object created in step 3, and then registering the event sinks. For more information, see Setting Up Event Sinks.
Write a method that performs browsing operation by using IWebBrowser2 methods such as Navigate2. For more information, see Navigating to a Specified URL.
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); }
See Also
Creating and Customizing an Internet Browser
Send Feedback on this topic to the authors