firebreath怎样获取网页窗口句柄解决办法

firebreath怎样获取网页窗口句柄
用npAPI库获取网页窗口句柄是
NPWindow* pNPWindow,
HWND hWnd = (HWND)pNPWindow->window;
我用firebreath框架编写一个网页播放器,要调用void Play(LONG port, HWND hwnd),怎样获取网页窗口句柄呢???
急急急~~~~~

------解决方案--------------------
刚好很久前用过firebreath

对onWindowAttached(FB::AttachedEvent *evt, FB::PluginWindow *win)
传入的参数win调用hwnd = wnd->getHWND();即可得到浏览器窗口句柄。
------解决方案--------------------
在继承FB::PluginCore的类中处理AttachedEvent事件
BEGIN_PLUGIN_EVENT_MAP()
EVENTTYPE_CASE(FB::AttachedEvent, onWindowAttached, FB::PluginWindow)
END_PLUGIN_EVENT_MAP()