本文整理汇总了C++中CBCGPGridRow::IsGroup方法的典型用法代码示例。如果您正苦于以下问题:C++ CBCGPGridRow::IsGroup方法的具体用法?C++ CBCGPGridRow::IsGroup怎么用?C++ CBCGPGridRow::IsGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBCGPGridRow
的用法示例。
在下文中一共展示了CBCGPGridRow::IsGroup方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateCaptionText
void CMailView::UpdateCaptionText ()
{
CBCGPOrganizerDoc* pDoc = GetDocument ();
if (pDoc == NULL || pDoc->GetMode () != CBCGPOrganizerDoc::e_ModeMail)
{
return;
}
CMainFrame* pFrame = DYNAMIC_DOWNCAST(CMainFrame, AfxGetMainWnd ());
if (pFrame != NULL)
{
CString str;
CBCGPGridCtrl* pGridCtrl = GetGridCtrl ();
if (pGridCtrl != NULL)
{
CBCGPGridRow* pRow = pGridCtrl->GetCurSel ();
if (pRow != NULL && !pRow->IsGroup ())
{
str = _T("From: ") + pRow->GetItem (3)->FormatItem ();
str += _T("; Subject: ") + pRow->GetItem (4)->FormatItem ();
}
}
if (str.IsEmpty ())
{
str = _T(" ");
}
pFrame->SetCaptionText (str);
}
}
示例2: 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
}
示例3: GetNewPanelIndex
//**********************************************************************
int CBCGPRibbonCustomizeRibbonPage::GetNewPanelIndex()
{
#ifndef BCGP_EXCLUDE_GRID_CTRL
// Calculate destination index:
if (m_pSelCategoryDest != NULL)
{
int nVisiblePanels = 0;
for (int i = 0; i < m_pSelCategoryDest->GetPanelCount(); i++)
{
CBCGPRibbonPanel* pPanel = m_pSelCategoryDest->GetPanel(i);
if (pPanel != NULL && !pPanel->m_bToBeDeleted)
{
nVisiblePanels++;
}
}
return nVisiblePanels - 1;
}
CBCGPRibbonPanel* pCurrPanelDest = m_pSelPanelDest;
if (pCurrPanelDest == NULL && m_pSelElemDest != NULL)
{
pCurrPanelDest = m_pSelElemDest->GetParentPanel();
}
if (pCurrPanelDest != NULL)
{
for (int i = 0; i < m_wndRibbonTreeDest.GetRowCount(); i++)
{
CBCGPGridRow* pRow = m_wndRibbonTreeDest.GetRow(i);
ASSERT_VALID(pRow);
if (pRow->GetParent() != NULL && pRow->IsGroup())
{
if (pRow->GetData() == (DWORD_PTR)pCurrPanelDest)
{
int nCurIndex = m_CustomizationData.GetPanelIndex(pCurrPanelDest);
ASSERT(nCurIndex >= 0);
return nCurIndex + 1;
}
}
}
}
#endif
return -1;
}
示例4: 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
}
示例5: 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
}
示例6: OnOpen
LRESULT CMailView::OnOpen (WPARAM /*wParam*/, LPARAM /*lParam*/)
{
CBCGPGridRow* pRow = GetGridCtrl ()->GetCurSel ();
if (pRow == NULL || pRow->IsGroup ())
{
return 0L;
}
CMailFrame frame (*pRow, TRUE, this);
if (frame.DoModal () != IDOK)
{
if (frame.IsDeleted ())
{
PostMessage (WM_COMMAND, ID_MAIL_REMOVE, 0);
}
}
return 0L;
}
示例7: OnUpdateDelete
void CMailView::OnUpdateDelete(CCmdUI* pCmdUI)
{
CBCGPGridRow* pRow = GetGridCtrl ()->GetCurSel ();
pCmdUI->Enable (pRow != NULL && !pRow->IsGroup ());
}