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


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

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


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

示例1: OnSetFocus

// 在就地编辑一个对象时,容器需要对 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

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

示例3: RecalcLayout

//*************************************************************************************
void CBCGPFrameWnd::RecalcLayout (BOOL bNotify)
{
    if (m_bInRecalcLayout)
        return;

    m_bInRecalcLayout = TRUE;

    BOOL bWasOleInPlaceActive = m_Impl.m_bIsOleInPlaceActive;
    m_Impl.m_bIsOleInPlaceActive = FALSE;

    COleClientItem*	pActiveItem = GetInPlaceActiveItem ();

    if (pActiveItem != NULL && pActiveItem->m_pInPlaceFrame != NULL &&
            pActiveItem->GetItemState () == COleClientItem::activeUIState)
    {
        m_Impl.m_bIsOleInPlaceActive = TRUE;
        m_Impl.m_bHadCaption = (GetStyle () & WS_CAPTION) != 0;
    }

    if (!m_bIsMinimized)
    {
        CView* pView = GetActiveView ();

        if (m_dockManager.IsPrintPreviewValid () ||
                m_pNotifyHook != NULL)
        {
            if (pView != NULL && pView->IsKindOf (RUNTIME_CLASS (CBCGPPrintPreviewView)))
            {

                m_dockManager.RecalcLayout (bNotify);
                CRect rectClient = m_dockManager.GetClientAreaBounds ();
                pView->SetWindowPos (NULL, rectClient.left, rectClient.top,
                                     rectClient.Width (), rectClient.Height (),
                                     SWP_NOZORDER  | SWP_NOACTIVATE);
            }
            else
            {
                if (bNotify && m_pNotifyHook != NULL)
                {
                    ActiveItemRecalcLayout ();
                }
                else
                {
                    m_bInRecalcLayout = FALSE;
                    CFrameWnd::RecalcLayout (bNotify);

                    AdjustClientArea ();
                }
            }
        }
        else
        {
            m_dockManager.RecalcLayout (bNotify);
            AdjustClientArea ();
        }
    }

    m_bInRecalcLayout = FALSE;

    if (bWasOleInPlaceActive != m_Impl.m_bIsOleInPlaceActive)
    {
        if (!m_Impl.m_bHadCaption)
        {
            if (m_Impl.m_bIsOleInPlaceActive)
            {
                ModifyStyle (0, WS_CAPTION);
            }
            else
            {
                ModifyStyle (WS_CAPTION, 0);
            }
        }

        m_Impl.OnChangeVisualManager ();
        SetWindowPos (NULL, -1, -1, -1, -1,
                      SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_FRAMECHANGED);
    }
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:79,代码来源:BCGPFrameWnd.cpp


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