Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CActiveXCtrl::RegisterEventHandler错误 #38

Open
GoogleCodeExporter opened this issue Sep 22, 2015 · 0 comments
Open

CActiveXCtrl::RegisterEventHandler错误 #38

GoogleCodeExporter opened this issue Sep 22, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link



如果将pFlash->put_WMode( _bstr_t(_T("Transparent") ) 
);注释掉或者改成pFlash->put_WMode( _bstr_t(_T("Window") ) );
则CActiveXCtrl::RegisterEventHandler函数异常导致崩溃,应改为:
HRESULT hr=m_pOwner->GetControl(IID_IWebBrowser2, (void**)&pWebBrowser);
    if (FAILED(hr))
        return hr;
如果不加判断则pWebBrowser获取失败时执行pWebBrowser->....导致崩�
��。
另外建议将FLASH做成控件。
----------------------------------------------------------------
pActiveX->GetControl(IID_IUnknown, (void**)&pFlash);
        if( pFlash != NULL )
        {
            pFlash->put_WMode( _bstr_t(_T("Transparent") ) );//Transparent
            pFlash->put_Movie( _bstr_t(NCApp::GetModulePath() + _T("flash\\loginning.swf")) );
            pFlash->DisableLocalSecurity();
            pFlash->put_AllowScriptAccess(L"always");
            pFlash->Release();
        }  

Original issue reported on code.google.com by yfq...@163.com on 1 Jun 2012 at 9:21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant