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


C++ TranslateTS函数代码示例

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


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

示例1: testString

SmileyLookup::SmileyLookup(const CMString& str, const bool regexs, const int ind, const CMString& smpt)
{
	TCHAR msgtxt[1024];

	m_ind = ind;
	if (regexs) {
		static const CMString testString(_T("Test String"));
		m_pattern = _TPattern::compile(str);
		m_valid = m_pattern != NULL;
		if (m_valid) {
			_TMatcher* matcher = m_pattern->createTMatcher(testString);
			m_valid &= (!matcher->findFirstMatch() ||
				matcher->getStartingIndex() != matcher->getEndingIndex());
			if (!m_valid) {
				static const TCHAR errmsg[] = LPGENT("Regular expression \"%s\" in smiley pack \"%s\" could produce \"empty matches\".");
				mir_sntprintf(msgtxt, TranslateTS(errmsg), str.c_str(), smpt.c_str());
			}
			delete matcher;
		}
		else {
			static const TCHAR errmsg[] = LPGENT("Regular expression \"%s\" in smiley pack \"%s\" malformed.");
			mir_sntprintf(msgtxt, TranslateTS(errmsg), str.c_str(), smpt.c_str());
		}

		if (!m_valid)
			CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, _T2A(msgtxt));
	}
	else {
		m_text = str;
		m_pattern = NULL;
		m_valid = !str.IsEmpty();
	}
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:33,代码来源:smileys.cpp

示例2: parse_quote

bool parse_quote(const IXMLNode::TXMLNodePtr& pTop, CQuotesProviderBase::CQuote& q)
{
	tstring sSymbol;
	tstring sDescription;
	tstring sID;

	size_t cChild = pTop->GetChildCount();
	for (size_t i = 0; i < cChild; ++i) {
		IXMLNode::TXMLNodePtr pNode = pTop->GetChildNode(i);
		tstring sName = pNode->GetName();
		if (0 == mir_tstrcmpi(_T("symbol"), sName.c_str())) {
			sSymbol = pNode->GetText();
			if (true == sSymbol.empty())
				return false;
		}
		else if (0 == mir_tstrcmpi(_T("description"), sName.c_str())) {
			sDescription = pNode->GetText();
		}
		else if (0 == mir_tstrcmpi(_T("id"), sName.c_str())) {
			sID = pNode->GetText();
			if (true == sID.empty())
				return false;
		}
	}

	q = CQuotesProviderBase::CQuote(sID, TranslateTS(sSymbol.c_str()), TranslateTS(sDescription.c_str()));
	return true;
}
开发者ID:wyrover,项目名称:miranda-ng,代码行数:28,代码来源:QuotesProviderBase.cpp

示例3: fnGetStatusModeDescription

TCHAR* fnGetStatusModeDescription(int mode, int flags)
{
	static TCHAR szMode[64];
	TCHAR* descr;
	int    noPrefixReqd = 0;
	switch (mode) {
	case ID_STATUS_OFFLINE:
		descr = LPGENT("Offline");
		noPrefixReqd = 1;
		break;
	case ID_STATUS_CONNECTING:
		descr = LPGENT("Connecting");
		noPrefixReqd = 1;
		break;
	case ID_STATUS_ONLINE:
		descr = LPGENT("Online");
		noPrefixReqd = 1;
		break;
	case ID_STATUS_AWAY:
		descr = LPGENT("Away");
		break;
	case ID_STATUS_DND:
		descr = LPGENT("Do not disturb");
		break;
	case ID_STATUS_NA:
		descr = LPGENT("Not available");
		break;
	case ID_STATUS_OCCUPIED:
		descr = LPGENT("Occupied");
		break;
	case ID_STATUS_FREECHAT:
		descr = LPGENT("Free for chat");
		break;
	case ID_STATUS_INVISIBLE:
		descr = LPGENT("Invisible");
		break;
	case ID_STATUS_OUTTOLUNCH:
		descr = LPGENT("Out to lunch");
		break;
	case ID_STATUS_ONTHEPHONE:
		descr = LPGENT("On the phone");
		break;
	case ID_STATUS_IDLE:
		descr = LPGENT("Idle");
		break;
	default:
		if (IsStatusConnecting(mode)) {
			const TCHAR* connFmt = LPGENT("Connecting (attempt %d)");
			mir_sntprintf(szMode, (flags & GSMDF_UNTRANSLATED) ? connFmt : TranslateTS(connFmt), mode - ID_STATUS_CONNECTING + 1);
			return szMode;
		}
		return NULL;
	}

	return (flags & GSMDF_UNTRANSLATED) ? descr : TranslateTS(descr);
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:56,代码来源:clistmod.cpp

示例4: SetFtStatus

static void SetFtStatus(HWND hwndDlg, TCHAR *text, int mode)
{
	SetDlgItemText(hwndDlg, IDC_STATUS, TranslateTS(text));
	SetDlgItemText(hwndDlg, IDC_TRANSFERCOMPLETED, TranslateTS(text));

	ShowWindow(GetDlgItem(hwndDlg, IDC_STATUS), (mode == FTS_TEXT) ? SW_SHOW : SW_HIDE);
	ShowWindow(GetDlgItem(hwndDlg, IDC_ALLFILESPROGRESS), (mode == FTS_PROGRESS) ? SW_SHOW : SW_HIDE);
	ShowWindow(GetDlgItem(hwndDlg, IDC_TRANSFERCOMPLETED), (mode == FTS_OPEN) ? SW_SHOW : SW_HIDE);
	ShowWindow(GetDlgItem(hwndDlg, IDC_FILEICON), (mode == FTS_OPEN) ? SW_SHOW : SW_HIDE);
}
开发者ID:gloria8023,项目名称:miranda-ng,代码行数:10,代码来源:filexferdlg.cpp

示例5: ShowBalloon

static void ShowBalloon(TCHAR *title, TCHAR *msg, int icon)
{
	MIRANDASYSTRAYNOTIFY msn = {0};
	msn.cbSize = sizeof(MIRANDASYSTRAYNOTIFY);
	msn.dwInfoFlags = icon | NIIF_INTERN_UNICODE;
	msn.tszInfo = TranslateTS(msg);
	msn.tszInfoTitle = TranslateTS(title);
	msn.uTimeout = 5000;
	pcli->pfnCListTrayNotify(&msn);
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:10,代码来源:cflash.cpp

示例6: moveProfileDirProfiles

// move profile from profile subdir
static void moveProfileDirProfiles(TCHAR * profiledir, BOOL isRootDir = TRUE)
{
	TCHAR pfd[MAX_PATH];
	if (isRootDir) {
		TCHAR *path = Utils_ReplaceVarsT(_T("%miranda_path%\\*.dat"));
		mir_sntprintf(pfd, SIZEOF(pfd), _T("%s"), path);
		mir_free(path);
	}
	else
		mir_sntprintf(pfd, SIZEOF(pfd), _T("%s\\*.dat"), profiledir);

	WIN32_FIND_DATA ffd;
	HANDLE hFind = FindFirstFile(pfd, &ffd);
	if (hFind != INVALID_HANDLE_VALUE)
	{
		TCHAR *c =_tcsrchr(pfd, '\\'); if (c) *c = 0;
		do
		{
			TCHAR path[MAX_PATH], path2[MAX_PATH];
			TCHAR* profile = mir_tstrdup(ffd.cFileName);
			TCHAR *c =_tcsrchr(profile, '.'); if (c) *c = 0;
			mir_sntprintf(path, SIZEOF(path), _T("%s\\%s"), pfd, ffd.cFileName);
			mir_sntprintf(path2, SIZEOF(path2), _T("%s\\%s"), profiledir, profile);
			CreateDirectoryTreeT(path2);
			mir_sntprintf(path2, SIZEOF(path2), _T("%s\\%s\\%s"), profiledir, profile, ffd.cFileName);
			if (_taccess(path2, 0) == 0)
			{
				const TCHAR tszMoveMsg[] =
					_T("Miranda is trying upgrade your profile structure.\n")
					_T("It cannot move profile %s to the new location %s\n")
					_T("Because profile with this name already exist. Please resolve the issue manually.");
				TCHAR buf[512];

				mir_sntprintf(buf, SIZEOF(buf), TranslateTS(tszMoveMsg), path, path2);
				MessageBox(NULL, buf, _T("Miranda IM"), MB_ICONERROR | MB_OK);
			}
			else if (MoveFile(path, path2) == 0)
			{
				const TCHAR tszMoveMsg[] =
					_T("Miranda is trying upgrade your profile structure.\n")
					_T("It cannot move profile %s to the new location %s automatically\n")
					_T("Most likely due to insufficient privileges. Please move profile manually.");
				TCHAR buf[512];

				mir_sntprintf(buf, SIZEOF(buf), TranslateTS(tszMoveMsg), path, path2);
				MessageBox(NULL, buf, _T("Miranda IM"), MB_ICONERROR | MB_OK);
				break;
			}
			mir_free(profile);
		}
		while(FindNextFile(hFind, &ffd));
	}
	FindClose(hFind);
}
开发者ID:raoergsls,项目名称:miranda,代码行数:55,代码来源:database.cpp

示例7: array_each_

	array_each_(i, sortLevels)
	{
		m_hSortBy[i] = m_Options.insertCombo(m_hSort, TranslateTS(sortLevels[i]), (i == 0) ? 0 : OptionsCtrl::OCF_DISABLECHILDSONINDEX0);

		if (i != 0)
		{
			m_Options.addComboItem(m_hSortBy[i], TranslateT("(nothing)"));
		}

		array_each_(j, sortKeys)
		{
			m_Options.addComboItem(m_hSortBy[i], TranslateTS(sortKeys[j].desc));
		}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:13,代码来源:dlgoption_suboutput.cpp

示例8: ListGetItemPtr

INT_PTR __cdecl CJabberProto::JabberGCGetToolTipText(WPARAM wParam, LPARAM lParam)
{
	if (!wParam || !lParam)
		return 0; //room global tooltip not supported yet

	JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, (TCHAR*)wParam);
	if (item == NULL)
		return 0;  //no room found

	pResourceStatus info( item->findResource((TCHAR*)lParam));
	if (info == NULL)
		return 0; //no info found

	// ok process info output will be:
	// JID:			[email protected]/resource or
	// Nick:		Nickname
	// Status:		StatusText
	// Role:		Moderator
	// Affiliation:  Affiliation

	TCHAR outBuf[2048];
	outBuf[0]=0;

	bool bIsTipper = db_get_b(NULL, "Tab_SRMsg", "adv_TipperTooltip", 0) && ServiceExists("mToolTip/HideTip");

	//JID:
	if (_tcschr(info->m_tszResourceName, _T('@')) != NULL)
		appendString(bIsTipper, LPGENT("JID:"), info->m_tszResourceName, outBuf, SIZEOF(outBuf));
	else if (lParam) //or simple nick
		appendString(bIsTipper, LPGENT("Nick:"), (TCHAR*)lParam, outBuf, SIZEOF(outBuf));

	// status
	if (info->m_iStatus >= ID_STATUS_OFFLINE && info->m_iStatus <= ID_STATUS_IDLE )
		appendString(bIsTipper, LPGENT("Status:"), pcli->pfnGetStatusModeDescription(info->m_iStatus, 0), outBuf, SIZEOF(outBuf));

	// status text
	if (info->m_tszStatusMessage)
		appendString(bIsTipper, LPGENT("Status text:"), info->m_tszStatusMessage, outBuf, SIZEOF(outBuf));

	// Role
	appendString(bIsTipper, LPGENT("Role:"), TranslateTS(JabberEnum2RoleStr[info->m_role]), outBuf, SIZEOF(outBuf));

	// Affiliation
	appendString(bIsTipper, LPGENT("Affiliation:"), TranslateTS(JabberEnum2AffilationStr[info->m_affiliation]), outBuf, SIZEOF(outBuf));

	// real jid
	if (info->m_tszRealJid)
		appendString(bIsTipper, LPGENT("Real JID:"), info->m_tszRealJid, outBuf, SIZEOF(outBuf));

	return (outBuf[0] == 0 ? NULL : (INT_PTR) mir_tstrdup(outBuf));
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:51,代码来源:jabber_svc.cpp

示例9: __declspec

extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);

	GetModuleFileName(hInst, tszPath, _countof(tszPath));
	*(_tcsrchr(tszPath, _T('\\')) + 1) = _T('\0');

	/*initialize miranda hooks and services on options dialog*/
	HookEvent(ME_OPT_INITIALISE, MessageOptInit);
	/*initialize miranda hooks and services*/
	HookEvent(ME_DB_EVENT_ADDED, MessageEventAdded);
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, MessagePrebuild);

	CreateServiceFunction(SERV_CONTACT_AUTO_CHAT, ContactClickAutoChat);
	CreateServiceFunction(SERV_CONTACT_NOT_TO_CHAT, ContactClickNotToChat);
	CreateServiceFunction(SERV_CONTACT_START_CHATTING, ContactClickStartChatting);
	{
		CMenuItem mi;

		SET_UID(mi, 0xea31f628, 0x1445, 0x4b62, 0x98, 0x19, 0xce, 0x15, 0x81, 0x49, 0xa, 0xbd);
		mi.position = -50010002; //TODO: check the warning
		mi.name.a = BOLTUN_AUTO_CHAT;
		mi.pszService = SERV_CONTACT_AUTO_CHAT;
		hMenuItemAutoChat = Menu_AddContactMenuItem(&mi);

		SET_UID(mi, 0x726af984, 0x988c, 0x4d5d, 0x97, 0x30, 0xdc, 0x46, 0x55, 0x76, 0x1, 0x73);
		mi.position = -50010001; //TODO: check the warning
		mi.name.a = BOLTUN_NOT_TO_CHAT;
		mi.pszService = SERV_CONTACT_NOT_TO_CHAT;
		hMenuItemNotToChat = Menu_AddContactMenuItem(&mi);

		SET_UID(mi, 0x9e0117f3, 0xb7df, 0x4f1b, 0xae, 0xec, 0xc4, 0x72, 0x59, 0x72, 0xc8, 0x58);
		mi.flags = CMIF_NOTOFFLINE;
		mi.position = -50010000; //TODO: check the warning
		mi.hIcolibItem = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RECVMSG));
		mi.name.a = BOLTUN_START_CHATTING;
		mi.pszService = SERV_CONTACT_START_CHATTING;
		hMenuItemStartChatting = Menu_AddContactMenuItem(&mi);
	}

	int line;
	blInit = LoadMind(Config.MindFileName, line);
	if (!blInit) {
		TCHAR path[2000];
		mir_sntprintf(path, TranslateTS(FAILED_TO_LOAD_BASE), line, (const TCHAR*)Config.MindFileName);
		MessageBox(NULL, path, TranslateTS(BOLTUN_ERROR), MB_ICONERROR | MB_TASKMODAL | MB_OK);
	}
	return 0;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:49,代码来源:boltun.cpp

示例10: LoadRegisteredFolderSections

static void LoadRegisteredFolderSections(HWND hWnd)
{
	HWND hwndList = GetDlgItem(hWnd, IDC_FOLDERS_SECTIONS_LIST);

	for (int i=0; i < lstRegisteredFolders.getCount(); i++) {
		CFolderItem &tmp = lstRegisteredFolders[i];
		TCHAR *translated = mir_a2t( tmp.GetSection());
		if ( !ContainsSection(hWnd, TranslateTS(translated))) {
			int idx = SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)TranslateTS(translated));
			SendMessage(hwndList, LB_SETITEMDATA, idx, (LPARAM)tmp.GetSection());
		}

		mir_free(translated);
	}
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:15,代码来源:dlg_handlers.cpp

示例11: LangAddCallback

static BOOL CALLBACK LangAddCallback(CHAR * str) {
	int i, count;
	UINT cp;
	static struct { UINT cpId; TCHAR *cpName; } cpTable[] = {
		{	874,	_T("Thai") },
		{	932,	_T("Japanese") },
		{	936,	_T("Simplified Chinese") },
		{	949,	_T("Korean") },
		{	950,	_T("Traditional Chinese") },
		{	1250,	_T("Central European") },
		{	1251,	_T("Cyrillic") },
		{	1252,	_T("Latin I") },
		{	1253,	_T("Greek") },
		{	1254,	_T("Turkish") },
		{	1255,	_T("Hebrew") },
		{	1256,	_T("Arabic") },
		{	1257,	_T("Baltic") },
		{	1258,	_T("Vietnamese") },
		{	1361,	_T("Korean (Johab)") }
	};
    cp = atoi(str);
	count = sizeof(cpTable)/sizeof(cpTable[0]);
	for (i=0; i<count && cpTable[i].cpId!=cp; i++);
	if (i < count) {
        AppendMenu(g_dat->hMenuANSIEncoding, MF_STRING, cp, TranslateTS(cpTable[i].cpName));
	}
	return TRUE;
}
开发者ID:BackupTheBerlios,项目名称:mgoodies-svn,代码行数:28,代码来源:globals.c

示例12: GetMraStatusFromMiradaStatus

DWORD CMraProto::MraSendNewStatus(DWORD dwStatusMir, DWORD dwXStatusMir, const CMStringW &pwszStatusTitle, const CMStringW &pwszStatusDesc)
{
	if (!m_bLoggedIn)
		return 0;

	CMStringW wszStatusTitle, wszStatusDesc;
	DWORD dwXStatus, dwStatus = GetMraStatusFromMiradaStatus(dwStatusMir, dwXStatusMir, &dwXStatus);
	if (IsXStatusValid(dwXStatusMir)) {
		char szValueName[MAX_PATH];
		if (pwszStatusTitle.IsEmpty()) {
			mir_snprintf(szValueName, SIZEOF(szValueName), "XStatus%ldName", dwXStatusMir);
			// custom xstatus name
			if (!mraGetStringW(NULL, szValueName, wszStatusTitle))
				wszStatusTitle = TranslateTS(lpcszXStatusNameDef[dwXStatusMir]);
		}
		else wszStatusTitle = pwszStatusTitle;

		if (pwszStatusDesc.IsEmpty()) {
			mir_snprintf(szValueName, SIZEOF(szValueName), "XStatus%ldMsg", dwXStatusMir);
			// custom xstatus description
			mraGetStringW(NULL, szValueName, wszStatusDesc);
		}
		else wszStatusDesc = pwszStatusDesc;
	}
	else if (pwszStatusTitle.IsEmpty())
		wszStatusTitle = pcli->pfnGetStatusModeDescription(dwStatusMir, 0);

	MraChangeStatus(dwStatus, lpcszStatusUri[dwXStatus], wszStatusTitle, wszStatusDesc, ((getByte("RTFReceiveEnable", MRA_DEFAULT_RTF_RECEIVE_ENABLE) ? FEATURE_FLAG_RTF_MESSAGE : 0) | MRA_FEATURE_FLAGS));
	return 0;
}
开发者ID:martok,项目名称:miranda-ng,代码行数:30,代码来源:Mra_svcs.cpp

示例13: parse_section

bool parse_section(const IXMLNode::TXMLNodePtr& pTop, CQuotesProviderBase::CQuoteSection& qs)
{
	CQuotesProviderBase::CQuoteSection::TSections aSections;
	CQuotesProviderBase::CQuoteSection::TQuotes aQuotes;
	tstring sSectionName;

	size_t cChild = pTop->GetChildCount();
	for (size_t i = 0; i < cChild; ++i) {
		IXMLNode::TXMLNodePtr pNode = pTop->GetChildNode(i);
		tstring sName = pNode->GetName();
		if (0 == mir_tstrcmpi(_T("section"), sName.c_str())) {
			CQuotesProviderBase::CQuoteSection qs1;
			if (true == parse_section(pNode, qs1))
				aSections.push_back(qs1);
		}
		else if (0 == mir_tstrcmpi(_T("quote"), sName.c_str())) {
			CQuotesProviderBase::CQuote q;
			if (true == parse_quote(pNode, q))
				aQuotes.push_back(q);
		}
		else if (0 == mir_tstrcmpi(_T("name"), sName.c_str())) {
			sSectionName = pNode->GetText();
			if (true == sSectionName.empty())
				return false;
		}
	}

	qs = CQuotesProviderBase::CQuoteSection(TranslateTS(sSectionName.c_str()), aSections, aQuotes);
	return true;
}
开发者ID:wyrover,项目名称:miranda-ng,代码行数:30,代码来源:QuotesProviderBase.cpp

示例14: OnInitDialog

void CVkOptionAccountForm::OnInitDialog()
{
	m_ptszOldLogin = m_edtLogin.GetText();
	m_edtLogin.SendMsg(EM_LIMITTEXT, 1024, 0);

	m_ptszOldPass = m_proto->GetUserStoredPassword();
	m_edtPassword.SetText(m_ptszOldPass);
	m_edtPassword.SendMsg(EM_LIMITTEXT, 1024, 0);

	m_ptszOldGroup = m_edtGroupName.GetText();

	m_cbMarkMessageOnRead.SetState(m_proto->m_vkOptions.iMarkMessageReadOn == MarkMsgReadOn::markOnRead);
	m_cbMarkMessageOnReceive.SetState(m_proto->m_vkOptions.iMarkMessageReadOn == MarkMsgReadOn::markOnReceive);
	m_cbMarkMessageOnReply.SetState(m_proto->m_vkOptions.iMarkMessageReadOn == MarkMsgReadOn::markOnReply);
	m_cbMarkMessageOnTyping.SetState(m_proto->m_vkOptions.iMarkMessageReadOn == MarkMsgReadOn::markOnTyping);

	m_cbSyncHistoryOff.SetState(m_proto->m_vkOptions.iSyncHistoryMetod == SyncHistoryMetod::syncOff);
	m_cbSyncHistoryAuto.SetState(m_proto->m_vkOptions.iSyncHistoryMetod == SyncHistoryMetod::syncAuto);
	m_cbSyncHistoryForLast1Day.SetState(m_proto->m_vkOptions.iSyncHistoryMetod == SyncHistoryMetod::sync1Days);
	m_cbSyncHistoryForLast3Day.SetState(m_proto->m_vkOptions.iSyncHistoryMetod == SyncHistoryMetod::sync3Days);
	
	for (size_t i = 0; i < _countof(vkLangCodes); i++) {
		m_cbxVKLang.AddString(TranslateTS(vkLangCodes[i].szDescription), (LPARAM)vkLangCodes[i].szCode);
		if (!mir_tstrcmpi(vkLangCodes[i].szCode, m_proto->m_vkOptions.ptszVKLang))
			m_cbxVKLang.SetCurSel(i);
	}
	
}
开发者ID:wyrover,项目名称:miranda-ng,代码行数:28,代码来源:vk_options.cpp

示例15: AddLine

static HTREEITEM AddLine(HWND hTree,TopButtonInt *b, HTREEITEM hItem, HIMAGELIST il)
{
	TVINSERTSTRUCT tvis = { 0 };
	tvis.hInsertAfter = hItem;
	tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;

	int index;
	TCHAR* tmp;

	if (b->dwFlags & TTBBF_ISSEPARATOR) {
		tvis.item.pszText = _T("------------------");
		index = -1;
	}
	else {
		if (b->hIconHandleUp) {
			HICON hIcon = IcoLib_GetIconByHandle(b->hIconHandleUp);
			index = ImageList_AddIcon(il, hIcon);
			IcoLib_ReleaseIcon(hIcon);
		}
		else index = ImageList_AddIcon(il, b->hIconUp);

		tmp = mir_a2t( b->pszName );
		tvis.item.pszText = TranslateTS(tmp);
	}
	tvis.item.iImage = tvis.item.iSelectedImage = index;

	tvis.item.lParam = (LPARAM)b;
	HTREEITEM hti = TreeView_InsertItem(hTree, &tvis);

	if (!(b->dwFlags & TTBBF_ISSEPARATOR))
		mir_free(tmp);

	TreeView_SetCheckState(hTree, hti, b->isVisible());
	return hti;
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:35,代码来源:ttbopt.cpp


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