mRC = (wnd->GetPrevWP())( hwnd, msg, mp1, mp2);
mresult = (wnd->GetPrevWP())( hwnd, msg, mp1, mp2);
MRESULT EXPENTRY fnwpNSWindow( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2){   MRESULT popupHandlingResult;   if( nsWindow::DealWithPopups(msg, &popupHandlingResult) )      return popupHandlingResult;   // Get the nsWindow for this hwnd   nsWindow *wnd = nsWindow::GetNSWindowPtr(hwnd);   // check to see if we have a rollup listener registered   if( nsnull != gRollupListener && nsnull != gRollupWidget) {      if( msg == WM_ACTIVATE || msg == WM_BUTTON1DOWN ||          msg == WM_BUTTON2DOWN || msg == WM_BUTTON3DOWN) {      // Rollup if the event is outside the popup.      PRBool rollup = !nsWindow::EventIsInsideWindow((nsWindow*)gRollupWidget);            // If we're dealing with menus, we probably have submenus and we don't      // want to rollup if the click is in a parent menu of the current submenu.      if (rollup) {        nsCOMPtr<nsIMenuRollup> menuRollup ( do_QueryInterface(gRollupListener) );        if ( menuRollup ) {          nsCOMPtr<nsISupportsArray> widgetChain;          menuRollup->GetSubmenuWidgetChain ( getter_AddRefs(widgetChain) );          if ( widgetChain ) {            PRUint32 count = 0;            widgetChain->Count(&count);            for ( PRUint32 i = 0; i < count; ++i ) {              nsCOMPtr<nsISupports> genericWidget;              widgetChain->GetElementAt ( i, getter_AddRefs(genericWidget) );              nsCOMPtr<nsIWidget> widget ( do_QueryInterface(genericWidget) );              if ( widget ) {                nsIWidget* temp = widget.get();                if ( nsWindow::EventIsInsideWindow((nsWindow*)temp) ) {                  rollup = PR_FALSE;                  break;                }              }            } // foreach parent menu widget          }        } // if rollup listener knows about menus      }      }      else if( msg == WM_SETFOCUS) {         if( !mp2 &&              !bothFromSameWindow( ((nsWindow*)gRollupWidget)->GetMainWindow(),                                   (HWND)mp1) ) {            gRollupListener->Rollup();         }      }   }   // Messages which get re-routed if their source was an nsWindow   // (it's very bad to reroute messages whose source isn't an nsWindow,   // listboxes with scrollbars for example would break)   switch( msg)   {      case WM_CONTROL:      case WM_HSCROLL:      case WM_VSCROLL: // !! potential problems here if canvas children      {         // assume parent == owner, true for our creations         HWND hwndChild = WinWindowFromID( hwnd, SHORT1FROMMP( mp1));         if( hwndChild)         {            nsWindow *w = nsWindow::GetNSWindowPtr(hwndChild);            if( w)               wnd = w;         }         break;      }   }    // hold on to the window for the life of this method, in case it gets    // deleted during processing. yes, it's a double hack, since someWindow    // is not really an interface.    nsCOMPtr<nsISupports> kungFuDeathGrip;    if (!wnd->mIsDestroying) // not if we're in the destructor!      kungFuDeathGrip = do_QueryInterface((nsBaseWidget*)wnd);   MRESULT mRC = 0;   if( wnd)   {      if( PR_FALSE == wnd->ProcessMessage( msg, mp1, mp2, mRC) &&          WinIsWindow( (HAB)0, hwnd) && wnd->GetPrevWP())      {         mRC = (wnd->GetPrevWP())( hwnd, msg, mp1, mp2);      }   }   else      /* erm */ mRC = WinDefWindowProc( hwnd, msg, mp1, mp2);   return mRC;}