当前位置: 首页>>代码示例>>C++>>正文


C++ IOleInPlaceActiveObject::Release方法代码示例

本文整理汇总了C++中IOleInPlaceActiveObject::Release方法的典型用法代码示例。如果您正苦于以下问题:C++ IOleInPlaceActiveObject::Release方法的具体用法?C++ IOleInPlaceActiveObject::Release怎么用?C++ IOleInPlaceActiveObject::Release使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IOleInPlaceActiveObject的用法示例。


在下文中一共展示了IOleInPlaceActiveObject::Release方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: TranslateAccelerator

LRESULT CWebBrowserUI::TranslateAccelerator( MSG *pMsg )
{
    if(pMsg->message < WM_KEYFIRST || pMsg->message > WM_KEYLAST)
        return S_FALSE;

    if( m_pWebBrowser2 == NULL )
        return E_NOTIMPL;

    // 当前Web窗口不是焦点,不处理加速键
    BOOL bIsChild = FALSE;
    HWND hTempWnd = NULL;
    HWND hWndFocus = ::GetFocus();

    hTempWnd = hWndFocus;
    while(hTempWnd != NULL)
    {
        if(hTempWnd == m_hwndHost)
        {
            bIsChild = TRUE;
            break;
        }
        hTempWnd = ::GetParent(hTempWnd);
    }
    if(!bIsChild)
        return S_FALSE;

    IOleInPlaceActiveObject *pObj;
    if (FAILED(m_pWebBrowser2->QueryInterface(IID_IOleInPlaceActiveObject, (LPVOID *)&pObj)))
        return S_FALSE;

    HRESULT hResult = pObj->TranslateAccelerator(pMsg);
    pObj->Release();
    return hResult;
}
开发者ID:wx58,项目名称:duilib,代码行数:34,代码来源:UIWebBrowser.cpp

示例2: STDMETHOD

 STDMETHOD(SetActiveObject)(IOleInPlaceActiveObject* pActiveObject, LPCOLESTR /*pszObjName*/)
 {
    if( pActiveObject != NULL ) pActiveObject->AddRef();
    if( m_pActiveObject != NULL ) m_pActiveObject->Release();
    m_pActiveObject = pActiveObject;
    return S_OK;
 }
开发者ID:fstudio,项目名称:Phoenix,代码行数:7,代码来源:UIActiveX.cpp

示例3: translateAccelerator

void IEView::translateAccelerator(UINT uMsg, WPARAM wParam, LPARAM lParam) {
    IOleInPlaceActiveObject* pIOIPAO;
    if (SUCCEEDED(pWebBrowser->QueryInterface(IID_IOleInPlaceActiveObject, (void**)&pIOIPAO))) {
       MSG msg;
       msg.message = uMsg;
       msg.wParam = wParam;
       msg.lParam = lParam;
       pIOIPAO->TranslateAccelerator(&msg);
       pIOIPAO->Release();
    }
}
开发者ID:BackupTheBerlios,项目名称:mgoodies-svn,代码行数:11,代码来源:IEView.cpp

示例4: OnTranslateAccelerator

HRESULT AxContainer::OnTranslateAccelerator( MSG &msg )
{
	if (m_pOleObject == NULL)
		return S_FALSE;
	IOleInPlaceActiveObject *pObj;
	if (FAILED(m_pOleObject->QueryInterface(IID_IOleInPlaceActiveObject, (LPVOID *)&pObj)))
		return S_FALSE;

	HRESULT hResult = pObj->TranslateAccelerator(&msg);
	pObj->Release();
	return hResult;
}
开发者ID:fgokey,项目名称:WidgetUI,代码行数:12,代码来源:AxWidget.cpp

示例5: PyCom_BuildPyException

// @pymethod |PyIDocHostUIHandler|ShowUI|Description of ShowUI.
PyObject *PyIDocHostUIHandler::ShowUI(PyObject *self, PyObject *args)
{
	IDocHostUIHandler *pIDHUIH = GetI(self);
	if ( pIDHUIH == NULL )
		return NULL;
	// @pyparm int|dwID||Description for dwID
	// @pyparm <o PyIOleInPlaceActiveObject>|pActiveObject||Description for pActiveObject
	// @pyparm <o PyIOleCommandTarget>|pCommandTarget||Description for pCommandTarget
	// @pyparm <o PyIOleInPlaceFrame>|pFrame||Description for pFrame
	// @pyparm <o PyIOleInPlaceUIWindow>|pDoc||Description for pDoc
	PyObject *obpActiveObject;
	PyObject *obpCommandTarget;
	PyObject *obpFrame;
	PyObject *obpDoc;
	DWORD dwID;
	if ( !PyArg_ParseTuple(args, "lOOOO:ShowUI", &dwID, &obpActiveObject, &obpCommandTarget, &obpFrame, &obpDoc) )
		return NULL;
	IOleInPlaceActiveObject * pActiveObject;
	IOleCommandTarget * pCommandTarget;
	IOleInPlaceFrame * pFrame;
	IOleInPlaceUIWindow * pDoc;
	BOOL bPythonIsHappy = TRUE;
	if (bPythonIsHappy && !PyCom_InterfaceFromPyInstanceOrObject(obpActiveObject, IID_IOleInPlaceActiveObject, (void **)&pActiveObject, TRUE /* bNoneOK */))
		 bPythonIsHappy = FALSE;
	if (bPythonIsHappy && !PyCom_InterfaceFromPyInstanceOrObject(obpCommandTarget, IID_IOleCommandTarget, (void **)&pCommandTarget, TRUE /* bNoneOK */))
		 bPythonIsHappy = FALSE;
	if (bPythonIsHappy && !PyCom_InterfaceFromPyInstanceOrObject(obpFrame, IID_IOleInPlaceFrame, (void **)&pFrame, TRUE /* bNoneOK */))
		 bPythonIsHappy = FALSE;
	if (bPythonIsHappy && !PyCom_InterfaceFromPyInstanceOrObject(obpDoc, IID_IOleInPlaceUIWindow, (void **)&pDoc, TRUE /* bNoneOK */))
		 bPythonIsHappy = FALSE;
	if (!bPythonIsHappy) return NULL;
	HRESULT hr;
	PY_INTERFACE_PRECALL;
	hr = pIDHUIH->ShowUI( dwID, pActiveObject, pCommandTarget, pFrame, pDoc );
	if (pActiveObject) pActiveObject->Release();
	if (pCommandTarget) pCommandTarget->Release();
	if (pFrame) pFrame->Release();
	if (pDoc) pDoc->Release();
	PY_INTERFACE_POSTCALL;
	if ( FAILED(hr) )
		return PyCom_BuildPyException(hr, pIDHUIH, IID_IDocHostUIHandler );
	return PyInt_FromLong(hr);
}
开发者ID:malrsrch,项目名称:pywin32,代码行数:44,代码来源:PyIDocHostUIHandler.cpp


注:本文中的IOleInPlaceActiveObject::Release方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。