int ProtoAck(WPARAM wParam, LPARAM lParam) {
	ACKDATA *ack = (ACKDATA *)lParam;
	if (ack->type == ACKTYPE_AWAYMSG && ack->result == ACKRESULT_SUCCESS)
	{
#ifdef _UNICODE
		DBVARIANT dbv;
		if (!DBGetContactSetting(ack->hContact, "CList", "StatusMsg", &dbv))
		{
			bool unicode = (dbv.type == DBVT_UTF8 || dbv.type == DBVT_WCHAR);
			DBFreeVariant(&dbv);
			if (unicode) {
				DBGetContactSettingTString(ack->hContact, "CList", "StatusMsg", &dbv);
				PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)_tcsdup(dbv.ptszVal));
				DBFreeVariant(&dbv);
				return 0;
			}
		}
#endif	
		char *szMsg = (char *)ack->lParam;
		if (szMsg && szMsg[0])
			PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)a2t(szMsg));
	}
	else if (ack->type == ACKTYPE_GETINFO && ack->result == ACKRESULT_SUCCESS)
	{
		PostMPMessage(MUM_REDRAW, (WPARAM)ack->hContact, 0);
	}
		
	return 0;
}
示例#2
0
int Popup2Show(WPARAM wParam, LPARAM lParam) {

    HANDLE hNotify = (HANDLE)lParam;

    PopupData *pd_out = (PopupData *)mir_alloc(sizeof(PopupData));
    memset(pd_out, 0, sizeof(PopupData));

    PostMPMessage(MUM_CREATEPOPUP, (WPARAM)hNotify, (LPARAM)pd_out);
    PostMPMessage(MUM_NMUPDATE, (WPARAM)hNotify, 0);
    return 0;
}
int FramesHideSBTip(WPARAM wParam, LPARAM lParam) {
	if(options.status_bar_tips) {
		PostMPMessage(MUM_DELETEPOPUP, 0, 0);
		return 1;
	}
	return 0;
}
int FramesShowSBTip(WPARAM wParam, LPARAM lParam) {
	if(options.status_bar_tips) {
		char *proto = (char *)wParam;

		CLCINFOTIPEX *clcit2 = (CLCINFOTIPEX *)malloc(sizeof(CLCINFOTIPEX));
		memset(clcit2, 0, sizeof(CLCINFOTIPEX));
		clcit2->cbSize = sizeof(CLCINFOTIPEX);
		clcit2->proto = proto; // assume static string
		GetCursorPos(&clcit2->ptCursor);

		PostMPMessage(MUM_CREATEPOPUP, 0, (LPARAM)clcit2);

		return 1;
	}
	return 0;
}
INT_PTR ShowTipW(WPARAM wParam, LPARAM lParam) {
	CLCINFOTIP *clcit = (CLCINFOTIP *)lParam;
	if(clcit->isGroup) return 0; // no group tips (since they're pretty useless)
	if(clcit->isTreeFocused == 0 && options.show_no_focus == false) return 0;

	CLCINFOTIPEX *clcit2 = (CLCINFOTIPEX *)malloc(sizeof(CLCINFOTIPEX));
	memcpy(clcit2, clcit, sizeof(CLCINFOTIP));
	clcit2->cbSize = sizeof(CLCINFOTIPEX);
	clcit2->proto = 0;
	clcit2->text = 0;

	if(wParam) { // wParam is char pointer containing text - e.g. status bar tooltip
		clcit2->text = _tcsdup((TCHAR *)wParam);
		GetCursorPos(&clcit2->ptCursor);
	}

	PostMPMessage(MUM_CREATEPOPUP, 0, (LPARAM)clcit2);
	return 1;
}
void DeinitMessagePump() {
	PostMPMessage(WM_QUIT, 0, 0);

	UnregisterClass(POP_WIN_CLASS, hInst);
}
INT_PTR HideTip(WPARAM wParam, LPARAM lParam) {
	//CLCINFOTIP *clcit = (CLCINFOTIP *)lParam;
	PostMPMessage(MUM_DELETEPOPUP, 0, 0);
	return 1;
}
示例#8
0
int Popup2Remove(WPARAM, LPARAM lParam)
{
	HANDLE hNotify = (HANDLE)lParam;
	PostMPMessage(MUM_NMREMOVE, (WPARAM)hNotify, 0);
	return 0;
}
示例#9
0
int AvatarChanged(WPARAM, LPARAM)
{
	PostMPMessage(MUM_NMAVATAR, 0, 0);
	return 0;
}
示例#10
0
int Popup2Update(WPARAM, LPARAM lParam)
{
	HANDLE hNotify = (HANDLE)lParam;
	PostMPMessage(MUM_NMUPDATE, (WPARAM)hNotify, 0);
	return 0;
}
示例#11
0
int AvatarChanged(WPARAM wParam, LPARAM lParam) {
    PostMPMessage(MUM_NMAVATAR, 0, 0);
    return 0;
}
示例#12
0
void DeinitMessagePump()
{
	PostMPMessage(WM_QUIT, 0, 0);
}