本文整理汇总了C++中PINGLIST类的典型用法代码示例。如果您正苦于以下问题:C++ PINGLIST类的具体用法?C++ PINGLIST怎么用?C++ PINGLIST使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PINGLIST类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FillList
int FillList(WPARAM, LPARAM)
{
if (options.logging)
CallService(PLUG "/Log", (WPARAM)_T("ping address list reload"), 0);
PINGLIST pl;
CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
SendMessage(list_hwnd, WM_SETREDRAW, FALSE, 0);
{
mir_cslock lck(data_list_cs);
data_list = pl;
SendMessage(list_hwnd, LB_RESETCONTENT, 0, 0);
int index = 0;
for (pinglist_it j = data_list.begin(); j != data_list.end(); ++j, index++) {
SendMessage(list_hwnd, LB_INSERTSTRING, (WPARAM)-1, (LPARAM)&(*j));
}
set_list_changed(true);
list_size = data_list.size();
}
SendMessage(list_hwnd, WM_SETREDRAW, TRUE, 0);
InvalidateRect(list_hwnd, 0, FALSE);
SetEvent(hWakeEvent);
if (!ServiceExists(MS_CLIST_FRAMES_ADDFRAME) && options.attach_to_clist)
UpdateFrame();
return 0;
}
示例2: write_ping_addresses
// call with list_cs locked
void write_ping_addresses() {
int index = 0;
for(PINGLIST::iterator i = list_items.begin(); i != list_items.end(); i++, index++) {
i->index = index;
write_ping_address(&(*i));
}
}
示例3: reset_myhandle
void reset_myhandle() {
EnterCriticalSection(&list_cs);
set_changing_clist_handle(true);
for(PINGLIST::iterator i = list_items.begin(); i != list_items.end(); i++) {
DBWriteContactSettingString(i->hContact, "CList", "MyHandle", i->pszLabel);
}
set_changing_clist_handle(false);
LeaveCriticalSection(&list_cs);
}
示例4: PingDisableAll
INT_PTR PingDisableAll(WPARAM wParam, LPARAM lParam) {
PINGLIST pl;
CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
for(PINGLIST::Iterator i = pl.start(); i.has_val(); i.next()) {
i.val().status = PS_DISABLED;
i.val().miss_count = 0;
}
CallService(PLUG "/SetPingList", (WPARAM)&pl, 0);
return 0;
}
示例5: PingDisableAll
INT_PTR PingDisableAll(WPARAM, LPARAM) {
PINGLIST pl;
CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
for (pinglist_it i = pl.begin(); i != pl.end(); ++i) {
i->status = PS_DISABLED;
i->miss_count = 0;
}
CallService(PLUG "/SetPingList", (WPARAM)&pl, 0);
return 0;
}
示例6: PingEnableAll
INT_PTR PingEnableAll(WPARAM wParam, LPARAM lParam) {
PINGLIST pl;
CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
for(PINGLIST::Iterator i = pl.start(); i.has_val(); i.next()) {
if(i.val().status == PS_DISABLED) {
i.val().status = PS_NOTRESPONDING;
}
}
CallService(PLUG "/SetPingList", (WPARAM)&pl, 0);
return 0;
}
示例7: PingEnableAll
INT_PTR PingEnableAll(WPARAM, LPARAM) {
PINGLIST pl;
CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
for (pinglist_it i = pl.begin(); i != pl.end(); ++i) {
if (i->status == PS_DISABLED) {
i->status = PS_NOTRESPONDING;
}
}
CallService(PLUG "/SetPingList", (WPARAM)&pl, 0);
return 0;
}
示例8: ContactDblClick
int ContactDblClick(WPARAM wParam, LPARAM lParam) {
PINGLIST pl;
CallService(PROTO "/GetPingList", 0, (LPARAM)&pl);
for(PINGLIST::iterator i = pl.begin(); i != pl.end(); i++) {
if(i->hContact == (HANDLE)wParam) {
if(strlen(i->pszCommand)) {
ShellExecute(0, "open", i->pszCommand, i->pszParams, 0, SW_SHOW);
} else {
CallService(PROTO "/ToggleEnabled", wParam, 0);
}
}
}
return 0;
}
示例9: DblClick
INT_PTR DblClick(WPARAM wParam, LPARAM lParam) {
PINGLIST pl;
CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
for(PINGLIST::Iterator i = pl.start(); i.has_val(); i.next()) {
if(i.val().item_id == (DWORD)wParam) {
if(strlen(i.val().pszCommand)) {
ShellExecute(0, "open", i.val().pszCommand, i.val().pszParams, 0, SW_SHOW);
} else {
return CallService(PLUG "/ToggleEnabled", wParam, 0);
}
}
}
return 0;
}
示例10: DblClick
INT_PTR DblClick(WPARAM wParam, LPARAM) {
PINGLIST pl;
CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
for (pinglist_it i = pl.begin(); i != pl.end(); ++i) {
if (i->item_id == (DWORD)wParam) {
if (mir_tstrlen(i->pszCommand)) {
ShellExecute(0, _T("open"), i->pszCommand, i->pszParams, 0, SW_SHOW);
}
else {
return CallService(PLUG "/ToggleEnabled", wParam, 0);
}
}
}
return 0;
}
示例11: ToggleEnabled
INT_PTR ToggleEnabled(WPARAM wParam, LPARAM lParam) {
int retval = 0;
PINGLIST pl;
CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
for(PINGLIST::Iterator i = pl.start(); i.has_val(); i.next()) {
if(i.val().item_id == (DWORD)wParam) {
if(i.val().status == PS_DISABLED)
i.val().status = PS_NOTRESPONDING;
else {
i.val().status = PS_DISABLED;
i.val().miss_count = 0;
retval = 1;
}
}
}
CallService(PLUG "/SetPingList", (WPARAM)&pl, 0);
return 0;
}
示例12: ToggleEnabled
INT_PTR ToggleEnabled(WPARAM wParam, LPARAM) {
int retval = 0;
PINGLIST pl;
CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
for (pinglist_it i = pl.begin(); i != pl.end(); ++i) {
if (i->item_id == (DWORD)wParam) {
if (i->status == PS_DISABLED)
i->status = PS_NOTRESPONDING;
else {
i->status = PS_DISABLED;
i->miss_count = 0;
retval = 1;
}
}
}
CallService(PLUG "/SetPingList", (WPARAM)&pl, 0);
return 0;
}
示例13: EditContact
int EditContact(WPARAM wParam, LPARAM lParam) {
PINGLIST pl;
HWND hwndList = (HWND)CallService(MS_CLUI_GETHWND, 0, 0);
CallService(PROTO "/GetPingList", 0, (LPARAM)&pl);
for(PINGLIST::iterator i = pl.begin(); i != pl.end(); i++) {
if(i->hContact == (HANDLE)wParam) {
add_edit_addr = *i;
if(DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG3), hwndList, DlgProcDestEdit) == IDOK) {
*i = add_edit_addr;
CallService(PROTO "/SetAndSavePingList", (WPARAM)&pl, 0);
return 0;
}
}
}
return 1;
}
示例14: EditContact
INT_PTR EditContact(WPARAM wParam, LPARAM)
{
PINGLIST pl;
HWND hwndList = pcli->hwndContactList;
CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
for (pinglist_it i = pl.begin(); i != pl.end(); ++i) {
if (i->item_id == (DWORD)wParam) {
add_edit_addr = *i;
if (DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG3), hwndList, DlgProcDestEdit) == IDOK) {
*i = add_edit_addr;
CallService(PLUG "/SetAndSavePingList", (WPARAM)&pl, 0);
return 0;
}
}
}
return 1;
}
示例15: read_ping_addresses
// call with list_cs locked
void read_ping_addresses()
{
PINGADDRESS pa;
pa.index = 0;
list_items.clear();
while (read_ping_address(pa))
{
list_items.push_back(pa);
++pa.index;
}
}