本文整理汇总了C++中CStdPtrArray::GetSize方法的典型用法代码示例。如果您正苦于以下问题:C++ CStdPtrArray::GetSize方法的具体用法?C++ CStdPtrArray::GetSize怎么用?C++ CStdPtrArray::GetSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CStdPtrArray
的用法示例。
在下文中一共展示了CStdPtrArray::GetSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Selected
void COptionUI::Selected(bool bSelected, bool bTriggerEvent)
{
if( m_bSelected == bSelected ) return;
m_bSelected = bSelected;
if( m_bSelected ) m_uButtonState |= UISTATE_SELECTED;
else m_uButtonState &= ~UISTATE_SELECTED;
if( m_pManager != NULL ) {
if( !m_sGroupName.IsEmpty() ) {
if( m_bSelected ) {
CStdPtrArray* aOptionGroup = m_pManager->GetOptionGroup(m_sGroupName);
for( int i = 0; i < aOptionGroup->GetSize(); i++ ) {
COptionUI* pControl = static_cast<COptionUI*>(aOptionGroup->GetAt(i));
if( pControl != this ) {
pControl->Selected(false, bTriggerEvent);
}
}
if (bTriggerEvent) m_pManager->SendNotify(this, DUI_MSGTYPE_SELECTCHANGED);
}
}
else {
if (bTriggerEvent) m_pManager->SendNotify(this, DUI_MSGTYPE_SELECTCHANGED);
}
}
Invalidate();
}
示例2: Selected
void CSysOptionUI::Selected()
{
if(!m_pWnd){
m_bSelected = true;
return;
}
if(IsSelected()) return;
::SendMessage(*m_pWnd, BM_SETCHECK, BST_CHECKED, 0);
if( m_pManager != NULL ) {
if( !m_sGroupName.IsEmpty() ) {
if( true ) {
CStdPtrArray* aOptionGroup = m_pManager->GetOptionGroup(m_sGroupName);
for( int i = 0; i < aOptionGroup->GetSize(); i++ ) {
auto pControl = static_cast<CSysOptionUI*>(aOptionGroup->GetAt(i));
if( pControl != this && pControl->m_pWnd) {
::SendMessage(pControl->m_pWnd->GetHWND(), BM_SETCHECK, BST_UNCHECKED, 0);
}
}
m_pManager->SendNotify(this, DUI_MSGTYPE_SELECTCHANGED);
}
}
else {
m_pManager->SendNotify(this, DUI_MSGTYPE_SELECTCHANGED);
}
}
}
示例3:
CStdPtrArray::CStdPtrArray(const CStdPtrArray& src) : m_ppVoid(NULL), m_nCount(0), m_nAllocated(0)
{
for(int i=0; i<src.GetSize(); i++)
Add(src.GetAt(i));
}