需要调用OleInitialize(NULL); 做初始化
vc调用com组件,一般继承cwnd,可以这样获取组件中的接口,
//m_WebBorwser ----
if(pUnk != NULL)
{
IOleInPlaceActiveObject* pWB2 = NULL;
HRESULT hr = pUnk->QueryInterface(IID_IOleInPlaceActiveObject, (void**)&pWB2);
if(SUCCEEDED(hr) && pWB2 != NULL)
{
pWB2->TranslateAccelerator(pMsg);
pWB2->Release();
}
}