On WM_ACTIVATE do this:
nsCOMPtr<nsIWebBrowserFocus> focus(do_GetInterface(webBrowser));
focus->Activate()/Deactivate();
What about create/destroy? Don't know, but there's this code for WM_CLOSE:
WebBrowserChromeUI::Destroy(chrome);
See code: xulrunner-1.9.1.3-source\mozilla-1.9.1\embedding\tests\winEmbed\winEmbed.cpp, function BrowserDlgProc()