次の方法で共有


Registering the Browser Window (Windows Embedded CE 6.0)

1/6/2010

Before you create the browser window, you must register the window by configuring the WNDCLASS structure, and then registering this window by calling the RegisterClass function.

The following code example shows how to register a window.

// Standard Win32 window class registration.
BOOL RegisterBrowserWnd()
{
        static BOOL bRegistered = FALSE;
        WNDCLASS        wc;
        if(!bRegistered)
        {
            wc.style         = 0;
            wc.lpfnWndProc   = (WNDPROC)CBrowser::s_BrowseWndProc;
            wc.cbClsExtra    = 0;
            wc.cbWndExtra    = 0;
            wc.hInstance     = g_hInstance;
            wc.hIcon         = NULL; 
            wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
            wc.hbrBackground = (HBRUSH)GetSysColorBrush(COLOR_WINDOW);
            wc.lpszMenuName  = NULL;
            wc.lpszClassName = TEXT("Browser_main");
            if (RegisterClass(&wc))
                bRegistered = TRUE;
        }
        return bRegistered;
}

See Also

Concepts

Creating an Internet Browser
Creating a Browser Window

Other Resources