本文整理汇总了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);
}
示例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;
}
示例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);
}
示例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( );
}
示例5: OnCancelEditCntr
// 以下命令处理程序提供了标准键盘
// 用户界面以取消就地编辑会话。此处,
// 容器(而不是服务器)将导致停用
void CClientView::OnCancelEditCntr()
{
// 关闭此视图中的任何就地活动项。
COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
if (pActiveItem != NULL)
{
pActiveItem->Close();
}
ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
}
示例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();
}
示例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();
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}