本文整理汇总了C++中ARRAY::GetSize方法的典型用法代码示例。如果您正苦于以下问题:C++ ARRAY::GetSize方法的具体用法?C++ ARRAY::GetSize怎么用?C++ ARRAY::GetSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ARRAY
的用法示例。
在下文中一共展示了ARRAY::GetSize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DeleteFormats
BOOL DeleteFormats(int parentID, ARRAY& formatIDs)
{
if(formatIDs.GetSize() <= 0)
return TRUE;
try
{
//Delete the requested data formats
INT_PTR count = formatIDs.GetSize();
for(int i = 0; i < count; i++)
{
theApp.m_db.execDMLEx(_T("DELETE FROM Data WHERE lID = %d;"), formatIDs[i]);
}
CClip clip;
if(clip.LoadFormats(parentID))
{
DWORD CRC = clip.GenerateCRC();
//Update the main table with new size
theApp.m_db.execDMLEx(_T("UPDATE Main SET CRC = %d WHERE lID = %d"), CRC, parentID);
}
}
CATCH_SQLITE_EXCEPTION
return TRUE;
}
示例2: FindFirstConflict
bool CHotKeys::FindFirstConflict(ARRAY& keys, INT_PTR* pX, INT_PTR* pY)
{
bool bConflict = false;
INT_PTR i, j;
INT_PTR count = keys.GetSize();
DWORD key;
for(i = 0; i < count && !bConflict; i++)
{
key = keys.ElementAt(i);
// only check valid keys
if(key == 0)
continue;
// scan the array for a duplicate
for(j = i+1; j < count; j++ )
{
if(keys.ElementAt(j) == key)
{
bConflict = true;
break;
}
}
}
if(bConflict)
{
if(pX)
*pX = i-1;
if(pY)
*pY = j;
}
return bConflict;
}
示例3: LoadCopyOrCutToClipboard
void CQListCtrl::LoadCopyOrCutToClipboard()
{
ARRAY arr;
GetSelectionItemData(arr);
INT_PTR count = arr.GetSize();
if(count <= 0)
return;
CProcessPaste paste;
//Don't send the paste just load it into memory
paste.m_bSendPaste = false;
if(count > 1)
paste.GetClipIDs().Copy(arr);
else
paste.GetClipIDs().Add(arr[0]);
//Don't move these to the top
BOOL bItWas = g_Opt.m_bUpdateTimeOnPaste;
g_Opt.m_bUpdateTimeOnPaste = FALSE;
paste.DoPaste();
g_Opt.m_bUpdateTimeOnPaste = bItWas;
}
示例4: SetKeys
// caution! this alters hotkeys based upon corresponding indexes
void CHotKeys::SetKeys(ARRAY& keys, bool bSave)
{
INT_PTR count = GetSize();
ASSERT(count == keys.GetSize());
for(int i=0; i < count; i++)
{
ElementAt(i)->SetKey(keys[(INT)i], bSave);
}
}
示例5: PutSelectedItemOnDittoCopyBuffer
bool CQListCtrl::PutSelectedItemOnDittoCopyBuffer(long lBuffer)
{
bool bRet = false;
ARRAY arr;
GetSelectionItemData(arr);
INT_PTR nCount = arr.GetSize();
if(nCount > 0 && arr[0])
{
CDittoCopyBuffer::PutClipOnDittoCopyBuffer(arr[0], lBuffer);
bRet = true;
}
return bRet;
}
示例6: SendSelection
void CQListCtrl::SendSelection(ARRAY &arrItems)
{
GetParent()->SendMessage(NM_SELECT, arrItems.GetSize(), (LPARAM) arrItems.GetData());
}