Opening a window << Previous |  Contents  |  Next >>  ]
Opening a window This fragment binds your native window to the nsIWebBrowser's nsIBaseWindow, then instigates final window creation.
  // Initialize WebBrowser with native parent window
  rv = baseWindow->InitWindow(nativeWindow, null,
                              x, y, cx, cy);
  if (NS_FAILED(rv)) return rv;

  // Create the child window for the WebBrowser
  rv = baseWindow->Create();
  if (NS_FAILED(rv)) return rv;