当前位置: 首页>>代码示例>>C++>>正文


C++ DBGetContactSettingDword函数代码示例

本文整理汇总了C++中DBGetContactSettingDword函数的典型用法代码示例。如果您正苦于以下问题:C++ DBGetContactSettingDword函数的具体用法?C++ DBGetContactSettingDword怎么用?C++ DBGetContactSettingDword使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DBGetContactSettingDword函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: LoadOption_Actions

void LoadOption_Actions() {
	PopUpOptions.actions			= DBGetContactSettingDword(NULL, MODULNAME, "Actions",
									  ACT_ENABLE|ACT_RIGHTICONS|ACT_DEF_KEEPWND|ACT_DEF_IMONLY|
									  ACT_DEF_NOGLOBAL|ACT_DEF_MESSAGE|ACT_DEF_DETAILS|ACT_DEF_MENU|
									  ACT_DEF_ADD|ACT_DEF_DISMISS|ACT_DEF_PIN);
	PopUpOptions.overrideLeft		= DBGetContactSettingDword(NULL,MODULNAME, "OverrideLeft", 0);
	PopUpOptions.overrideMiddle		= DBGetContactSettingDword(NULL,MODULNAME, "OverrideMiddle", 0);
	PopUpOptions.overrideRight		= DBGetContactSettingDword(NULL,MODULNAME, "OverrideRight", 0);
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:9,代码来源:actions.cpp

示例2: LoadPosition

void LoadPosition(HWND hWnd, char *wndName)
{	
	char buffer[512];
	int x,y ;
	mir_snprintf(buffer, SIZEOF(buffer), "%sPosX", wndName);
	x = DBGetContactSettingDword(0, __INTERNAL_NAME, buffer, ((GetSystemMetrics(SM_CXSCREEN)) / 2)-130);
	mir_snprintf(buffer, SIZEOF(buffer), "%sPosY", wndName);
	y = DBGetContactSettingDword(0, __INTERNAL_NAME, buffer, ((GetSystemMetrics(SM_CYSCREEN))/ 2)-80);
	SetWindowPos(hWnd, NULL, x, y, 0, 0, SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOSIZE);
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:10,代码来源:Utils.cpp

示例3: showPopupMsg

void showPopupMsg(HANDLE hContact, LPCSTR lpzText, HICON hIcon, int type) {

        // type:
        // 0 - error
        // 1 - key sent
        // 2 - key recv
        // 3 - established
        // 4 - disabled
        // 5 - msg recv
        // 6 - msg sent
        //

	if(!bPopupExists) return;

	char nback[32]; mir_snprintf(nback,sizeof(nback),"popup%dback", $type);
	char ntext[32]; mir_snprintf(ntext,sizeof(ntext),"popup%dtext", $type);
	char ntime[32]; mir_snprintf(ntime,sizeof(ntime),"popup%dtime", $type);

	COLORREF colorBack = (COLORREF)DBGetContactSettingDword(0,szModuleName,nback,(DWORD)RGB(230,230,255));
	COLORREF colorText = (COLORREF)DBGetContactSettingDword(0,szModuleName,ntext,(DWORD)RGB(0,0,0));
	int timeout = (int)DBGetContactSettingWord(0,szModuleName,ntime,0);

	if( bCoreUnicode && bPopupUnicode ) {
		POPUPDATAW ppd;
		memset(&ppd,0,sizeof(POPUPDATAW));
		ppd.lchContact = hContact;
		ppd.lchIcon = hIcon;
		LPWSTR lpwzContactName = (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCMDF_UNICODE);
		wcscpy(ppd.lpwzContactName, lpwzContactName);
		LPWSTR lpwzText = mir_a2u(lpzText);
		wcscpy(ppd.lpwzText, TranslateW(lpwzText));
		mir_free(lpwzText);
		ppd.colorBack = colorBack;
		ppd.colorText = colorText;
		ppd.iSeconds = timeout;
//		ppd.PluginWindowProc = (WNDPROC)PopupDlgProc;
//		ppd.PluginData = NULL;
		CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, 0);
	}
	else {
		POPUPDATAEX ppd;
		memset(&ppd,0,sizeof(POPUPDATAEX));
		ppd.lchContact = hContact;
		ppd.lchIcon = hIcon;
		LPSTR lpzContactName = (LPSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0);
		strcpy(ppd.lpzContactName, lpzContactName);
		strcpy(ppd.lpzText, Translate(lpzText));
		ppd.colorBack = colorBack;
		ppd.colorText = colorText;
		ppd.iSeconds = timeout;
//		ppd.PluginWindowProc = (WNDPROC)PopupDlgProc;
//		ppd.PluginData = NULL;
		CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd, 0);
	}
}
开发者ID:aventado,项目名称:secureimplugin,代码行数:55,代码来源:svcs_popup.cpp

示例4: DBGetContactSettingDword

int FacebookProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam)
{
	HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
	if(IsMyContact(hContact/*, true*/)) {
		bool hide = (DBGetContactSettingDword(hContact, m_szModuleName, FACEBOOK_KEY_DELETED, 0)
			|| DBGetContactSettingDword(hContact, m_szModuleName, FACEBOOK_KEY_CONTACT_TYPE, 0) );
		ShowContactMenus(true, hide);
	}

	return 0;
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:11,代码来源:proto.cpp

示例5: GetMask

static DWORD GetMask(HANDLE hContact)
{
	DWORD mask=DBGetContactSettingDword(hContact,"Ignore","Mask1",(DWORD)(-1));
	if(mask==(DWORD)(-1)) {
		if(hContact==NULL) mask=0;
		else {
			if(DBGetContactSettingByte(hContact,"CList","Hidden",0) || DBGetContactSettingByte(hContact,"CList","NotOnList",0))
				mask=DBGetContactSettingDword(NULL,"Ignore","Mask1",0);
			else
				mask=DBGetContactSettingDword(NULL,"Ignore","Default1",0);
		}
	}
	return mask;
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:14,代码来源:ignore.cpp

示例6: LoadOptions

void LoadOptions() {
	options.default_timeout = DBGetContactSettingDword(0, MODULE, "DefaultTimeout", 7);
	options.win_width = DBGetContactSettingDword(0, MODULE, "WinWidth", 220);
	options.win_max_height = DBGetContactSettingDword(0, MODULE, "WinMaxHeight", 400);
	options.location = (PopupLocation)DBGetContactSettingByte(0, MODULE, "Location", (BYTE)PL_BOTTOMRIGHT);
	options.opacity = DBGetContactSettingByte(0, MODULE, "Opacity", 75);
	options.border = (DBGetContactSettingByte(0, MODULE, "Border", 1) == 1);
	options.round = (DBGetContactSettingByte(0, MODULE, "RoundCorners", 1) == 1);
	options.av_round = (DBGetContactSettingByte(0, MODULE, "AvatarRoundCorners", 1) == 1);
	options.animate = (DBGetContactSettingByte(0, MODULE, "Animate", 1) == 1);
	options.trans_bg = (DBGetContactSettingByte(0, MODULE, "TransparentBg", 0) == 1);
	options.use_mim_monitor = (DBGetContactSettingByte(0, MODULE, "UseMimMonitor", 1) == 1);
	options.right_icon = (DBGetContactSettingByte(0, MODULE, "RightIcon", 0) == 1);
	options.av_layout = PAV_NONE; // corrected in LoadModuleDependentOptions function above
	options.av_size = DBGetContactSettingDword(0, MODULE, "AVSize", 40); //tweety
	options.text_indent = DBGetContactSettingDword(0, MODULE, "TextIndent", 22); 
	options.global_hover = (DBGetContactSettingByte(0, MODULE, "GlobalHover", 1) == 1); 
	options.time_layout = PT_RIGHT; // corrected in LoadModuleDependentOptions function above

	char buff[128];
	for(int i = 0; i < 10; i++) {
		sprintf(buff, "DisableStatus%d", i - 1); // -1 because i forgot offline status earlier!
		options.disable_status[i] = (DBGetContactSettingByte(0, MODULE, buff, 0) == 1);
	}

	options.disable_full_screen = (DBGetContactSettingByte(0, MODULE, "DisableFullScreen", 1) == 1);
	options.drop_shadow = (DBGetContactSettingByte(0, MODULE, "DropShadow", 0) == 1);
	options.sb_width = DBGetContactSettingDword(0, MODULE, "SidebarWidth", 22);
	options.padding = DBGetContactSettingDword(0, MODULE, "Padding", 4);
	options.av_padding = DBGetContactSettingDword(0, MODULE, "AvatarPadding", 4);
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:31,代码来源:options.cpp

示例7: EnterCriticalSection

int cfg::getCache(const HANDLE hContact, const char *szProto)
{
    int i, iFound = -1;

    for(i = 0; i < nextCacheEntry; i++) {
        if(eCache[i].hContact == hContact) {
            iFound = i;
            break;
        }
    }
    if(iFound == -1) {
		EnterCriticalSection(&cachecs);
        if(nextCacheEntry == maxCacheEntry) {
            maxCacheEntry += 100;
            cfg::eCache = (TExtraCache *)realloc(cfg::eCache, maxCacheEntry * sizeof(TExtraCache));
        }
        memset(&cfg::eCache[nextCacheEntry], 0, sizeof(TExtraCache));
		cfg::eCache[nextCacheEntry].hContact = hContact;
        memset(cfg::eCache[nextCacheEntry].iExtraImage, 0xff, MAXEXTRACOLUMNS);
        cfg::eCache[nextCacheEntry].iExtraValid = 0;
        cfg::eCache[nextCacheEntry].valid = FALSE;
        cfg::eCache[nextCacheEntry].bStatusMsgValid = 0;
        cfg::eCache[nextCacheEntry].statusMsg = NULL;
        cfg::eCache[nextCacheEntry].status_item = NULL;
        LoadSkinItemToCache(&cfg::eCache[nextCacheEntry], szProto);
        cfg::eCache[nextCacheEntry].dwCFlags = 0;
        cfg::eCache[nextCacheEntry].dwDFlags = DBGetContactSettingDword(hContact, "CList", "CLN_Flags", 0);
        cfg::eCache[nextCacheEntry].dwXMask = CalcXMask(hContact);
        GetCachedStatusMsg(nextCacheEntry, const_cast<char *>(szProto));
		cfg::eCache[nextCacheEntry].dwLastMsgTime = INTSORT_GetLastMsgTime(hContact);
        iFound = nextCacheEntry++;
		LeaveCriticalSection(&cachecs);
    }
    return iFound;
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:35,代码来源:config.cpp

示例8: GetStatsuBarProtoRect

int GetStatsuBarProtoRect(HWND hwnd,char *szProto,RECT *rc)
{
	int nParts,nPanel;
	ProtocolData *PD;
	int startoffset=DBGetContactSettingDword(NULL,"StatusBar","FirstIconOffset",0);
	
	if (!UseOwnerDrawStatusBar) startoffset=0;

	nParts=SendMessage(hwnd,SB_GETPARTS,0,0);
	FillMemory(rc,sizeof(RECT),0);

	for (nPanel=0;nPanel<nParts;nPanel++)
	{
		PD=(ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,(LPARAM)0);
		if ( PD == NULL )
			return(0);
	
		if (!strcmp(szProto,PD->RealName))
		{
			SendMessage(hwnd,SB_GETRECT,(WPARAM)nPanel,(LPARAM)rc);
			rc->left+=startoffset;
			rc->right+=startoffset;
			return(0);
		}
	}
	return (0);
}
开发者ID:raoergsls,项目名称:miranda,代码行数:27,代码来源:clui.c

示例9: load_listbox_items

void load_listbox_items() {

	HANDLE hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
	LISTITEM pa;
	DBVARIANT dbv;
	char *proto;

	listbox_items.destroy();
	while ( hContact != NULL ) {
		proto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM )hContact,0 );
		if ( proto && !strcmp( PROTO, proto)) {
			pa.hContact = hContact;
			if(!DBGetContactSettingTString(pa.hContact, PROTO, "TZName", &dbv)) {
				for (int j = 0; j < timezone_list.getCount(); ++j) {
					if(!_tcscmp(timezone_list[j].tcName, dbv.ptszVal)) {
						pa.timezone_list_index = timezone_list[j].list_index;
						break;
					}
				}
				DBFreeVariant(&dbv);
			} else
				pa.timezone_list_index = DBGetContactSettingDword(pa.hContact, PROTO, "TimezoneListIndex", -1);
			if(!DBGetContactSettingTString(pa.hContact, PROTO, "Nick", &dbv)) {
				_tcsncpy(pa.pszText, dbv.ptszVal, MAX_NAME_LENGTH);
				DBFreeVariant(&dbv);
			}

			listbox_items.insert(new LISTITEM(pa));
		}

		hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT,( WPARAM )hContact, 0 );
	}	
}
开发者ID:darkscout,项目名称:sje-miranda-plugins,代码行数:33,代码来源:timezone_list.cpp

示例10: GetProtoIndex

int GetProtoIndex(char * szName)
{
    DWORD i;
    char buf[11];
    char * name;
    DWORD pc;
    if (!szName) return -1;
    
    pc=DBGetContactSettingDword(NULL,"Protocols","ProtoCount",-1);
    for (i=0; i<pc; i++)
    {
        itoa(i,buf,10);
        name=DBGetString(NULL,"Protocols",buf);
        if (name)
        {
            if (!MyStrCmp(name,szName))
            {
                mir_free(name);
                return i;
            }
            mir_free(name);
        }
    }
    return -1;
}
开发者ID:BackupTheBerlios,项目名称:modernb-svn,代码行数:25,代码来源:contact.c

示例11: ContactMenuDefault

INT_PTR ContactMenuDefault(WPARAM wParam, LPARAM lParam) {
	HANDLE hSub = (HANDLE)wParam,
		hMeta = (HANDLE)DBGetContactSettingDword(hSub, MODULE, "Handle", 0);
	
	MetaAPI_SetDefaultContact((WPARAM)hMeta, (LPARAM)hSub);
	return 0;
}
开发者ID:darkscout,项目名称:sje-miranda-plugins,代码行数:7,代码来源:menu.cpp

示例12: TlenGetAvatarFileName

void TlenGetAvatarFileName(JABBER_LIST_ITEM *item, char* pszDest, int cbLen)
{
	int tPathLen;
	int format = PA_FORMAT_PNG;
	char* szFileType;
	if (item != NULL) {
		format = item->avatarFormat;
	} else if (jabberThreadInfo != NULL) {
		format = jabberThreadInfo->avatarFormat;
	} else {
		format = DBGetContactSettingDword(NULL, jabberProtoName, "AvatarFormat", PA_FORMAT_UNKNOWN);
	}
	CallService( MS_DB_GETPROFILEPATH, cbLen, (LPARAM) pszDest );
	tPathLen = strlen( pszDest );
	tPathLen += mir_snprintf( pszDest + tPathLen, cbLen - tPathLen, "\\%s\\", jabberModuleName  );
	CreateDirectoryA( pszDest, NULL );
	szFileType = "png";
	switch(format) {
		case PA_FORMAT_JPEG: szFileType = "jpg";   break;
		case PA_FORMAT_ICON: szFileType = "ico";   break;
		case PA_FORMAT_PNG:  szFileType = "png";   break;
		case PA_FORMAT_GIF:  szFileType = "gif";   break;
		case PA_FORMAT_BMP:  szFileType = "bmp";   break;
	}
	if ( item != NULL ) {
		char* hash;
		hash = JabberSha1(item->jid);
		mir_snprintf( pszDest + tPathLen, MAX_PATH - tPathLen, "%s.%s", hash, szFileType );
		mir_free( hash );
	} else {
		mir_snprintf( pszDest + tPathLen, MAX_PATH - tPathLen, "%s_avatar.%s", jabberProtoName, szFileType );
	}
}
开发者ID:BackupTheBerlios,项目名称:mtlen-svn,代码行数:33,代码来源:tlen_avatar.c

示例13: UpgradeCheck

void UpgradeCheck(void)
{
    DWORD dwVersion = DBGetContactSettingDword(NULL, "Chat", "OldVersion", PLUGIN_MAKE_VERSION(0,2,9,9));
    if (	pluginInfo.version > dwVersion)
    {
        if (dwVersion < PLUGIN_MAKE_VERSION(0,3,0,0))
        {
            DBDeleteContactSetting(NULL, "ChatFonts",	"Font18");
            DBDeleteContactSetting(NULL, "ChatFonts",	"Font18Col");
            DBDeleteContactSetting(NULL, "ChatFonts",	"Font18Set");
            DBDeleteContactSetting(NULL, "ChatFonts",	"Font18Size");
            DBDeleteContactSetting(NULL, "ChatFonts",	"Font18Sty");
            DBDeleteContactSetting(NULL, "ChatFonts",	"Font19");
            DBDeleteContactSetting(NULL, "ChatFonts",	"Font19Col");
            DBDeleteContactSetting(NULL, "ChatFonts",	"Font19Set");
            DBDeleteContactSetting(NULL, "ChatFonts",	"Font19Size");
            DBDeleteContactSetting(NULL, "ChatFonts",	"Font19Sty");
            DBDeleteContactSetting(NULL, "Chat",		"ColorNicklistLines");
            DBDeleteContactSetting(NULL, "Chat",		"NicklistIndent");
            DBDeleteContactSetting(NULL, "Chat",		"NicklistRowDist");
            DBDeleteContactSetting(NULL, "Chat",		"ShowFormatButtons");
            DBDeleteContactSetting(NULL, "Chat",		"ShowLines");
            DBDeleteContactSetting(NULL, "Chat",		"ShowName");
            DBDeleteContactSetting(NULL, "Chat",		"ShowTopButtons");
            DBDeleteContactSetting(NULL, "Chat",		"SplitterX");
            DBDeleteContactSetting(NULL, "Chat",		"SplitterY");
            DBDeleteContactSetting(NULL, "Chat",		"IconFlags");
            DBDeleteContactSetting(NULL, "Chat",		"LogIndentEnabled");
        }
    }

    DBWriteContactSettingDword(NULL, "Chat", "OldVersion", pluginInfo.version);
}
开发者ID:raoergsls,项目名称:miranda,代码行数:33,代码来源:main.c

示例14: Meta_GetActive

HANDLE Meta_GetActive(HANDLE hMeta) {
    HANDLE hActive = 0;
    if(DBGetContactSettingByte(hMeta, MODULE, "ForceDefault", 0))
        hActive = (HANDLE)MetaAPI_GetDefault((WPARAM)hMeta, 0);
    if(!hActive) {
        if((hActive = (HANDLE)DBGetContactSettingDword(hMeta, MODULE, "ForceSend", 0)) == 0) {
            if((hActive = (HANDLE)DBGetContactSettingDword(hMeta, MODULE, "TempDefault", 0)) == 0) {
                hActive = Meta_GetMostOnline(hMeta);
                if(ContactStatus(hActive, ContactProto(hActive)) == ID_STATUS_OFFLINE) {
                    hActive = Meta_GetMostOnlineSupporting(hMeta, PFLAGNUM_4, PF4_IMSENDOFFLINE);
                }
            }
        }
    }
    return hActive;
}
开发者ID:sje397,项目名称:sje-miranda-plugins,代码行数:16,代码来源:core_functions.cpp

示例15: _ExtFrames_GetFrameDBOption

static void _ExtFrames_GetFrameDBOption(EXTFRAMEWND * pExtFrm)
{
	//   Each known frame order per 1 000 000
    //	 Each Unknown frame but absent during saving per 10 000
	//   Each new unknown per 100 
	static DWORD NextUnknownOrder=100;		
	char szKey[100]={0};
	DWORD dwOrderInDB;
	if (!mir_strcmpi(pExtFrm->efrm.szFrameNameID,"My Contacts"))
		dwOrderInDB=0xFFFFFFFF;
	else
	{
		_snprintf(szKey,sizeof(szKey), EXTFRAMEORDERDBPREFIX "%s",pExtFrm->efrm.szFrameNameID);
		dwOrderInDB=DBGetContactSettingDword(NULL,EXTFRAMEMODULE,szKey,0);
		if (!dwOrderInDB)
		{
			dwOrderInDB=NextUnknownOrder;
			NextUnknownOrder+=100;
		}
		else
		    NextUnknownOrder = dwOrderInDB + 100;
	}
	pExtFrm->efrm.dwOrder=dwOrderInDB;
	
}
开发者ID:dineshkummarc,项目名称:miranda-im-v0.9.47-src,代码行数:25,代码来源:modern_ext_frames_intern.c


注:本文中的DBGetContactSettingDword函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。