本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例6: STDMETHODIMP_
STDMETHODIMP_(ULONG) CIEControlSite::XDocHostUIHandler::Release()
{
METHOD_PROLOGUE_EX_(CIEControlSite, DocHostUIHandler);
return pThis->ExternalRelease();
}
示例7: METHOD_PROLOGUE_EX_
void COleDispatchImpl::Disconnect()
{
METHOD_PROLOGUE_EX_(CCmdTarget, Dispatch)
pThis->ExternalDisconnect(); // always disconnect the object
}