• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ db_get_dw函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: SkinOptionList_Update

bool SkinOptionList_Update(OPTTREE_OPTION* &options, int *OptionsCount, HWND hwndDlg) {
	if (options) {
		int index = -1;
		OptTree_ProcessMessage(hwndDlg, WM_DESTROY, 0, 0, &index, IDC_SKIN_LIST_OPT, options, *OptionsCount);
		for (int i = 0; i < *OptionsCount; ++i) {
			mir_free(options[i].pszOptionName);
			mir_free(options[i].pszSettingName);
		}
		mir_free(options);
		options = NULL;
		*OptionsCount = 0;
	}
	// add "Global options"
	DWORD dwGlobalOptions = 0;
	int pos = SkinOptionList_AddMain(options, OptionsCount, 0, &dwGlobalOptions);
	// add "Skin options"
	DWORD dwSkinOptions = 0;
	pos = SkinOptionList_AddSkin(options, OptionsCount, pos, &dwSkinOptions);
	// generate treeview
	int index = -1;
	OptTree_ProcessMessage(hwndDlg, WM_INITDIALOG, 0, 0, &index, IDC_SKIN_LIST_OPT, options, *OptionsCount);

	// check "Skin options" state 
	char prefix[128];
	mir_snprintf(prefix, "skin.%S", PopupOptions.SkinPack);
	OptTree_SetOptions(hwndDlg, IDC_SKIN_LIST_OPT, options, *OptionsCount,
		db_get_dw(NULL, MODULNAME, prefix, dwSkinOptions), _T("Skin options"));

	// check "Global Settings"
	OptTree_SetOptions(hwndDlg, IDC_SKIN_LIST_OPT, options, *OptionsCount,
		dwGlobalOptions, _T("Global settings"));

	return true;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:34,代码来源:opt_skins.cpp


示例2: mir_snprintf

DWORD CMraProto::MraAvatarsQueueInitialize(HANDLE *phAvatarsQueueHandle)
{
	mir_snprintf(szAvtSectName, SIZEOF(szAvtSectName), "%s Avatars", m_szModuleName);

	if (phAvatarsQueueHandle == NULL)
		return ERROR_INVALID_HANDLE;

	MRA_AVATARS_QUEUE *pmraaqAvatarsQueue = new MRA_AVATARS_QUEUE();

	char szBuffer[MAX_PATH];
	mir_snprintf(szBuffer, SIZEOF(szBuffer), "%s %s", m_szModuleName, Translate("Avatars' plugin connections"));

	NETLIBUSER nlu = { sizeof(nlu) };
	nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS;
	nlu.szSettingsModule = MRA_AVT_SECT_NAME;
	nlu.szDescriptiveName = szBuffer;
	pmraaqAvatarsQueue->hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
	if (pmraaqAvatarsQueue->hNetlibUser) {
		InterlockedExchange((volatile LONG*)&pmraaqAvatarsQueue->bIsRunning, TRUE);
		pmraaqAvatarsQueue->hThreadEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
		pmraaqAvatarsQueue->iThreadsCount = db_get_dw(NULL, MRA_AVT_SECT_NAME, "WorkThreadsCount", MRA_AVT_DEFAULT_WRK_THREAD_COUNTS);
		if (pmraaqAvatarsQueue->iThreadsCount == 0)
			pmraaqAvatarsQueue->iThreadsCount = 1;
		if (pmraaqAvatarsQueue->iThreadsCount > MAXIMUM_WAIT_OBJECTS)
			pmraaqAvatarsQueue->iThreadsCount = MAXIMUM_WAIT_OBJECTS;
		for (int i = 0; i < pmraaqAvatarsQueue->iThreadsCount; i++)
			pmraaqAvatarsQueue->hThread[i] = ForkThreadEx(&CMraProto::MraAvatarsThreadProc, pmraaqAvatarsQueue, 0);

		*phAvatarsQueueHandle = (HANDLE)pmraaqAvatarsQueue;
	}

	return NO_ERROR;
}
开发者ID:martok,项目名称:miranda-ng,代码行数:33,代码来源:MraAvatars.cpp


示例3: TimerProc

VOID CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD)
{
	time_t t = time(NULL);
	time_t diff = t - (time_t)db_get_dw(0, "AutoBackups", "LastBackupTimestamp", 0);
	if (diff > (time_t)(options.period * (options.period_type == PT_MINUTES ? 60 : (options.period_type == PT_HOURS ? (60 * 60) : (60 * 60 * 24)))))
		BackupStart(NULL);
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:7,代码来源:backup.cpp


示例4: fnGetFontSetting

void fnGetFontSetting(int i, LOGFONT* lf, COLORREF* colour)
{
	DBVARIANT dbv;
	char idstr[20];
	BYTE style;

	cli.pfnGetDefaultFontSetting(i, lf, colour);
	mir_snprintf(idstr, SIZEOF(idstr), "Font%dName", i);
	if (!db_get_ts(NULL, "CLC", idstr, &dbv)) {
		lstrcpy(lf->lfFaceName, dbv.ptszVal);
		mir_free(dbv.pszVal);
	}
	mir_snprintf(idstr, SIZEOF(idstr), "Font%dCol", i);
	*colour = db_get_dw(NULL, "CLC", idstr, *colour);
	mir_snprintf(idstr, SIZEOF(idstr), "Font%dSize", i);
	lf->lfHeight = (char) db_get_b(NULL, "CLC", idstr, lf->lfHeight);
	mir_snprintf(idstr, SIZEOF(idstr), "Font%dSty", i);
	style = (BYTE) db_get_b(NULL, "CLC", idstr, (lf->lfWeight == FW_NORMAL ? 0 : DBFONTF_BOLD) | (lf->lfItalic ? DBFONTF_ITALIC : 0) | (lf->lfUnderline ? DBFONTF_UNDERLINE : 0));
	lf->lfWidth = lf->lfEscapement = lf->lfOrientation = 0;
	lf->lfWeight = style & DBFONTF_BOLD ? FW_BOLD : FW_NORMAL;
	lf->lfItalic = (style & DBFONTF_ITALIC) != 0;
	lf->lfUnderline = (style & DBFONTF_UNDERLINE) != 0;
	lf->lfStrikeOut = 0;
	mir_snprintf(idstr, SIZEOF(idstr), "Font%dSet", i);
	lf->lfCharSet = db_get_b(NULL, "CLC", idstr, lf->lfCharSet);
	lf->lfOutPrecision = OUT_DEFAULT_PRECIS;
	lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
	lf->lfQuality = DEFAULT_QUALITY;
	lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:30,代码来源:clcutils.cpp


示例5: MetaAPI_GetDefault

//gets the handle for the default contact
//wParam=(HANDLE)hMetaContact
//lParam=0
//returns a handle to the default contact, or null on failure
INT_PTR MetaAPI_GetDefault(WPARAM wParam, LPARAM lParam) {
	DWORD default_contact_number = db_get_dw((HANDLE)wParam, META_PROTO, "Default", -1);
	if (default_contact_number != -1) {
		return (INT_PTR)Meta_GetContactHandle((HANDLE)wParam, default_contact_number);
	}
	return 0;
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:11,代码来源:meta_api.cpp


示例6: ReportSendQueueTimeouts

void ReportSendQueueTimeouts(HWND hwndSender)
{
	MessageSendQueueItem *item, *item2;
	int timeout = db_get_dw(NULL, SRMMMOD, SRMSGSET_MSGTIMEOUT, SRMSGDEFSET_MSGTIMEOUT);

	mir_cslock lock(queueMutex);

	for (item = global_sendQueue; item != NULL; item = item2) {
		item2 = item->next;
		if (item->timeout < timeout) {
			item->timeout += 1000;
			if (item->timeout >= timeout) {
				if (item->hwndSender == hwndSender && item->hwndErrorDlg == NULL) {
					if (hwndSender != NULL) {
						ErrorWindowData *ewd = (ErrorWindowData *) mir_alloc(sizeof(ErrorWindowData));
						ewd->szName = GetNickname(item->hContact, item->proto);
						ewd->szDescription = mir_tstrdup(TranslateT("The message send timed out."));
						ewd->szText = GetSendBufferMsg(item);
						ewd->hwndParent = hwndSender;
						ewd->queueItem = item;
						PostMessage(hwndSender, DM_SHOWERRORMESSAGE, 0, (LPARAM)ewd);
					} else {
						/* TODO: Handle errors outside messaging window in a better way */
						RemoveSendQueueItem(item);
					}
				}
			}
		}
	}
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:30,代码来源:sendqueue.cpp


示例7: CreateBackgroundBrush

static void CreateBackgroundBrush()
{
	bkColor = db_get_dw(NULL, MODULE, "BkColor", FLT_DEFAULT_BKGNDCOLOR);

	if (NULL != hLTEdgesPen) {
		DeleteObject(hLTEdgesPen);
		hLTEdgesPen = NULL;
	}

	if (NULL != hRBEdgesPen) {
		DeleteObject(hRBEdgesPen);
		hRBEdgesPen = NULL;
	}

	if (NULL != hBmpBackground) {
		DeleteObject(hBmpBackground);
		hBmpBackground = NULL;
	}

	if (NULL != hBkBrush) {
		SetClassLong((HWND)WND_CLASS, GCLP_HBRBACKGROUND, (LONG)NULL);
		DeleteObject( hBkBrush );
		hBkBrush = NULL;
	}

	if ( db_get_b(NULL, MODULE, "DrawBorder", FLT_DEFAULT_DRAWBORDER)) {
		COLORREF cr = (COLORREF)db_get_dw(NULL, MODULE, "LTEdgesColor", FLT_DEFAULT_LTEDGESCOLOR);
		hLTEdgesPen = CreatePen(PS_SOLID, 1, cr);
		cr = (COLORREF)db_get_dw(NULL, MODULE, "RBEdgesColor", FLT_DEFAULT_RBEDGESCOLOR);
		hRBEdgesPen = CreatePen(PS_SOLID, 1, cr);
	}
	
	if (db_get_b(NULL, MODULE, "BkUseBitmap", FLT_DEFAULT_BKGNDUSEBITMAP)) {
		DBVARIANT dbv;
		if ( !db_get_ts(NULL, MODULE, "BkBitmap", &dbv)) {
			hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAPT, 0, (LPARAM)dbv.ptszVal);
			db_free(&dbv);
		}
	}
	nBackgroundBmpUse = (WORD)db_get_w(NULL, MODULE, "BkBitmapOpt", FLT_DEFAULT_BKGNDBITMAPOPT);

	// Create brush
	hBkBrush	 = CreateSolidBrush(bkColor);

	// Attach brush to the window
	SetClassLong((HWND)WND_CLASS, GCLP_HBRBACKGROUND, (LONG)hBkBrush);
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:47,代码来源:main.cpp


示例8: mir_snprintf

int ThreadData::sendMessage(int msgType, const char* email, int netId, const char* parMsg, int parFlags)
{
	char buf[2048];
	int off;

	off = mir_snprintf(buf, sizeof(buf), "MIME-Version: 1.0\r\n");

	if ((parFlags & MSG_DISABLE_HDR) == 0) {
		char  tFontName[100], tFontStyle[3];
		DWORD tFontColor;

		strcpy(tFontName, "Arial");

		if (proto->getByte("SendFontInfo", 1)) {
			char* p;

			DBVARIANT dbv;
			if (!db_get_s(NULL, "SRMsg", "Font0", &dbv)) {
				for (p = dbv.pszVal; *p; p++)
					if (BYTE(*p) >= 128 || *p < 32)
						break;

				if (*p == 0) {
					strncpy_s(tFontName, sizeof(tFontName), ptrA(mir_urlEncode(dbv.pszVal)), _TRUNCATE);
					db_free(&dbv);
				}
			}

			int  tStyle = db_get_b(NULL, "SRMsg", "Font0Sty", 0);
			p = tFontStyle;
			if (tStyle & 1) *p++ = 'B';
			if (tStyle & 2) *p++ = 'I';
			*p = 0;

			tFontColor = db_get_dw(NULL, "SRMsg", "Font0Col", 0);
		}
		else {
			tFontColor = 0;
			tFontStyle[0] = 0;
		}

		if (parFlags & MSG_OFFLINE)
			off += mir_snprintf(buf + off, sizeof(buf) - off, "Dest-Agent: client\r\n");

		off += mir_snprintf(buf + off, sizeof(buf) - off, "Content-Type: text/plain; charset=UTF-8\r\n");
		off += mir_snprintf(buf + off, sizeof(buf) - off, "X-MMS-IM-Format: FN=%s; EF=%s; CO=%x; CS=0; PF=31%s\r\n\r\n",
			tFontName, tFontStyle, tFontColor, (parFlags & MSG_RTL) ? ";RL=1" : "");
	}

	int seq;
	if (netId == NETID_YAHOO || netId == NETID_MOB || (parFlags & MSG_OFFLINE))
		seq = sendPacket("UUM", "%s %d %c %d\r\n%s%s", email, netId, msgType,
		strlen(parMsg)+off, buf, parMsg);
	else
		seq = sendPacket("MSG", "%c %d\r\n%s%s", msgType,
		strlen(parMsg)+off, buf, parMsg);

	return seq;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:59,代码来源:msn_misc.cpp


示例9: db_get_dw

DWORD CSkinnedProfile::SpiGetSkinDword( HANDLE hContact, const char * szSection, const char * szKey, const DWORD defValue )
{
	if ( hContact ) 
		return db_get_dw( hContact, szSection, szKey, defValue ); //per-contact settings are not skinnablr at all

	CAutoCriticalSection Lock( SkinProfile()->_Lock, true );

	ValueVariant* value = SkinProfile()->_GetValue( szSection, szKey );

	if ( value == NULL ) // not skinned => return DB
		return db_get_dw( hContact, szSection, szKey, defValue );
	
	else if ( !value->IsEmpty() ) 
		return value->GetDword();	
	
	return defValue; // skinned but empty => return default value
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:17,代码来源:modern_skinned_profile.cpp


示例10: CreateBackgroundBrush

static void CreateBackgroundBrush()
{
	bkColor = db_get_dw(NULL, MODULE, "BkColor", FLT_DEFAULT_BKGNDCOLOR);

	if (NULL != hLTEdgesPen) {
		DeleteObject(hLTEdgesPen);
		hLTEdgesPen = NULL;
	}

	if (NULL != hRBEdgesPen) {
		DeleteObject(hRBEdgesPen);
		hRBEdgesPen = NULL;
	}

	if (NULL != hBmpBackground) {
		DeleteObject(hBmpBackground);
		hBmpBackground = NULL;
	}

	if (NULL != hBkBrush) {
		SetClassLong((HWND)WND_CLASS, GCLP_HBRBACKGROUND, (LONG)NULL);
		DeleteObject(hBkBrush);
		hBkBrush = NULL;
	}

	if (db_get_b(NULL, MODULE, "DrawBorder", FLT_DEFAULT_DRAWBORDER)) {
		COLORREF cr = (COLORREF)db_get_dw(NULL, MODULE, "LTEdgesColor", FLT_DEFAULT_LTEDGESCOLOR);
		hLTEdgesPen = CreatePen(PS_SOLID, 1, cr);
		cr = (COLORREF)db_get_dw(NULL, MODULE, "RBEdgesColor", FLT_DEFAULT_RBEDGESCOLOR);
		hRBEdgesPen = CreatePen(PS_SOLID, 1, cr);
	}

	if (db_get_b(NULL, MODULE, "BkUseBitmap", FLT_DEFAULT_BKGNDUSEBITMAP)) {
		ptrT tszBitmapName(db_get_tsa(NULL, MODULE, "BkBitmap"));
		if (tszBitmapName != NULL)
			hBmpBackground = Bitmap_Load(tszBitmapName);
	}
	nBackgroundBmpUse = (WORD)db_get_w(NULL, MODULE, "BkBitmapOpt", FLT_DEFAULT_BKGNDBITMAPOPT);

	// Create brush
	hBkBrush = CreateSolidBrush(bkColor);

	// Attach brush to the window
	SetClassLongPtr((HWND)WND_CLASS, GCLP_HBRBACKGROUND, (LONG_PTR)hBkBrush);
}
开发者ID:truefriend-cz,项目名称:miranda-ng,代码行数:45,代码来源:main.cpp


示例11: UpdateTimers

int UpdateTimers()
{
	KillTimers();
	int interval;
	interval = db_get_dw(NULL, ModuleName, "Interval", DEFAULT_INTERVAL);
	interval *= 1000; //go from miliseconds to seconds
	hCheckTimer = SetTimer(NULL, 0, interval, (TIMERPROC) OnCheckTimer);
	
	int bReconnect = db_get_b(NULL, ModuleName, "Reconnect", 0);
	if (bReconnect) //user wants to forcefully reconnect every x minutes
		{
			interval = db_get_dw(NULL, ModuleName, "ReconnectInterval", DEFAULT_RECONNECT_INTERVAL);
			interval *= 1000 * 60; //go from miliseconds to seconds to minutes
			hReconnectTimer = SetTimer(NULL, 0, interval, (TIMERPROC) OnReconnectTimer);
		}
	
	return 0;
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:18,代码来源:hooked_events.cpp


示例12: timerProc

// main auto-update timer
VOID CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
{
	// only run if it is not current updating and the auto update option is enabled
	if (!ThreadRunning && !Miranda_Terminated()) {
		BOOL HaveUpdates = FALSE;
		for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
			if (db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME)) {
				double diff = difftime(time(NULL), db_get_dw(hContact, MODULE, "LastCheck", 0));
				if (db_get_b(NULL, MODULE, "AutoUpdate", 1) != 0 && diff >= db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME) * 60) {
					UpdateListAdd(hContact);
					HaveUpdates = TRUE;
				}
			}
		}
		if (!ThreadRunning && HaveUpdates)
			mir_forkthread(UpdateThreadProc, (LPVOID)FALSE);
	}
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:19,代码来源:Update.cpp


示例13: CheckDate

int CheckDate(MCONTACT hContact)
{
	time_t curtime = time (NULL);
	if(!db_get_b(hContact,modname,"GiveUpDays",0))
		return 1;
	if(db_get_b(hContact,modname,"GiveUpDays",0) && ( abs((time_t)db_get_dw(hContact,modname,"GiveUpDate",0)) > curtime))
		return 1;
	return 0;
}
开发者ID:truefriend-cz,项目名称:miranda-ng,代码行数:9,代码来源:main.cpp


示例14: AddContactToGroup

ClcContact* AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact)
{
	ClcContact *p = coreCli.pfnAddContactToGroup(dat, group, hContact);

	p->wStatus = db_get_w(hContact, p->proto, "Status", ID_STATUS_OFFLINE);
	p->xStatus = db_get_b(hContact, p->proto, "XStatusId", 0);

	if (p->proto)
		p->bIsMeta = !mir_strcmp(p->proto, META_PROTO);
	else
		p->bIsMeta = FALSE;
	if (p->bIsMeta && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
		p->hSubContact = db_mc_getMostOnline(hContact);
		p->metaProto = GetContactProto(p->hSubContact);
		p->iImage = pcli->pfnGetContactIcon(p->hSubContact);
	}
	else {
		p->iImage = pcli->pfnGetContactIcon(hContact);
		p->metaProto = NULL;
	}

	p->codePage = db_get_dw(hContact, "Tab_SRMsg", "ANSIcodepage", db_get_dw(hContact, "UserInfo", "ANSIcodepage", CP_ACP));
	p->bSecondLine = db_get_b(hContact, "CList", "CLN_2ndline", cfg::dat.dualRowMode);

	if (dat->bisEmbedded)
		p->pExtra = 0;
	else {
		p->pExtra = cfg::getCache(p->hContact, p->proto);
		GetExtendedInfo(p, dat);
		if (p->pExtra)
			p->pExtra->proto_status_item = GetProtocolStatusItem(p->bIsMeta ? p->metaProto : p->proto);

		LoadAvatarForContact(p);
		// notify other plugins to re-supply their extra images (icq for xstatus, mBirthday etc...)
		pcli->pfnSetAllExtraIcons(hContact);
	}

	RTL_DetectAndSet(p, p->hContact);

	p->avatarLeft = p->extraIconRightBegin = -1;
	p->flags |= db_get_b(p->hContact, "CList", "Priority", 0) ? CONTACTF_PRIORITY : 0;

	return p;
}
开发者ID:ybznek,项目名称:miranda-ng,代码行数:44,代码来源:clcitems.cpp


示例15: LoadStatusBarData

int LoadStatusBarData()
{
	g_StatusBarData.perProtoConfig = db_get_b(NULL, "CLUI", "SBarPerProto", SETTING_SBARPERPROTO_DEFAULT);
	g_StatusBarData.bShowProtoIcon = (db_get_b(NULL, "CLUI", "SBarShow", SETTING_SBARSHOW_DEFAULT) & 1) != 0;
	g_StatusBarData.bShowProtoName = (db_get_b(NULL, "CLUI", "SBarShow", SETTING_SBARSHOW_DEFAULT) & 2) != 0;
	g_StatusBarData.bShowStatusName = (db_get_b(NULL, "CLUI", "SBarShow", SETTING_SBARSHOW_DEFAULT) & 4) != 0;
	g_StatusBarData.xStatusMode = db_get_b(NULL, "CLUI", "ShowXStatus", SETTING_SHOWXSTATUS_DEFAULT);
	g_StatusBarData.bConnectingIcon = db_get_b(NULL, "CLUI", "UseConnectingIcon", SETTING_USECONNECTINGICON_DEFAULT) != 0;
	g_StatusBarData.bShowProtoEmails = db_get_b(NULL, "CLUI", "ShowUnreadEmails", SETTING_SHOWUNREADEMAILS_DEFAULT) != 0;
	g_StatusBarData.SBarRightClk = db_get_b(NULL, "CLUI", "SBarRightClk", SETTING_SBARRIGHTCLK_DEFAULT);

	g_StatusBarData.nProtosPerLine = db_get_b(NULL, "CLUI", "StatusBarProtosPerLine", SETTING_PROTOSPERLINE_DEFAULT);
	g_StatusBarData.Align = db_get_b(NULL, "CLUI", "Align", SETTING_ALIGN_DEFAULT);
	g_StatusBarData.VAlign = db_get_b(NULL, "CLUI", "VAlign", SETTING_VALIGN_DEFAULT);
	g_StatusBarData.sameWidth = db_get_b(NULL, "CLUI", "EqualSections", SETTING_EQUALSECTIONS_DEFAULT);
	g_StatusBarData.rectBorders.left = db_get_dw(NULL, "CLUI", "LeftOffset", SETTING_LEFTOFFSET_DEFAULT);
	g_StatusBarData.rectBorders.right = db_get_dw(NULL, "CLUI", "RightOffset", SETTING_RIGHTOFFSET_DEFAULT);
	g_StatusBarData.rectBorders.top = db_get_dw(NULL, "CLUI", "TopOffset", SETTING_TOPOFFSET_DEFAULT);
	g_StatusBarData.rectBorders.bottom = db_get_dw(NULL, "CLUI", "BottomOffset", SETTING_BOTTOMOFFSET_DEFAULT);
	g_StatusBarData.extraspace = (BYTE)db_get_dw(NULL, "CLUI", "SpaceBetween", SETTING_SPACEBETWEEN_DEFAULT);

	if (g_StatusBarData.BarFont) {
		DeleteObject(g_StatusBarData.BarFont);
		g_StatusBarData.BarFont = NULL;
	}

	int vis = db_get_b(NULL, "CLUI", "ShowSBar", SETTING_SHOWSBAR_DEFAULT);
	int frameID = Sync(FindFrameID, hModernStatusBar);
	int frameopt = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, frameID), 0);
	frameopt = frameopt & (~F_VISIBLE);
	if (vis) {
		ShowWindow(hModernStatusBar, SW_SHOW);
		frameopt |= F_VISIBLE;
	}
	else ShowWindow(hModernStatusBar, SW_HIDE);
	CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, frameID), frameopt);

	g_StatusBarData.TextEffectID = db_get_b(NULL, "StatusBar", "TextEffectID", SETTING_TEXTEFFECTID_DEFAULT);
	g_StatusBarData.TextEffectColor1 = db_get_dw(NULL, "StatusBar", "TextEffectColor1", SETTING_TEXTEFFECTCOLOR1_DEFAULT);
	g_StatusBarData.TextEffectColor2 = db_get_dw(NULL, "StatusBar", "TextEffectColor2", SETTING_TEXTEFFECTCOLOR2_DEFAULT);

	if (g_StatusBarData.hBmpBackground) { DeleteObject(g_StatusBarData.hBmpBackground); g_StatusBarData.hBmpBackground = NULL; }

	if (g_CluiData.fDisableSkinEngine) {
		DBVARIANT dbv;
		g_StatusBarData.bkColour = sttGetColor("StatusBar", "BkColour", CLCDEFAULT_BKCOLOUR);
		if (db_get_b(NULL, "StatusBar", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
			if (!db_get_s(NULL, "StatusBar", "BkBitmap", &dbv)) {
				g_StatusBarData.hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)dbv.pszVal);
				db_free(&dbv);
			}
		}
		g_StatusBarData.bkUseWinColors = db_get_b(NULL, "StatusBar", "UseWinColours", CLCDEFAULT_USEWINDOWSCOLOURS);
		g_StatusBarData.backgroundBmpUse = db_get_w(NULL, "StatusBar", "BkBmpUse", CLCDEFAULT_BKBMPUSE);
	}
	
	SendMessage(pcli->hwndContactList, WM_SIZE, 0, 0);
	return 1;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:59,代码来源:modern_statusbar.cpp


示例16: popupWatchedVar

void popupWatchedVar(MCONTACT hContact,const char* module,const char* setting)
{
	HICON hIcon = LoadIcon(hInst, MAKEINTRESOURCE(ICO_REGEDIT));
	char lpzContactName[MAX_CONTACTNAME];
	char lpzText[MAX_SECONDLINE];
	COLORREF colorBack = db_get_dw(NULL,modname,"PopupColour",RGB(255,0,0));
	COLORREF colorText = RGB(0,0,0);
	int timeout = db_get_b(NULL,modname,"PopupDelay",3);

	if (hContact) {
		// contacts nick
		char szProto[256];
		if (GetValue(hContact,"Protocol","p",szProto,SIZEOF(szProto)))
			mir_snprintf(lpzContactName, MAX_SECONDLINE, "%s (%s)", (char*)GetContactName(hContact, szProto, 0), szProto);
		else
			mir_snprintf(lpzContactName, MAX_SECONDLINE, nick_unknown);
	}
	else strcpy(lpzContactName,Translate("Settings"));

	// 2nd line
	DBVARIANT dbv;
	if ( GetSetting(hContact, module, setting, &dbv))
		return;

	switch (dbv.type) {
	case DBVT_BYTE:
		mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value: (BYTE) %d"), module, setting, dbv.bVal);
		break;
	case DBVT_WORD:
		mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value: (WORD) %d"), module, setting, dbv.wVal);
		break;
	case DBVT_DWORD:
		mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value: (DWORD) 0x%X"), module, setting, dbv.dVal);
		break;
	case DBVT_ASCIIZ:
		mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value: \"%s\""), module, setting, dbv.pszVal);
		break;
	case DBVT_UTF8:
		mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value (UTF8): \"%s\""), module, setting, dbv.pszVal);
		break;
	default:
		return;
	}

	db_free(&dbv);

	POPUPDATA ppd = { 0 };
	ppd.lchContact = (MCONTACT)hContact;
	ppd.lchIcon = hIcon;
	lstrcpyn(ppd.lpzContactName, lpzContactName,MAX_CONTACTNAME);
	lstrcpyn(ppd.lpzText, lpzText,MAX_SECONDLINE);
	ppd.colorBack = colorBack;
	ppd.colorText = colorText;
	ppd.iSeconds = timeout ? timeout : -1;
	PUAddPopup(&ppd);
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:56,代码来源:watchedvars.cpp


示例17: sttGetColourWorker

static INT_PTR sttGetColourWorker(ColourIDW* colour_id)
{
	for (int i=0; i < colour_id_list.getCount(); i++) {
		ColourInternal& C = colour_id_list[i];
		if (!_tcscmp(C.group, colour_id->group) && !_tcscmp(C.name, colour_id->name))
			return db_get_dw(NULL, C.dbSettingsGroup, C.setting, GetColorFromDefault(C.defcolour));
	}

	return -1;
}
开发者ID:martok,项目名称:miranda-ng,代码行数:10,代码来源:services.cpp


示例18: contactCheckProtocol

BOOL contactCheckProtocol(char *szProto, MCONTACT hContact, WORD eventType)
{
	if (bMetaProtoEnabled && hContact) {
		MCONTACT hMetaContact = (MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
		if (hMetaContact && db_mc_getMeta(hContact) == hMetaContact)
			return FALSE;
	}

	return (metaCheckProtocol(szProto, hContact, eventType));
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:10,代码来源:main.cpp


示例19: StartUpdate

void StartUpdate(void *dummy)
{
	StartUpDelay = 1;
	Sleep(((db_get_dw(NULL, MODULENAME, START_DELAY_KEY, 0)) * SECOND));

	for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
		GetData((void*)hContact);

	StartUpDelay = 0;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:10,代码来源:webview.cpp


示例20: HasUnread

bool HasUnread(MCONTACT hContact)
{
	const char *szProto = GetContactProto(hContact);
	if (CheckProtoSupport(szProto))
	{
		return ((GetLastSentMessageTime(hContact) > db_get_dw(hContact, MODULENAME, DBKEY_MESSAGE_READ_TIME, 0)) && db_get_dw(hContact, MODULENAME, DBKEY_MESSAGE_READ_TIME, 0) != 0);
	}

	return false;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:10,代码来源:utils.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ db_get_string函数代码示例发布时间:2022-05-30
下一篇:
C++ db_get函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap