ReParent( newWindow, (HWND)MessageWindow() );
ReParent( newWindow, MessageWindow().getHWND() );
nsNativeAppSupportOS2::StartServerMode() {    if (mShouldShowUI) {        // We dont have to anything anymore. The native UI        // will create the window        return NS_OK;    } else {        // Sometimes a window will have been opened even though mShouldShowUI is false        // (e.g., mozilla -mail -turbo).  Detect that by testing whether there's a        // window already open.        nsCOMPtr<nsIDOMWindowInternal> win;        GetMostRecentWindow( 0, getter_AddRefs( win ) );        if ( win ) {            // Window already opened, don't need this special Nav window.            return NS_OK;        }    }    // Since native UI wont create any window, we create a hidden window    // so thing work alright.    // Create some of the objects we'll need.    nsCOMPtr<nsIWindowWatcher>   ww(do_GetService(NS_WINDOWWATCHER_CONTRACTID));    nsCOMPtr<nsISupportsString> arg1(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));    nsCOMPtr<nsISupportsString> arg2(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));    if ( !ww || !arg1 || !arg2 ) {        return NS_OK;    }    // Create the array for the arguments.    nsCOMPtr<nsISupportsArray> argArray = do_CreateInstance(NS_SUPPORTSARRAY_CONTRACTID);    if ( !argArray ) {        return NS_OK;    }    // arg1 is the url to load.    // arg2 is the string that tells navigator.js to auto-close.    arg1->SetData( NS_LITERAL_STRING( "about:blank" ) );    arg2->SetData( NS_LITERAL_STRING( "turbo=yes" ) );    // Put args into array.    if ( NS_FAILED( argArray->AppendElement( arg1 ) ) ||        NS_FAILED( argArray->AppendElement( arg2 ) ) ) {        return NS_OK;    }    // Now open the window.    nsCOMPtr<nsIDOMWindow> newWindow;    ww->OpenWindow( 0,        "chrome://navigator/content",        "_blank",        "chrome,dialog=no,toolbar=no",        argArray,        getter_AddRefs( newWindow ) );    if ( !newWindow ) {        return NS_OK;    }    mInitialWindowActive = PR_TRUE;    // Hide this window by re-parenting it (to ensure it doesn't appear).    ReParent( newWindow, (HWND)MessageWindow() );    return NS_OK;}