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


C++ COleClientItem::Close方法代码示例

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


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

示例1: PreCloseFrame

void COleDocument::PreCloseFrame(CFrameWnd* pFrameArg)
{
	ASSERT_VALID(this);
	ASSERT_VALID(pFrameArg);

	// turn off redraw so the user doesn't see the deactivation happening
	BOOL bSetRedraw = FALSE;
	if (pFrameArg->GetStyle() & WS_VISIBLE)
	{
		pFrameArg->SendMessage(WM_SETREDRAW, (WPARAM)FALSE);
		bSetRedraw = TRUE;
	}

	// deactivate any inplace active items on this frame
	COleClientItem* pItem = GetInPlaceActiveItem(pFrameArg);
	if (pItem != NULL)
	{
		pItem->Deactivate();
		pItem->Close(OLECLOSE_NOSAVE);
	}

	// turn redraw back on
	if (bSetRedraw)
		pFrameArg->SendMessage(WM_SETREDRAW, (WPARAM)TRUE);

	// should not have any inplace active items
	ASSERT(GetInPlaceActiveItem(pFrameArg) == NULL);
}
开发者ID:anyue100,项目名称:winscp,代码行数:28,代码来源:oledoc1.cpp

示例2: ourDrawAttri

void CDrawTool::ourDrawAttri(CDrawView* pView, const CPoint& point,const CPoint& centre, const CString &attrName)
{
	COleClientItem* pActiveItem = pView->GetDocument()->GetInPlaceActiveItem(pView);
	if (pActiveItem != NULL)
	{
		pActiveItem->Close();
		ASSERT(pView->GetDocument()->GetInPlaceActiveItem(pView) == NULL);
	}
	//pView->SetCapture();
	//c_down = point;
	//c_last = point;
	CPoint local;
	local.SetPoint(point.x,point.y);
	//pView->ClientToDoc(local);
	local.Offset(-20,20);
	CDrawRect* pObj =  new CDrawRect(CRect(local, centre),(CString)"");
	pObj->m_nShape = CDrawRect::line;
	pView->GetDocument()->Add(pObj);
	pView->Select(pObj);
	pView->OnObjectMoveToBack();
	local.Offset(20,-20);
	pObj =new CDrawRect(CRect(local, CSize(-60, 40)),attrName);
	pObj->m_nShape = CDrawRect::ellipse;
	pView->GetDocument()->Add(pObj);
	pView->Select(pObj);
	CDrawTool::c_drawShape = selection;

}
开发者ID:markraz,项目名称:hhhjjjff,代码行数:28,代码来源:drawtool.cpp

示例3: GetDocument

// The following command handler provides the standard keyboard
//  user interface to cancel an in-place editing session.  Here,
//  the container (not the server) causes the deactivation.
void CMy1553View::OnCancelEditCntr()
{
    // Close any in-place active item on this view.
    COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
    if (pActiveItem != NULL)
    {
        pActiveItem->Close();
    }
    ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
}
开发者ID:gaodong0537,项目名称:MainCtrl,代码行数:13,代码来源:ManCtrlView.cpp

示例4: GetDocument

void
ZDrOleClient::OnActivate( )
{
   // Allow only one inplace activate item per frame
   COleClientItem* pItem = GetDocument( )->GetInPlaceActiveItem( GetParentView() );
   if ( pItem && pItem != this )
      pItem->Close( );

   COleClientItem::OnActivate( );
}
开发者ID:DeegC,项目名称:ZeidonTools,代码行数:10,代码来源:ZDrOLE.cpp

示例5: OnCancelEditCntr

// 以下命令处理程序提供了标准键盘
//  用户界面以取消就地编辑会话。此处,
//  容器(而不是服务器)将导致停用
void CClientView::OnCancelEditCntr()
{
	// 关闭此视图中的任何就地活动项。
	COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
	if (pActiveItem != NULL)
	{
		pActiveItem->Close();
	}
	ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
}
开发者ID:dalinhuang,项目名称:screen-contorl,代码行数:13,代码来源:ClientView.cpp

示例6: OnActivate

void CMyExplorerCntrItem::OnActivate()
{
    // Allow only one inplace activate item per frame
    CMyExplorerView* pView = GetActiveView();
    ASSERT_VALID(pView);
    COleClientItem* pItem = GetDocument()->GetInPlaceActiveItem(pView);
    if (pItem != NULL && pItem != this)
        pItem->Close();
    
    COleClientItem::OnActivate();
}
开发者ID:gawallsibya,项目名称:BIT_MFC-CShap-DotNet,代码行数:11,代码来源:CntrItem.cpp

示例7: OnActivate

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

示例8: OnActivate

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

示例9: 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

示例10: PreCloseFrame

void COleDocument::PreCloseFrame(CFrameWnd* pFrameArg)
{
	ASSERT_VALID(this);
	ASSERT_VALID(pFrameArg);

	// deactivate any inplace active items on this frame
	COleClientItem* pItem = GetInPlaceActiveItem(pFrameArg);
	if (pItem != NULL)
	{
		pItem->Deactivate();
		pItem->Close(OLECLOSE_NOSAVE);
	}

	// should not have any inplace active items
	ASSERT(GetInPlaceActiveItem(pFrameArg) == NULL);
}
开发者ID:jbeaurain,项目名称:omaha_vs2010,代码行数:16,代码来源:oledoc1.cpp

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