本文整理汇总了C++中DBGetContactSettingByte函数的典型用法代码示例。如果您正苦于以下问题:C++ DBGetContactSettingByte函数的具体用法?C++ DBGetContactSettingByte怎么用?C++ DBGetContactSettingByte使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DBGetContactSettingByte函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onIconPressed
int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam) {
HANDLE hContact = (HANDLE)wParam;
HANDLE hMeta = hContact;
if(metaIsProtoMetaContacts(hContact))
hContact = metaGetMostOnline(hContact); // возьмем тот, через который пойдет сообщение
else if(metaIsSubcontact(hContact))
hMeta = metaGetContact(hContact);
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if(strcmp(sicd->szModule, szGPGModuleName))
return 0; // not our event
void setSrmmIcon(HANDLE);
void setClistIcon(HANDLE);
bool isContactHaveKey(HANDLE hContact);
BYTE enc = DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0);
if(enc)
{
DBWriteContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0);
DBWriteContactSettingByte(hMeta, szGPGModuleName, "GPGEncryption", 0);
setSrmmIcon(hContact);
setClistIcon(hContact);
}
else if(!enc)
{
if(!isContactHaveKey(hContact))
{
void ShowLoadPublicKeyDialog();
extern map<int, HANDLE> user_data;
extern int item_num;
item_num = 0; //black magic here
user_data[1] = hContact;
ShowLoadPublicKeyDialog();
}
else
{
DBWriteContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 1);
DBWriteContactSettingByte(hMeta, szGPGModuleName, "GPGEncryption", 1);
setSrmmIcon(hContact);
setClistIcon(hContact);
return 0;
}
if(isContactHaveKey(hContact))
{
DBWriteContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 1);
DBWriteContactSettingByte(hMeta, szGPGModuleName, "GPGEncryption", 1);
setSrmmIcon(hContact);
setClistIcon(hContact);
}
}
return 0;
}
示例2: SortGroup
static void SortGroup(struct ClcData *dat,struct ClcGroup *group,int useInsertionSort)
{
int i,sortCount;
for(i=group->contactCount-1;i>=0;i--) {
if(group->contact[i].type==CLCIT_DIVIDER) {
group->contactCount--;
memmove(&group->contact[i],&group->contact[i+1],sizeof(struct ClcContact)*(group->contactCount-i));
}
}
for(i=0;i<group->contactCount;i++)
if(group->contact[i].type!=CLCIT_INFO) break;
if(i>group->contactCount-2) return;
if(group->contact[i].type==CLCIT_GROUP) {
if(dat->exStyle&CLS_EX_SORTGROUPSALPHA) {
for(sortCount=0;i+sortCount<group->contactCount;sortCount++)
if(group->contact[i+sortCount].type!=CLCIT_GROUP) break;
qsort(group->contact+i,sortCount,sizeof(struct ClcContact),GroupSortProc);
i=i+sortCount;
}
for(;i<group->contactCount;i++)
if(group->contact[i].type==CLCIT_CONTACT) break;
if(group->contactCount-i<2) return;
}
for(sortCount=0;i+sortCount<group->contactCount;sortCount++)
if(group->contact[i+sortCount].type!=CLCIT_CONTACT) break;
if(useInsertionSort) InsertionSort(group->contact+i,sortCount,ContactSortProc);
else qsort(group->contact+i,sortCount,sizeof(struct ClcContact),ContactSortProc);
if(dat->exStyle&CLS_EX_DIVIDERONOFF) {
int prevContactOnline=0;
for(i=0;i<group->contactCount;i++)
{
if(group->contact[i].type!=CLCIT_CONTACT && group->contact[i].type!=CLCIT_GROUP) continue;
if ((group->contact[i].type==CLCIT_GROUP) && DBGetContactSettingByte(NULL,"CList","PlaceOfflineToRoot",0)) prevContactOnline=1;
if (group->contact[i].type==CLCIT_CONTACT)
if(group->contact[i].flags&CONTACTF_ONLINE) prevContactOnline=1;
else
{
if(prevContactOnline)
{
i=AddItemToGroup(group,i);
group->contact[i].type=CLCIT_DIVIDER;
if (group->contact[i].szText) mir_free(group->contact[i].szText);
group->contact[i].szText=mir_strdupT(TranslateT("Offline"));
}
break;
}
}
}
ClearRowByIndexCache();
}
示例3: CList_SetOffline
BOOL CList_SetOffline(HANDLE hContact, BOOL bHide)
{
if ( hContact ) {
char * szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
int i = DBGetContactSettingByte(hContact, szProto, "ChatRoom", 0);
DBWriteContactSettingWord(hContact, szProto,"ApparentMode",(LPARAM) 0);
DBWriteContactSettingWord(hContact, szProto, "Status", ID_STATUS_OFFLINE);
if (bHide && i != GCW_SERVER)
DBWriteContactSettingByte(hContact, "CList", "Hidden", 1);
return TRUE;
}
return FALSE;
}
示例4: ExtIconFromStatusMode
////////// By FYR/////////////
int ExtIconFromStatusMode(HANDLE hContact, const char *szProto,int status)
{
if (DBGetContactSettingByte(NULL,"CLC","Meta",0)==1)
return IconFromStatusMode(szProto,status);
if (szProto!=NULL)
if (MyStrCmp(szProto,"MetaContacts")==0) {
hContact=(HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT,(UINT)hContact,0);
if (hContact!=0) {
szProto=(char*)CallService(MS_PROTO_GETCONTACTBASEPROTO,(UINT)hContact,0);
status=DBGetContactSettingWord(hContact,szProto,"Status",ID_STATUS_OFFLINE);
}
}
return IconFromStatusMode(szProto,status);
}
示例5: SetHideOffline
int SetHideOffline(WPARAM wParam, LPARAM lParam)
{
switch ((int) wParam) {
case 0:
DBWriteContactSettingByte(NULL, "CList", "HideOffline", 0); break;
case 1:
DBWriteContactSettingByte(NULL, "CList", "HideOffline", 1); break;
case -1:
DBWriteContactSettingByte(NULL, "CList", "HideOffline", (BYTE) ! DBGetContactSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)); break;
}
SetButtonStates(hwndContactList);
LoadContactTree();
return 0;
}
示例6: OnBuildGroupMenu
static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam)
{
CLISTMENUITEM mi;
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.flags = CMIM_FLAGS | (DBGetContactSettingByte(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)?CMIF_CHECKED:0);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hHideOfflineUsersMenuItem, (LPARAM)&mi);
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.flags = CMIM_FLAGS | (SendMessage(hwndContactTree,CLM_GETHIDEOFFLINEROOT,0,0)?CMIF_CHECKED:0);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hHideOfflineUsersOutHereMenuItem, (LPARAM)&mi);
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.flags = CMIM_FLAGS | (GetWindowLong(hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS?CMIF_CHECKED:0);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hHideEmptyGroupsMenuItem, (LPARAM)&mi);
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.flags = CMIM_FLAGS | (GetWindowLong(hwndContactTree,GWL_STYLE)&CLS_USEGROUPS?0:CMIF_CHECKED);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hDisableGroupsMenuItem, (LPARAM)&mi);
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.flags = CMIM_FLAGS;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hGroupMainMenuItemProxy, (LPARAM)&mi);
CheckMenuItem(hMenuOldContext, POPUP_VISIBILITY, MF_BYCOMMAND | (g_CluiData.dwFlags & CLUI_SHOWVISI ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(hMenuOldContext, POPUP_FRAME, MF_BYCOMMAND | (g_CluiData.dwFlags & CLUI_FRAME_CLISTSUNKEN ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(hMenuOldContext, POPUP_TOOLBAR, MF_BYCOMMAND | (g_CluiData.dwFlags & CLUI_FRAME_SHOWTOPBUTTONS ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(hMenuOldContext, POPUP_BUTTONS, MF_BYCOMMAND | (g_CluiData.dwFlags & CLUI_FRAME_SHOWBOTTOMBUTTONS ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(hMenuOldContext, POPUP_SHOWMETAICONS, MF_BYCOMMAND | (g_CluiData.dwFlags & CLUI_USEMETAICONS ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(hMenuEventArea, ID_EVENTAREA_AUTOHIDE, MF_BYCOMMAND | (g_CluiData.dwFlags & CLUI_FRAME_AUTOHIDENOTIFY ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(hMenuEventArea, ID_EVENTAREA_ENABLED, MF_BYCOMMAND | (g_CluiData.dwFlags & CLUI_FRAME_USEEVENTAREA ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(hMenuEventArea, ID_EVENTAREA_SUNKENFRAME, MF_BYCOMMAND | (g_CluiData.dwFlags & CLUI_FRAME_EVENTAREASUNKEN ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(hMenuOldContext, POPUP_SHOWSTATUSICONS, MF_BYCOMMAND | (g_CluiData.dwFlags & CLUI_FRAME_STATUSICONS ? MF_CHECKED : MF_UNCHECKED));
// floater menu items
EnableMenuItem(hMenuOldContext, POPUP_FLOATER_AUTOHIDE, MF_BYCOMMAND | (g_CluiData.bUseFloater & CLUI_USE_FLOATER ? MF_ENABLED : MF_GRAYED));
EnableMenuItem(hMenuOldContext, POPUP_FLOATER_EVENTS, MF_BYCOMMAND | (g_CluiData.bUseFloater & CLUI_USE_FLOATER ? MF_ENABLED : MF_GRAYED));
CheckMenuItem(hMenuOldContext, POPUP_FLOATER, MF_BYCOMMAND | (g_CluiData.bUseFloater & CLUI_USE_FLOATER ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(hMenuOldContext, POPUP_FLOATER_AUTOHIDE, MF_BYCOMMAND | (g_CluiData.bUseFloater & CLUI_FLOATER_AUTOHIDE ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(hMenuOldContext, POPUP_FLOATER_EVENTS, MF_BYCOMMAND | (g_CluiData.bUseFloater & CLUI_FLOATER_EVENTS ? MF_CHECKED : MF_UNCHECKED));
return 0;
};
示例7: httpd_startup
long httpd_startup()
{
static unsigned long tmpid;
char tmp[MAX_PATH];
////////////
tzset();
////////////
svr_q_event = CreateEvent(0,0,0,0);
if(!svr_q_event) {
MB_Popup("HTTPDeamon","Could not create queue sync event!");
httpd_logaccess("ERROR: Could not create queue sync event!",GetLastError(),0,0);
return 0;
}
if(!(svr_q_hTh = CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)httpd_server_queue,NULL,0,&tmpid)))
{
MB_Popup("HTTPDeamon","Could not create queue thread!");
httpd_logaccess("ERROR: Could not create queue thread!",GetLastError(),0,0);
CloseHandle(svr_q_event);
svr_q_event = NULL;
return 0;
}
if(DBGetContactSettingByte(NULL,MBOT,"WWWLog",1)==1) {
InitializeCriticalSectionAndSpinCount(&svr_log_cs,0x80000100);
_snprintf(tmp,sizeof(tmp)-1,"%s\\mbot\\httpd.log",g_root);
svr_log = fopen(tmp,"a+b");
if(!svr_log) {
MB_Popup("HTTPDeamon","Could not create log file!");
httpd_logaccess("ERROR: Could not create log file!",GetLastError(),0,0);
DeleteCriticalSection(&svr_log_cs);
}
}
if(!(svr_hTh = CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)httpd_server_thread,NULL,0,&tmpid)))
{
MB_Popup("HTTPDeamon","Could not create server thread!");
httpd_logaccess("ERROR: Could not create server thread!",GetLastError(),0,0);
CloseHandle(svr_q_event);
TerminateThread(svr_q_hTh,0);
CloseHandle(svr_q_hTh);
svr_q_event = NULL;
svr_q_hTh = NULL;
return 0;
}
return 1;
}
示例8: LoadMsgDlgFont
void LoadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour)
{
char str[32];
int style;
DBVARIANT dbv;
if (colour) {
wsprintfA(str, "SRMFont%dCol", i);
*colour = DBGetContactSettingDword(NULL, SRMMMOD, str, fontOptionsList[i].defColour);
}
if (lf) {
wsprintfA(str, "SRMFont%dSize", i);
lf->lfHeight = (char) DBGetContactSettingByte(NULL, SRMMMOD, str, fontOptionsList[i].defSize);
lf->lfWidth = 0;
lf->lfEscapement = 0;
lf->lfOrientation = 0;
wsprintfA(str, "SRMFont%dSty", i);
style = DBGetContactSettingByte(NULL, SRMMMOD, str, fontOptionsList[i].defStyle);
lf->lfWeight = style & FONTF_BOLD ? FW_BOLD : FW_NORMAL;
lf->lfItalic = style & FONTF_ITALIC ? 1 : 0;
lf->lfUnderline = 0;
lf->lfStrikeOut = 0;
wsprintfA(str, "SRMFont%dSet", i);
lf->lfCharSet = DBGetContactSettingByte(NULL, SRMMMOD, str, fontOptionsList[i].defCharset);
lf->lfOutPrecision = OUT_DEFAULT_PRECIS;
lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf->lfQuality = DEFAULT_QUALITY;
lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
wsprintfA(str, "SRMFont%d", i);
if (DBGetContactSetting(NULL, SRMMMOD, str, &dbv))
lstrcpyA(lf->lfFaceName, fontOptionsList[i].szDefFace);
else {
lstrcpynA(lf->lfFaceName, dbv.pszVal, sizeof(lf->lfFaceName));
DBFreeVariant(&dbv);
}
}
}
示例9: CList_RoomDoubleclicked
int CList_RoomDoubleclicked(WPARAM wParam,LPARAM lParam)
{
DBVARIANT dbv;
char *szProto;
HANDLE hContact = (HANDLE)wParam;
if (!hContact)
return 0;
szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
if ( MM_FindModule(szProto)) {
if(DBGetContactSettingByte(hContact, szProto, "ChatRoom", 0) == 0)
return 0;
if ( !DBGetContactSettingTString( hContact, szProto, "ChatRoomID", &dbv )) {
SESSION_INFO* si = SM_FindSession( dbv.ptszVal, szProto );
if ( si ) {
// is the "toggle visibility option set, so we need to close the window?
if (si->hWnd != NULL
&& DBGetContactSettingByte(NULL, "Chat", "ToggleVisibility", 0)==1
&& !CallService(MS_CLIST_GETEVENT, (WPARAM)hContact, 0)
&& IsWindowVisible(si->hWnd)
&& !IsIconic(si->hWnd))
{
PostMessage(si->hWnd, GC_CLOSEWINDOW, 0, 0);
DBFreeVariant(&dbv);
return 1;
}
ShowRoom(si, WINDOW_VISIBLE, TRUE);
}
DBFreeVariant(&dbv);
return 1;
}
}
return 0;
}
示例10: StatusUpdaterThread
void StatusUpdaterThread(HWND hwndDlg)
{
int i,curdelay,lastcheck=0;
HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_LOWEST);
while (!stopStatusUpdater) {
curdelay=DBGetContactSettingByte(hContact,"CList","StatusMsgAutoDelay",15000);
if (curdelay<5000) curdelay=5000;
if ((int)(GetTickCount()-lastcheck)>curdelay)
{
lastcheck=GetTickCount();
if (DBGetContactSettingByte(hContact,"CList","StatusMsgAuto",0)) {
for (i=0; i<5; i++) {
if (hContact!=NULL) {
pdisplayNameCacheEntry pdnce =(pdisplayNameCacheEntry)pcli->pfnGetCacheEntry((HANDLE)hContact);
if (pdnce && !pdnce->protoNotExists && pdnce->szProto)
{
CallContactService(hContact, PSS_GETAWAYMSG, 0, 0);
}
hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
}
if (hContact==NULL) {
hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
if (hContact==NULL) break;
}
Sleep(500);
}
}
}
//Sleep(DBGetContactSettingByte(hContact,"CList","StatusMsgAutoDelay",100));
Sleep(200);
}
}
示例11: GetStatusIconsCount
int GetStatusIconsCount(HANDLE hContact) {
char buff[256];
int count = 0;
int flags;
struct StatusIconListNode *current = status_icon_list;
while(current) {
sprintf(buff, "SRMMStatusIconFlags%d", (int)current->sid.dwId);
flags = DBGetContactSettingByte(hContact, current->sid.szModule, buff, current->sid.flags);
if(!(flags & MBF_HIDDEN)) {
count ++;
}
current = current->next;
}
return count;
}
示例12: LoadContactTree
void LoadContactTree(void)
{
HANDLE hContact;
int i, status, hideOffline;
BOOL mc_disablehgh = ServiceExists(MS_MC_DISABLEHIDDENGROUP);
DBVARIANT dbv = {0};
CallService(MS_CLUI_LISTBEGINREBUILD, 0, 0);
for (i = 1; ; i++) {
if (GetGroupNameT(i, NULL) == NULL)
break;
CallService(MS_CLUI_GROUPADDED, i, 0);
}
hideOffline = DBGetContactSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT);
hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
while (hContact != NULL) {
status = GetContactStatus(hContact);
if ((!hideOffline || status != ID_STATUS_OFFLINE) && !CLVM_GetContactHiddenStatus(hContact, NULL, NULL))
ChangeContactIcon(hContact, IconFromStatusMode((char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0), status, hContact, NULL), 1);
if(mc_disablehgh && !mc_hgh_removed) {
if(!DBGetContactSetting(hContact, "CList", "Group", &dbv)) {
if(!strcmp(dbv.pszVal, "MetaContacts Hidden Group"))
DBDeleteContactSetting(hContact, "CList", "Group");
mir_free(dbv.pszVal);
}
}
hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
}
mc_hgh_removed = TRUE;
sortByStatus = DBGetContactSettingByte(NULL, "CList", "SortByStatus", SETTING_SORTBYSTATUS_DEFAULT);
sortByProto = DBGetContactSettingByte(NULL, "CList", "SortByProto", SETTING_SORTBYPROTO_DEFAULT);
CallService(MS_CLUI_SORTLIST, 0, 0);
CallService(MS_CLUI_LISTENDREBUILD, 0, 0);
}
示例13: SortContactsTimer
static VOID CALLBACK SortContactsTimer(HWND hwnd,UINT message,UINT idEvent,DWORD dwTime)
{
KillTimer(NULL,resortTimerId);
resortTimerId=0;
if (hwnd!=NULL)
{
KillTimer(hwnd,TIMERID_DELAYEDRESORTCLC);
SetTimer(hwnd,TIMERID_DELAYEDRESORTCLC,DBGetContactSettingByte(NULL,"CLUI","DELAYEDTIMER",10),NULL);
}
else
{
CallService(MS_CLUI_SORTLIST,0,0);
}
}
示例14: recvws
int ThreadData::zlibRecv( char* data, long datalen )
{
if ( zRecvReady ) {
retry:
zRecvDatalen = recvws( zRecvData, ZLIB_CHUNK_SIZE, MSG_NODUMP );
if ( zRecvDatalen == SOCKET_ERROR ) {
proto->Log( "Netlib_Recv() failed, error=%d", WSAGetLastError());
return SOCKET_ERROR;
}
if ( zRecvDatalen == 0 )
return 0;
zStreamIn.avail_in = zRecvDatalen;
zStreamIn.next_in = ( Bytef* )zRecvData;
}
zStreamIn.avail_out = datalen;
zStreamIn.next_out = ( BYTE* )data;
switch ( inflate( &zStreamIn, Z_NO_FLUSH )) {
case Z_OK:
proto->Log( "Inflate: Z_OK" );
break;
case Z_BUF_ERROR:
proto->Log( "Inflate: Z_BUF_ERROR" );
break;
case Z_DATA_ERROR:
proto->Log( "Inflate: Z_DATA_ERROR" );
break;
case Z_MEM_ERROR:
proto->Log( "Inflate: Z_MEM_ERROR" );
break;
}
int len = datalen - zStreamIn.avail_out;
if ( DBGetContactSettingByte( NULL, "Netlib", "DumpRecv", TRUE ) == TRUE ) {
char* szLogBuffer = ( char* )alloca( len+32 );
memcpy( szLogBuffer, data, len );
szLogBuffer[ len ]='\0';
proto->Log( "(ZLIB) Data received\n%s\n===IN: %d(%d) bytes", szLogBuffer, len, zRecvDatalen );
}
if ( len == 0 )
goto retry;
zRecvReady = ( zStreamIn.avail_out != 0 );
return len;
}
示例15: Meta_ForceDefault
/** Set/unset (i.e. toggle) contact to force use of default contact
*
* Set the given contact to be the default one for the metacontact to which it is linked.
*
* @param wParam : \c HANDLE to the MetaContact to be set as default
* @param lParam : \c HWND to the clist window
(This means the function has been called via the contact menu).
*/
INT_PTR Meta_ForceDefault(WPARAM wParam,LPARAM lParam)
{
if(DBGetContactSettingDword((HANDLE)wParam,META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1)
{ // the wParam is a MetaContact
BOOL current = DBGetContactSettingByte((HANDLE)wParam, META_PROTO, "ForceDefault", 0);
current = !current;
DBWriteContactSettingByte((HANDLE)wParam, META_PROTO, "ForceDefault", (BYTE)current);
DBWriteContactSettingDword((HANDLE)wParam, META_PROTO, "ForceSend", 0);
if(current) NotifyEventHooks(hEventForceSend, wParam, (LPARAM)Meta_GetContactHandle((HANDLE)wParam, DBGetContactSettingDword((HANDLE)wParam, META_PROTO, "Default", -1)));
else NotifyEventHooks(hEventUnforceSend, wParam, 0);
}
return 0;
}