本文整理汇总了C++中CBCGPBaseRibbonElement::AddToListBox方法的典型用法代码示例。如果您正苦于以下问题:C++ CBCGPBaseRibbonElement::AddToListBox方法的具体用法?C++ CBCGPBaseRibbonElement::AddToListBox怎么用?C++ CBCGPBaseRibbonElement::AddToListBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBCGPBaseRibbonElement
的用法示例。
在下文中一共展示了CBCGPBaseRibbonElement::AddToListBox方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddToListBox
//*************************************************************************************
int CBCGPRibbonButtonsGroup::AddToListBox (CBCGPRibbonCommandsListBox* pWndListBox, BOOL bDeep)
{
ASSERT_VALID (this);
int nIndex = -1;
for (int i = 0; i < m_arButtons.GetSize (); i++)
{
CBCGPBaseRibbonElement* pButton = m_arButtons [i];
ASSERT_VALID (pButton);
nIndex = pButton->AddToListBox (pWndListBox, bDeep);
}
return nIndex;
}
示例2: FillFromArray
//******************************************************************************
void CBCGPRibbonCommandsListBox::FillFromArray (
const CArray<CBCGPBaseRibbonElement*, CBCGPBaseRibbonElement*>& arElements, BOOL bDeep,
BOOL bIgnoreSeparators)
{
ASSERT_VALID (this);
ResetContent ();
m_nTextOffset = 0;
BOOL bIsRibbonImageScale = globalData.IsRibbonImageScaleEnabled ();
globalData.EnableRibbonImageScale (FALSE);
for (int i = 0; i < arElements.GetSize (); i++)
{
CBCGPBaseRibbonElement* pElem = arElements [i];
ASSERT_VALID (pElem);
if (bIgnoreSeparators && pElem->IsKindOf (RUNTIME_CLASS (CBCGPRibbonSeparator)))
{
continue;
}
pElem->AddToListBox (this, bDeep);
int nImageWidth = pElem->GetImageSize (CBCGPBaseRibbonElement::RibbonImageSmall).cx;
m_nTextOffset = max (m_nTextOffset, nImageWidth + 2);
}
if (GetCount () > 0)
{
SetCurSel (0);
}
globalData.EnableRibbonImageScale (bIsRibbonImageScale);
}