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


C++ CBCGPGridRow::Expand方法代码示例

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


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

示例1: RebuildDestTree

//**********************************************************************
void CBCGPRibbonCustomizeRibbonPage::RebuildDestTree(DWORD_PTR dwNewSel, BOOL bExpandSel)
{
#ifndef BCGP_EXCLUDE_GRID_CTRL
	if (dwNewSel == 0)
	{
		CBCGPGridRow* pRow = m_wndRibbonTreeDest.GetCurSel();
		if (pRow != NULL)
		{
			dwNewSel = pRow->GetData();
		}
	}
	
	m_wndRibbonTreeDest.SetRedraw(FALSE);

	m_wndRibbonTreeDest.RebuildItems(m_bNoContextCategories ? 1 : m_nRibbonTabsDest, m_strMainTabs);

	if (dwNewSel != 0)
	{
		CBCGPGridRow* pRow = m_wndRibbonTreeDest.FindRowByData(dwNewSel);
		if (pRow != NULL)
		{
			if (bExpandSel && pRow->IsGroup())
			{
				pRow->Expand();
			}

			m_wndRibbonTreeDest.SetCurSel(pRow, FALSE);
			m_wndRibbonTreeDest.EnsureVisible(pRow, TRUE);
		}
	}

	m_wndRibbonTreeDest.SetRedraw();
	m_wndRibbonTreeDest.RedrawWindow();
#endif
}
开发者ID:iclosure,项目名称:jframework,代码行数:36,代码来源:BCGPRibbonCustomizePage.cpp

示例2: MoveItem

//**********************************************************************
void CBCGPRibbonCustomizeRibbonPage::MoveItem (BOOL bMoveUp) 
{
#ifndef BCGP_EXCLUDE_GRID_CTRL
	int nOffset = bMoveUp ? - 1: 1;

	BOOL bIsSelExpanded = FALSE;
	CBCGPGridRow* pRow = m_wndRibbonTreeDest.GetCurSel();
	if (pRow != NULL && pRow->IsGroup())
	{
		bIsSelExpanded = pRow->IsExpanded();
	}

	if (m_pSelCategoryDest != NULL)
	{
		ASSERT_VALID(m_pSelCategoryDest);

		if (m_pSelCategoryDest->IsCustom())
		{
			UINT nContextID = m_wndRibbonTreeDest.GetContextID(pRow, nOffset);
			m_CustomizationData.SetTabContextID(m_pSelCategoryDest, nContextID);
		}

		m_CustomizationData.SetTabIndex(m_pSelCategoryDest, m_CustomizationData.GetTabIndex(m_pSelCategoryDest) + nOffset);
	}
	else if (m_pSelPanelDest != NULL)
	{
		ASSERT_VALID(m_pSelPanelDest);

		int nCurIndex = m_CustomizationData.GetPanelIndex(m_pSelPanelDest);
		ASSERT(nCurIndex >= 0);

		m_CustomizationData.SetPanelIndex(m_pSelPanelDest, nCurIndex + nOffset);
	}
	else if (m_pSelElemDest != NULL)
	{
		ASSERT_VALID(m_pSelElemDest);
		m_CustomizationData.MoveElement(m_pSelElemDest, nOffset);
	}

	RebuildDestTree();

	pRow = m_wndRibbonTreeDest.GetCurSel();
	if (bIsSelExpanded && pRow != NULL)
	{
		pRow->Expand();
	}
#endif
}
开发者ID:iclosure,项目名称:jframework,代码行数:49,代码来源:BCGPRibbonCustomizePage.cpp

示例3: OnSelendokRibbonTabsDest

//**********************************************************************
void CBCGPRibbonCustomizeRibbonPage::OnSelendokRibbonTabsDest() 
{
#ifndef BCGP_EXCLUDE_GRID_CTRL
	UpdateData();

	RebuildDestTree();

	CBCGPGridRow* pRow = m_wndRibbonTreeDest.FindRowByData((DWORD_PTR)m_pRibbonBar->GetActiveCategory());
	if (pRow != NULL)
	{
		m_wndRibbonTreeDest.SetCurSel(pRow);

		if (pRow->IsGroup())
		{
			pRow->Expand();
		}
	}
#endif
}
开发者ID:iclosure,项目名称:jframework,代码行数:20,代码来源:BCGPRibbonCustomizePage.cpp

示例4: PreTranslateMessage

BOOL CIfExpressEditorDlg::PreTranslateMessage(MSG* pMsg)
{
	// TODO: 在此添加专用代码和/或调用基类
	ASSERT(pMsg != NULL);
	if (pMsg->message==WM_LBUTTONDOWN)
	{
		ZTools::WriteZToolsFormatLog("WM_LBUTTONDOWN");
		if (m_wndTreeDropDown.IsWindowVisible())
		{
			m_wndTreeDropDown.ShowWindow(SW_HIDE);
			ZTools::WriteZToolsFormatLog("鼠标点击隐藏树,失去焦点后");
			return TRUE; // 本次点击只隐藏树
		}
		int iTickTime = GetTickCount();
		int iGapTime  = iTickTime - m_iTickCountTreeLeaveFocus;
		if (CPoint(pMsg->pt) == m_PointTreeLeaveFocus && iGapTime < 100)
		{
			ZTools::WriteZToolsFormatLog("鼠标点击使得树失去焦点而隐藏,失去焦点前");
			return TRUE; //屏蔽隐藏树前的点击事件
		}

		CRect rect;
		bool bShowTree = FALSE;
		CCxStructTreeNode *pNodeCur = NULL;
		CString strArrID;
		CString strTextArry;
		if ( pMsg->hwnd == m_EditLeft.GetSafeHwnd())
		{
			bShowTree = TRUE;
			m_EditLeft.GetWindowRect(&rect);
			pNodeCur = m_pNodeLeft;
			if (!m_Express.m_LeftParam.strArry.IsEmpty())
			{
				strArrID = m_Express.m_LeftParam.strID;
				m_EditLeftArry.GetWindowText(strTextArry);
			}
			m_iFocusEidtPCtrlID = IDC_EDIT_LEFT;
		}
		else if (pMsg->hwnd == m_EditRight.GetSafeHwnd())
		{
			if (pMsg->hwnd == m_EditRight.GetSafeHwnd() && m_ComboRightType.GetCurSel()==TP_CONST)
				bShowTree = FALSE;
			else
			{
				bShowTree = TRUE;
				m_EditRight.GetWindowRect(&rect);
				pNodeCur = m_pNodeRight;
				if (!m_Express.m_RightParam.strArry.IsEmpty())
				{
					strArrID = m_Express.m_RightParam.strID;
					m_EditRightArry.GetWindowText(strTextArry);
				}
			}
			m_iFocusEidtPCtrlID = IDC_EDIT_RIGHT;
		}
	
		if (bShowTree)
		{
			if (pNodeCur)
			{
				if (!strTextArry.IsEmpty())
				{
					CCxStructTreeNode *pDefaultSel = FindArryElementNode(strArrID,strTextArry);
					if (pDefaultSel)
					 pNodeCur = pDefaultSel;
				}

				CBCGPGridRow* pSel = m_wndTreeDropDown.m_IfEditTree.FindRowByData((DWORD_PTR)pNodeCur);
				m_wndTreeDropDown.m_IfEditTree.SetCurSel(pSel);
				m_wndTreeDropDown.m_IfEditTree.UpdateSelToParamName(); //选中树的第一列
				if (pSel)
				{
					ASSERT_VALID (pSel);
					CBCGPGridRow* pParent = pSel;
					while ((pParent = pParent->GetParent ())!= NULL &&pParent->GetSubItemsCount()>0)
					{
						ASSERT_VALID (pParent);
						pParent->Expand (TRUE);
					}
					m_wndTreeDropDown.m_IfEditTree.EnsureVisible (pSel, TRUE); // 保证当前选中行可见
				}
			}
			else
			{
				m_wndTreeDropDown.m_IfEditTree.SelectRow(-1);
				m_wndTreeDropDown.m_IfEditTree.ExpandAll(FALSE);
			}
			m_wndTreeDropDown.SetWindowPos(&wndTopMost,rect.left,rect.bottom,0,0,SWP_NOSIZE|SWP_SHOWWINDOW);
			m_wndTreeDropDown.m_IfEditTree.SetFocus();
			return TRUE;
		}
	}
	return CCxBCGPDialog::PreTranslateMessage(pMsg);
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:94,代码来源:IfExpressEditorDlg.cpp


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