本文整理汇总了C++中LIST::getCount方法的典型用法代码示例。如果您正苦于以下问题:C++ LIST::getCount方法的具体用法?C++ LIST::getCount怎么用?C++ LIST::getCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LIST
的用法示例。
在下文中一共展示了LIST::getCount方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetCurrentThreadId
MIR_CORE_DLL(INT_PTR) Thread_Pop()
{
if (WaitForSingleObject(hStackMutex, INFINITE) == WAIT_OBJECT_0) {
DWORD dwThreadId = GetCurrentThreadId();
for (int j = 0; j < threads.getCount(); j++) {
THREAD_WAIT_ENTRY *p = threads[j];
if (p->dwThreadId == dwThreadId) {
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
CloseHandle(p->hThread);
threads.remove(j);
mir_free(p);
if (!threads.getCount()) {
threads.destroy();
ReleaseMutex(hStackMutex);
SetEvent(hThreadQueueEmpty); // thread list is empty now
return 0;
}
ReleaseMutex(hStackMutex);
return 0;
}
}
ReleaseMutex(hStackMutex);
}
return 1;
}
示例2: UnloadNewPluginsModule
void UnloadNewPluginsModule(void)
{
int i;
if ( !bModuleInitialized ) return;
// unload everything but the DB
for ( i = pluginList.getCount()-1; i >= 0; i-- ) {
pluginEntry* p = pluginList[i];
if ( !(p->pclass & PCLASS_DB) && p != pluginList_crshdmp )
Plugin_Uninit( p );
}
if ( pluginList_crshdmp )
Plugin_Uninit( pluginList_crshdmp );
// unload the DB
for ( i = pluginList.getCount()-1; i >= 0; i-- ) {
pluginEntry* p = pluginList[i];
Plugin_Uninit( p );
}
if ( hPluginListHeap ) HeapDestroy(hPluginListHeap);
hPluginListHeap=0;
pluginList.destroy();
pluginListAddr.destroy();
UninitIni();
}
示例3: BB_UpdateIcons
void BB_UpdateIcons(HWND hdlg, TWindowData *dat)
{
HWND hwndBtn = NULL;
for (int i = 0; i < LButtonsList.getCount(); i++) {
CustomButtonData *cbd = LButtonsList[i];
if (cbd) {
if (!cbd->bSeparator)
hwndBtn = GetDlgItem(hdlg, cbd->dwButtonCID);
if (hwndBtn && cbd->hIcon)
SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->hIcon));
}
}
hwndBtn = NULL;
for (int i = 0; i < RButtonsList.getCount(); i++) {
CustomButtonData *cbd = RButtonsList[i];
if (cbd) {
if (!cbd->bSeparator)
hwndBtn = GetDlgItem(hdlg, cbd->dwButtonCID);
if (hwndBtn && cbd->hIcon)
SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->hIcon));
}
}
}
示例4: tszName
MIR_CORE_DLL(int) TimeZone_SelectListItem(MCONTACT hContact, LPCSTR szModule, HWND hWnd, DWORD dwFlags)
{
const ListMessages *lstMsg = GetListMessages(hWnd, dwFlags);
if (lstMsg == NULL)
return -1;
if (szModule == NULL) szModule = "UserInfo";
int iSelection = 0;
ptrT tszName(db_get_tsa(hContact, szModule, "TzName"));
if (tszName != NULL) {
unsigned hash = mir_hashstrT(tszName);
for (int i = 0; i < g_timezonesBias.getCount(); i++) {
if (hash == g_timezonesBias[i]->hash) {
iSelection = i + 1;
break;
}
}
}
else {
signed char cBias = db_get_b(hContact, szModule, "Timezone", -100);
if (cBias != -100) {
int iBias = cBias * 30;
for (int i = 0; i < g_timezonesBias.getCount(); i++) {
if (iBias == g_timezonesBias[i]->tzi.Bias) {
iSelection = i + 1;
break;
}
}
}
}
SendMessage(hWnd, lstMsg->setSel, iSelection, 0);
return iSelection;
}
示例5: CB_ReInitCustomButtons
void CB_ReInitCustomButtons()
{
for (int i = 0; i < LButtonsList.getCount(); i++) {
CustomButtonData *cbd = LButtonsList[i];
if (cbd->opFlags & BBSF_NTBSWAPED || cbd->opFlags & BBSF_NTBDESTRUCT) {
cbd->opFlags ^= BBSF_NTBSWAPED;
if (!(cbd->opFlags & BBSF_NTBDESTRUCT))
RButtonsList.insert(cbd);
LButtonsList.remove(i);
i--;
}
}
for (int i = 0; i < RButtonsList.getCount(); i++) {
CustomButtonData* cbd = RButtonsList[i];
if (cbd->opFlags & BBSF_NTBSWAPED || cbd->opFlags & BBSF_NTBDESTRUCT) {
cbd->opFlags ^= BBSF_NTBSWAPED;
if (!(cbd->opFlags & BBSF_NTBDESTRUCT))
LButtonsList.insert(cbd);
RButtonsList.remove(i);
i--;
}
}
M.BroadcastMessage(DM_BBNEEDUPDATE, 0, 0);
M.BroadcastMessage(DM_LOADBUTTONBARICONS, 0, 0);
}
示例6: RebuildListsBasedOnGroups
void RebuildListsBasedOnGroups(LIST<ExtraIconGroup> &groups)
{
extraIconsByHandle.destroy();
for (int i=0; i < registeredExtraIcons.getCount(); i++)
extraIconsByHandle.insert(registeredExtraIcons[i]);
for (int k=0; k < extraIconsBySlot.getCount(); k++) {
ExtraIcon *extra = extraIconsBySlot[k];
if (extra->getType() == EXTRAICON_TYPE_GROUP)
delete extra;
}
extraIconsBySlot.destroy();
for (int i=0; i < groups.getCount(); i++) {
ExtraIconGroup *group = groups[i];
for (int j = 0; j < group->m_items.getCount(); j++)
extraIconsByHandle.put(group->m_items[j]->getID()-1, group);
extraIconsBySlot.insert(group);
}
for (int k=0; k < extraIconsByHandle.getCount(); k++) {
ExtraIcon *extra = extraIconsByHandle[k];
if (extra->getType() != EXTRAICON_TYPE_GROUP)
extraIconsBySlot.insert(extra);
}
}
示例7: msgQueue_processack
void msgQueue_processack(MCONTACT hContact, int id, BOOL success, const char* szErr)
{
MCONTACT hMeta = db_mc_getMeta(hContact);
mir_cslockfull lck(csMsgQueue);
for (int i = 0; i < msgQueue.getCount(); i++) {
TMsgQueue *item = msgQueue[i];
if ((item->hContact == hContact || item->hContact == hMeta) && item->id == id) {
msgQueue.remove(i); i--;
if (!msgQueue.getCount() && timerId) {
KillTimer(NULL, timerId);
timerId = 0;
}
lck.unlock();
if (success) {
mir_free(item->szMsg);
mir_free(item);
}
else MessageFailureProcess(item, szErr);
break;
}
}
}
示例8: DefWindowProc
static LRESULT CALLBACK PopupThreadManagerWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
PopupWnd2 *wnd = NULL;
if (message == UTM_ADD_WINDOW || message == UTM_UPDATE_WINDOW || message == UTM_REMOVE_WINDOW || message == UTM_REQUEST_REMOVE)
if (!(wnd = (PopupWnd2 *)lParam))
return 0;
switch (message) {
case UTM_STOP_THREAD:
gTerminating = true;
if (db_get_b(NULL, MODULNAME, "FastExit", 0))
for (int i = 0; i < popupList.getCount(); ++i)
PUDeletePopup(popupList[i]->getHwnd());
PostQuitMessage(0);
break;
case UTM_ADD_WINDOW:
if (gTerminating)
break;
UpdatePopupPosition(popupList.getCount() ? popupList[popupList.getCount() - 1] : 0, wnd);
popupList.insert(wnd);
++nPopups;
wnd->callMethodAsync(&PopupWnd2::m_show, 0);
break;
case UTM_UPDATE_WINDOW:
RepositionPopups();
break;
case UTM_REQUEST_REMOVE:
if ((PopupOptions.LeaveHovered && gLockCount) || (wnd && wnd->isLocked()))
wnd->updateTimer();
else
PostMessage(wnd->getHwnd(), WM_CLOSE, 0, 0);
break;
case UTM_REMOVE_WINDOW:
{
for (int i = popupList.getCount() - 1; i >= 0; i--)
if (popupList[i] == wnd)
popupList.remove(i);
}
RepositionPopups();
--nPopups;
delete wnd;
break;
case UTM_LOCK_QUEUE:
++gLockCount;
break;
case UTM_UNLOCK_QUEUE:
if (--gLockCount < 0)
gLockCount = 0;
break;
}
return DefWindowProc(hwnd, message, wParam, lParam);
}
示例9:
~TTreeList_ItemInfo()
{
for (int i = text.getCount(); i--;)
mir_free(text[i]);
for (int k = subItems.getCount(); k--;)
delete subItems[k];
}
示例10: CB_ModifyButton
static INT_PTR CB_ModifyButton(WPARAM, LPARAM lParam)
{
BBButton *bbdi = (BBButton *)lParam;
if (!bbdi)
return 1;
bool bFound = 1;
CustomButtonData *cbd = NULL;
{
mir_cslock lck(ToolBarCS);
for (int i = 0; i < LButtonsList.getCount(); i++) {
cbd = LButtonsList[i];
if (!strcmp(cbd->pszModuleName, bbdi->pszModuleName) && (cbd->dwButtonOrigID == bbdi->dwButtonID)) {
bFound = true;
break;
}
}
if (!bFound) {
for (int i = 0; i < RButtonsList.getCount(); i++) {
cbd = RButtonsList[i];
if (!strcmp(cbd->pszModuleName, bbdi->pszModuleName) && (cbd->dwButtonOrigID == bbdi->dwButtonID)) {
bFound = true;
break;
}
}
}
if (bFound) {
if (bbdi->pszTooltip) {
mir_free(cbd->ptszTooltip);
if (bbdi->bbbFlags & BBBF_ANSITOOLTIP)
cbd->ptszTooltip = mir_a2u(bbdi->pszTooltip);
else
cbd->ptszTooltip = mir_tstrdup(bbdi->ptszTooltip);
}
if (bbdi->hIcon)
cbd->hIcon = bbdi->hIcon;
if (bbdi->bbbFlags) {
cbd->bHidden = (bbdi->bbbFlags & BBBF_HIDDEN) != 0;
cbd->bLSided = (bbdi->bbbFlags & BBBF_ISLSIDEBUTTON) != 0;
cbd->bRSided = (bbdi->bbbFlags & BBBF_ISRSIDEBUTTON) != 0;
cbd->bCanBeHidden = (bbdi->bbbFlags & BBBF_CANBEHIDDEN) != 0;
cbd->bChatButton = (bbdi->bbbFlags & BBBF_ISCHATBUTTON) != 0;
cbd->bIMButton = (bbdi->bbbFlags & BBBF_ISIMBUTTON) != 0;
cbd->bDisabled = (bbdi->bbbFlags & BBBF_DISABLED) != 0;
}
}
}
if (bFound)
M.BroadcastMessage(DM_BBNEEDUPDATE, 0, (LPARAM)cbd);
return 0;
}
示例11: UnloadExtraIconsModule
void UnloadExtraIconsModule(void)
{
for (int k = 0; k < extraIconsBySlot.getCount(); k++) {
ExtraIcon *extra = extraIconsBySlot[k];
if (extra->getType() == EXTRAICON_TYPE_GROUP)
delete extra;
}
for (int i = 0; i < registeredExtraIcons.getCount(); i++)
delete registeredExtraIcons[i];
}
示例12: RichEditData_Destroy
void RichEditData_Destroy(void)
{
int i;
for (i=g_RichEditList.getCount()-1; i >= 0; i--)
CloseRichCallback(g_RichEditList[i]->hwnd);
g_RichEditList.destroy();
for (i=g_RichEditOwnerList.getCount()-1; i >= 0; i--)
CloseRichOwnerCallback(g_RichEditOwnerList[i]->hwnd);
g_RichEditOwnerList.destroy();
}
示例13: BB_RefreshTheme
void BB_RefreshTheme(const TWindowData *dat)
{
for (int i = 0; i < RButtonsList.getCount(); i++) {
CustomButtonData* cbd = RButtonsList[i];
SendMessage(GetDlgItem(dat->hwnd, cbd->dwButtonCID), WM_THEMECHANGED, 0, 0);
}
for (int i = 0; i < LButtonsList.getCount(); i++) {
CustomButtonData* cbd = LButtonsList[i];
SendMessage(GetDlgItem(dat->hwnd, cbd->dwButtonCID), WM_THEMECHANGED, 0, 0);
}
}
示例14: GetPluginNameByInstance
char * GetPluginNameByInstance( HINSTANCE hInstance )
{
int i = 0;
if ( pluginList.getCount() == 0) return NULL;
for (i = 0; i < pluginList.getCount(); i++)
{
pluginEntry* pe = pluginList[i];
if (pe->bpi.pluginInfo && pe->bpi.hInst == hInstance)
return pe->bpi.pluginInfo->shortName;
}
return NULL;
}
示例15: FreeResidentSettings
void FreeResidentSettings()
{
for (int i = 0; i < m_lResidentSettings.getCount(); i++) {
mir_free(m_lResidentSettings[i]);
}
m_lResidentSettings.destroy();
for (int i = 0; i < m_lResidentModules.getCount(); i++) {
mir_free(m_lResidentModules[i]);
}
m_lResidentModules.destroy();
}