本文整理汇总了C++中COleClientItem::DoVerb方法的典型用法代码示例。如果您正苦于以下问题:C++ COleClientItem::DoVerb方法的具体用法?C++ COleClientItem::DoVerb怎么用?C++ COleClientItem::DoVerb使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COleClientItem
的用法示例。
在下文中一共展示了COleClientItem::DoVerb方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnCmdMsg
BOOL COleDocument::OnCmdMsg(UINT nID, int nCode, void* pExtra,
AFX_CMDHANDLERINFO* pHandlerInfo)
{
ASSERT_VALID(this);
if (nCode == CN_COMMAND && nID >= ID_OLE_VERB_FIRST && nID <= ID_OLE_VERB_LAST)
{
CView* pRoutingView = GetRoutingView_();
COleClientItem* pSel = GetPrimarySelectedItem(pRoutingView);
if (pSel != NULL)
{
if (pHandlerInfo != NULL) // routing test
{
pHandlerInfo->pTarget = this;
return TRUE; // would be handled here
}
// activate the current selection with the appropriate verb
CWaitCursor wait;
pSel->DoVerb(nID - ID_OLE_VERB_FIRST, pRoutingView);
return TRUE; // handled
}
}
return CDocument::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
示例2: OpenLinkSource
STDMETHODIMP COleUILinkInfo::OpenLinkSource(DWORD dwLink)
{
COleClientItem* pItem = (COleClientItem*)dwLink;
ASSERT_VALID(pItem);
ASSERT_KINDOF(COleClientItem, pItem);
ASSERT(pItem->GetType() == OT_LINK);
SCODE sc;
TRY
{
// Note: no need for valid CView* since links don't activate inplace
pItem->DoVerb(OLEIVERB_SHOW, NULL);
sc = S_OK;
}
CATCH_ALL(e)
{
sc = COleException::Process(e);
DELETE_EXCEPTION(e);
}
END_CATCH_ALL
return sc;
}