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


C++ METHOD_PROLOGUE_EX_函数代码示例

本文整理汇总了C++中METHOD_PROLOGUE_EX_函数的典型用法代码示例。如果您正苦于以下问题:C++ METHOD_PROLOGUE_EX_函数的具体用法?C++ METHOD_PROLOGUE_EX_怎么用?C++ METHOD_PROLOGUE_EX_使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: METHOD_PROLOGUE_EX_

STDMETHODIMP CIEControlSite::XDocHostUIHandler::ShowContextMenu(
    DWORD dwID, LPPOINT ppt, LPUNKNOWN pcmdTarget, LPDISPATCH pdispReserved)
{
    METHOD_PROLOGUE_EX_(CIEControlSite, DocHostUIHandler);
    return S_FALSE;

    // 点击右键添加到收藏夹
    HWND hwnd;
    CComPtr<IOleCommandTarget> spCT;
    CComPtr<IOleWindow> spWnd;

    HRESULT hr = pcmdTarget->QueryInterface(IID_IOleCommandTarget, (void**)&spCT);
    if ( FAILED(hr) )
        return S_FALSE;

    hr = pcmdTarget->QueryInterface(IID_IOleWindow, (void**)&spWnd);
    if ( FAILED(hr) )
        return S_FALSE;

    hr = spWnd->GetWindow(&hwnd);

#define ID_IE_ID_ADDFAV 2261
    ::SendMessage(hwnd, WM_COMMAND, MAKEWPARAM(LOWORD(ID_IE_ID_ADDFAV), 0x0), 0 );

    return S_OK;
}
开发者ID:jiaofeng,项目名称:Fire-IE,代码行数:26,代码来源:IEControlSite.cpp

示例2: METHOD_PROLOGUE_EX_

STDMETHODIMP CIEControlSite::XDocHostUIHandler::TranslateAccelerator(
	LPMSG lpMsg, const GUID* pguidCmdGroup, DWORD nCmdID)
{
	METHOD_PROLOGUE_EX_(CIEControlSite, DocHostUIHandler);
	HRESULT hr = S_FALSE;

	if ( lpMsg )
	{
		switch ( lpMsg->message )
		{
		case WM_KEYDOWN:
			{
				bool bCtrlPressed = HIBYTE(GetKeyState(VK_CONTROL))!=0;
				bool bAltPressed = HIBYTE(GetKeyState(VK_MENU))!=0;
				bool bShiftPressed = HIBYTE(GetKeyState(VK_SHIFT))!=0;

				// Ctrl-N 会让 IE 自己打开一个 IE 窗口,该窗口无法被我们的处理函数拦截
				// BUG #22839: AltGr + N (也就是 Ctrl-Alt-N)也被拦截了,在这里只拦截 Ctrl-N
				if ( bCtrlPressed && (!bAltPressed) && (!bShiftPressed) && ('N' == lpMsg->wParam) )
				{
					hr = S_OK;
				}

				break;
			}
		}
	}

	return hr;
}
开发者ID:jiaofeng,项目名称:IEMode,代码行数:30,代码来源:IEControlSite.cpp

示例3: METHOD_PROLOGUE_EX_

STDMETHODIMP CWebCtrl::DocSite::XDocHostUIHandler::GetExternal(LPDISPATCH *lppDispatch)
{
	METHOD_PROLOGUE_EX_(CWebCtrl::DocSite, DocHostUIHandler)
	CWebCtrl* pCtrl = pThis->GetCtrl();

	*lppDispatch = pCtrl->m_pExternal;
	if ( *lppDispatch != NULL ) (*lppDispatch)->AddRef();

	return ( *lppDispatch != NULL ) ? S_OK : S_FALSE;
}
开发者ID:lemonxiao0,项目名称:peerproject,代码行数:10,代码来源:CtrlWeb.cpp

示例4: METHOD_PROLOGUE_EX_

HRESULT CIEControlSite::XHTMLOMWindowServices::window_call(const char * methodName, LONG x, LONG y)
{
	METHOD_PROLOGUE_EX_(CIEControlSite, HTMLOMWindowServices);

	HRESULT hr = S_FALSE;

	if ( ! pThis->m_dlg ) return S_OK;

	return hr;
}
开发者ID:cha63501,项目名称:Fire-IE,代码行数:10,代码来源:IEControlSite.cpp

示例5: METHOD_PROLOGUE_EX_

STDMETHODIMP COlePropertiesDialog::XOleUIObjInfo::SetViewInfo(
	DWORD dwObject, HGLOBAL hMetaPict, DWORD dvAspect,
	int nCurrentScale, BOOL bRelativeToOrig)
{
	METHOD_PROLOGUE_EX_(COlePropertiesDialog, OleUIObjInfo)
	COleClientItem* pItem = (COleClientItem*)dwObject;
	ASSERT_VALID(pItem);

	// handle aspect changes
	if (dvAspect != -1)
	{
		pItem->OnChange(OLE_CHANGED_ASPECT, dvAspect);
		pItem->SetDrawAspect((DVASPECT)dvAspect);

		// force scale to 100% when changing aspects
		if (dvAspect == DVASPECT_ICON)
		{
			nCurrentScale = 100;
			bRelativeToOrig = TRUE;
		}
		else if (nCurrentScale == -1)
		{
			nCurrentScale = 100;
			bRelativeToOrig = FALSE;
		}
	}

	// handle icon representation changes
	if (hMetaPict != NULL)
	{
		pItem->SetIconicMetafile(hMetaPict);
		if (pItem->GetDrawAspect() == DVASPECT_ICON)
			pItem->OnChange(OLE_CHANGED, (DWORD)DVASPECT_ICON);
	}

	// handle scale changes
	if (nCurrentScale != -1)
	{
		pThis->OnApplyScale(pItem, nCurrentScale, bRelativeToOrig);
	}

	return S_OK;
}
开发者ID:anyue100,项目名称:winscp,代码行数:43,代码来源:oledlgs3.cpp

示例6: STDMETHODIMP_

STDMETHODIMP_(ULONG) CIEControlSite::XDocHostUIHandler::Release()
{
	METHOD_PROLOGUE_EX_(CIEControlSite, DocHostUIHandler);
	return pThis->ExternalRelease();
}
开发者ID:jiaofeng,项目名称:IEMode,代码行数:5,代码来源:IEControlSite.cpp

示例7: METHOD_PROLOGUE_EX_

void COleDispatchImpl::Disconnect()
{
	METHOD_PROLOGUE_EX_(CCmdTarget, Dispatch)

	pThis->ExternalDisconnect();    // always disconnect the object
}
开发者ID:anyue100,项目名称:winscp,代码行数:6,代码来源:oledisp1.cpp


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