void Clinenum_testView::OnDestroy()
{
	// 析构时停用此项;这在
	// 使用拆分视图时非常重要 
   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
   if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
   {
      pActiveItem->Deactivate();
      ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
   }
   CRichEditView::OnDestroy();
}
void CMyExplorerView::OnDestroy()
{
	// Deactivate the item on destruction; this is important
	// when a splitter view is being used.
   CListView::OnDestroy();
   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
   if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
   {
      pActiveItem->Deactivate();
      ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
   }
}
Beispiel #3
0
void CCodeHighLightView::OnDestroy()
{
	// 停用处于析构中的项;这在
	// 使用拆分器视图时非常重要 
   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
   if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
   {
      pActiveItem->Deactivate();
      ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
   }
   CSynEditView::OnDestroy();
}
void CBCGPMSOffice2007DemoView::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);
   }

   CRichEditView::OnDestroy();
}
Beispiel #5
0
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);
}
//***************************************************************************************
void CBCGPFrameWnd::OnClose()
{
    if (m_pPrintPreviewFrame != NULL)
    {
        m_pPrintPreviewFrame->SendMessage (WM_COMMAND, AFX_ID_PREVIEW_CLOSE);
        m_pPrintPreviewFrame = NULL;
        return;
    }

    if (!m_Impl.IsPrintPreview ())
    {
        m_bClosing = TRUE;
    }

    // Deactivate OLE container first:
    COleClientItem*	pActiveItem = GetInPlaceActiveItem ();
    if (pActiveItem != NULL)
    {
        pActiveItem->Deactivate ();
    }

    m_Impl.OnCloseFrame();
    CFrameWnd::OnClose();
}