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


C++ COleClientItem类代码示例

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


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

示例1: GetDocument

void CCodeHighLightView::OnDestroy()
{
	// 停用处于析构中的项;这在
	// 使用拆分器视图时非常重要 
   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
   if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
   {
      pActiveItem->Deactivate();
      ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
   }
   CSynEditView::OnDestroy();
}
开发者ID:daiwx,项目名称:UltraDemo,代码行数:12,代码来源:CodeHighLightView.cpp

示例2: GetDocument

void CTinyCADView::OnDestroy()
{
	// 析构时停用此项;这在
	// 使用拆分视图时非常重要 
   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
   if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
   {
      pActiveItem->Deactivate();
      ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
   }
   CTinyCADZoomView::OnDestroy();
}
开发者ID:karosLi,项目名称:TinyCAD,代码行数:12,代码来源:TinyCADView.cpp

示例3: GetDocument

void CABMOfficeSystemcppView::OnDestroy()
{
	// Deactivate the item on destruction; this is important
	// when a splitter view is being used
   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
   if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
   {
      pActiveItem->Deactivate();
      ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
   }
   CView::OnDestroy();
}
开发者ID:abmadmin,项目名称:ABM-Office-System-Cpp,代码行数:12,代码来源:ABM-Office-System-cppView.cpp

示例4: GetActiveView

void CRibbonSampleCntrItem::OnActivate()
{
	// allow only one inplace active item per frame
	CView* pView = GetActiveView();
	ASSERT_VALID(pView);
	COleClientItem* pItem = GetDocument()->GetInPlaceActiveItem(pView);
	if (pItem != NULL && pItem != this)
		pItem->Close();

	ActiveStateChanged(TRUE);

	COleClientItem::OnActivate();
}
开发者ID:CheryJazz,项目名称:gkEngine,代码行数:13,代码来源:CntrItem.cpp

示例5: GetActiveView

void CRectItem::OnActivate()
{
	// allow only one inplace active item per frame
	CMainView* pView = GetActiveView();
	ASSERT_VALID(pView);
	COleClientItem* pItem = GetDocument()->GetInPlaceActiveItem(pView);
	if (pItem != NULL && pItem != this)
		pItem->Close();

	COleClientItem::OnActivate();

	// set selection to an item when it becomes active
	pView->SetSelection(this);
}
开发者ID:jetlive,项目名称:skiaming,代码行数:14,代码来源:rectitem.cpp

示例6: GetStartPosition

void COleDocument::CommitItems(BOOL bSuccess)
{
	// special 'Commit' phase for COleClientItem items
	POSITION pos = GetStartPosition();
	COleClientItem* pItem;
	while ((pItem = GetNextClientItem(pos)) != NULL)
	{
		// calling CommitItem with FALSE causes the object to revert
		//  to the original storage.  Calling CommitItem TRUE causes
		//  the item to adopt the new storage created in the Serialize
		//  function.
		pItem->CommitItem(bSuccess);
	}
}
开发者ID:anyue100,项目名称:winscp,代码行数:14,代码来源:oledoc1.cpp

示例7:

STDMETHODIMP COlePropertiesDialog::XOleUIObjInfo::ConvertObject(
	DWORD dwObject, REFCLSID clsidNew)
{
	COleClientItem* pItem = (COleClientItem*)dwObject;
	ASSERT_VALID(pItem);

	if (!pItem->ConvertTo(clsidNew))
	{
		AfxMessageBox(AFX_IDP_FAILED_TO_CONVERT,
			MB_OK | MB_ICONEXCLAMATION);
		return E_FAIL;
	}
	return S_OK;
}
开发者ID:anyue100,项目名称:winscp,代码行数:14,代码来源:oledlgs3.cpp

示例8: GetStartPosition

void COleDocument::OnUpdateEditLinksMenu(CCmdUI* pCmdUI)
{
	POSITION pos = GetStartPosition();
	COleClientItem* pItem;
	while ((pItem = GetNextClientItem(pos)) != NULL)
	{
		if (pItem->GetType() == OT_LINK)
		{
			// we found a link!
			pCmdUI->Enable(TRUE);
			return;
		}
	}
	pCmdUI->Enable(FALSE);      // no links today
}
开发者ID:anyue100,项目名称:winscp,代码行数:15,代码来源:oleui2.cpp

示例9: ASSERT_VALID

void COleDocument::UpdateModifiedFlag()
{
	ASSERT_VALID(this);

	POSITION pos = GetStartPosition();
	COleClientItem* pItem;
	while ((pItem = GetNextClientItem(pos)) != NULL)
	{
		if (pItem->IsModified())
		{
			SetModifiedFlag();
			break;
		}
	}
}
开发者ID:jbeaurain,项目名称:omaha_vs2010,代码行数:15,代码来源:oledoc1.cpp

示例10: OnLButtonDown

void CDrawTool::OnLButtonDown(CDrawView* pView, UINT nFlags, const CPoint& point)
{
	// deactivate any in-place active item on this view!
	COleClientItem* pActiveItem = pView->GetDocument()->GetInPlaceActiveItem(pView);
	if (pActiveItem != NULL)
	{
		pActiveItem->Close();
		ASSERT(pView->GetDocument()->GetInPlaceActiveItem(pView) == NULL);
	}

	pView->SetCapture();
	c_nDownFlags = nFlags;
	c_down = point;
	c_last = point;
}
开发者ID:markraz,项目名称:hhhjjjff,代码行数:15,代码来源:drawtool.cpp

示例11:

STDMETHODIMP CRichToolTipCtrl::XRichEditOleCallback::GetNewStorage(LPSTORAGE* ppstg)
{
	// Create a flat storage and steal it from the client item
	// the client item is only used for creating the storage
	COleClientItem item;
	item.GetItemStorageFlat();
	*ppstg = item.m_lpStorage;
	HRESULT hRes = E_OUTOFMEMORY;
	if (item.m_lpStorage != NULL)
	{
		item.m_lpStorage = NULL;
		hRes = S_OK;
	}
	return hRes;
}
开发者ID:segafan,项目名称:Construct-classic,代码行数:15,代码来源:RichToolTipCtrl.cpp

示例12: GetDocument

// 在就地编辑一个对象时,容器需要对 OnSetFocus 和 OnSize 
//  进行特殊处理
void CClientView::OnSetFocus(CWnd* pOldWnd)
{
	COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
	if (pActiveItem != NULL &&
		pActiveItem->GetItemState() == COleClientItem::activeUIState)
	{
		// 如果该项处于同一视图中,则需要将焦点设置到该项
		CWnd* pWnd = pActiveItem->GetInPlaceWindow();
		if (pWnd != NULL)
		{
			pWnd->SetFocus();   // 不要调用基类
			return;
		}
	}

	CView::OnSetFocus(pOldWnd);
}
开发者ID:dalinhuang,项目名称:screen-contorl,代码行数:19,代码来源:ClientView.cpp

示例13: GetDocument

// Special handling of OnSetFocus and OnSize are required for a container
//  when an object is being edited in-place.
void CMy1553View::OnSetFocus(CWnd* pOldWnd)
{
    COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
    if (pActiveItem != NULL &&
            pActiveItem->GetItemState() == COleClientItem::activeUIState)
    {
        // need to set focus to this item if it is in the same view
        CWnd* pWnd = pActiveItem->GetInPlaceWindow();
        if (pWnd != NULL)
        {
            pWnd->SetFocus();   // don't call the base class
            return;
        }
    }

    CView::OnSetFocus(pOldWnd);
}
开发者ID:gaodong0537,项目名称:MainCtrl,代码行数:19,代码来源:ManCtrlView.cpp

示例14: GetStartPosition

void COleDocument::DeleteContents()
{
	// deletes all COleClientItem objects in the doc item list
	//  (Note: doesn't touch server items or other docitems)

	POSITION pos = GetStartPosition();
	COleClientItem* pItem;
	while ((pItem = GetNextClientItem(pos)) != NULL)
	{
		if (pItem->m_lpObject != NULL)
		{
			pItem->Release(OLECLOSE_NOSAVE);    // release OLE object
			RemoveItem(pItem);  // disconnect from document
			pItem->InternalRelease();   // may 'delete pItem'
		}
	}
}
开发者ID:jbeaurain,项目名称:omaha_vs2010,代码行数:17,代码来源:oledoc1.cpp

示例15: ourDrawRelation

void CDrawTool::ourDrawRelation(CDrawView* pView, const CPoint& entryPoint,const CPoint& point, const CString &Name)
{
	COleClientItem* pActiveItem = pView->GetDocument()->GetInPlaceActiveItem(pView);
	if (pActiveItem != NULL)
	{
		pActiveItem->Close();
		ASSERT(pView->GetDocument()->GetInPlaceActiveItem(pView) == NULL);
	}
	CPoint local;
	local.SetPoint(point.x,point.y);
	CDrawRect* pObj =  new CDrawRect(CRect(entryPoint, local),Name);
	pObj->m_nShape = CDrawRect::line;
	pView->GetDocument()->Add(pObj);
	pView->Select(pObj);
	pView->OnObjectMoveToBack();
	CDrawTool::c_drawShape = selection;
}
开发者ID:markraz,项目名称:hhhjjjff,代码行数:17,代码来源:drawtool.cpp


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