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

C++ CTSTRING函数代码示例

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

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



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

示例1: updateEnablement

LRESULT AVIPreview::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {
    PropPage::translate(texts);
    PropPage::read(items);
    updateEnablement();

    CRect rc;

    ctrlCommands.Attach(GetDlgItem(IDC_MENU_ITEMS));
    ctrlCommands.GetClientRect(rc);

    ctrlCommands.InsertColumn(0, CTSTRING(SETTINGS_NAME), LVCFMT_LEFT, rc.Width()/5, 0);
    ctrlCommands.InsertColumn(1, CTSTRING(SETTINGS_COMMAND), LVCFMT_LEFT, rc.Width()*2 / 5, 1);
    ctrlCommands.InsertColumn(2, CTSTRING(SETTINGS_ARGUMENT), LVCFMT_LEFT, rc.Width() / 5, 2);
    ctrlCommands.InsertColumn(3, CTSTRING(SETTINGS_EXTENSIONS), LVCFMT_LEFT, rc.Width() / 5, 3);

    ctrlCommands.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT);

    // Do specialized reading here
    PreviewApplication::List lst = FavoriteManager::getInstance()->getPreviewApps();
    for(PreviewApplication::Iter i = lst.begin(); i != lst.end(); ++i) {
        PreviewApplication::Ptr pa = *i;
        addEntry(pa, ctrlCommands.GetItemCount());
    }
    return 0;
}
开发者ID:inetra,项目名称:peers1,代码行数:25,代码来源:AVIPreview.cpp


示例2: getText

LRESULT AsGroupsDlg::onRemove(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) {
	int32_t pos = ctrlGroups.GetSelectedIndex();
	if (pos < 0)
		return 0;

	AutoSearchList removeLst;
	{
		tstring name = getText(0, pos);
		WLock l(AutoSearchManager::getInstance()->getCS());
		auto lst = AutoSearchManager::getInstance()->getSearchItems();
		bool remove = MessageBox(CTSTRING(GROUP_REMOVE_ITEMS), CTSTRING(REMOVE_GROUP), MB_ICONQUESTION | MB_YESNO) == IDYES;

		for (auto as : lst | map_values) {
			if (as->getGroup() != Text::fromT(name))
				continue;
			if (remove)
				removeLst.push_back(as);
			else
				as->setGroup(Util::emptyString);
		}
		ctrlGroups.DeleteItem(pos);
		updateSelectedGroup(true);
	}

	for_each(removeLst, [&](AutoSearchPtr a) { AutoSearchManager::getInstance()->removeAutoSearch(a); });
	return 0;
}
开发者ID:jameskumar,项目名称:airgit,代码行数:27,代码来源:AutoSearchGroupDlg.cpp


示例3: GetDlgItem

LRESULT QueuePage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	PropPage::translate(texts);
	PropPage::read(items);
	PropPage::readCheckBoxList(optionItems, GetDlgItem(IDC_OTHER_QUEUE_OPTIONS));

	CUpDownCtrl spin;
	spin.Attach(GetDlgItem(IDC_SEG_NUMBER_SPIN));
	spin.SetRange32(1, 200);  //[!]PPA
	spin.Detach();

	spin.Attach(GetDlgItem(IDC_SEARCH_SPIN));
	spin.SetRange32(2, 60);
	spin.Detach();

	spin.Attach(GetDlgItem(IDC_BEGIN_SPIN));
	spin.SetRange32(2, 100000);
	spin.Detach();

	ctrlMultiSource.Attach(GetDlgItem(IDC_MULTISOURCE_COMBO));
	ctrlMultiSource.AddString(CTSTRING(DISABLED));
	ctrlMultiSource.AddString(CTSTRING(AUTOMATIC));
	ctrlMultiSource.SetCurSel(SETTING(MULTI_CHUNK));
    
	::EnableWindow(GetDlgItem(IDC_DONTBEGIN), FALSE); //[+]PPA
	::EnableWindow(GetDlgItem(IDC_BEGIN_EDIT), FALSE); //[+]PPA
	
	// Do specialized reading here
	return TRUE;
}
开发者ID:inetra,项目名称:peers1,代码行数:30,代码来源:QueuePage.cpp


示例4: SetDlgItemText

LRESULT
DCLSTGenDlg::onSaveAS(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	// GetNew _mNameDCLST
	tstring targetOld = Text::toT(_mNameDCLST);
	tstring target = targetOld;
	static const TCHAR defaultExt[] = L"dcls";
	if (WinUtil::browseFile(target, *this, true, Util::emptyStringT, FILE_LIST_TYPE_T, defaultExt)) // TODO translate
	{
		try
		{
			File::renameFile(targetOld, target);
			_mNameDCLST = Text::fromT(target);
			
			const string l_TTH_str = _tth.get()->getRoot().toBase32();
			
			_strMagnet = "magnet:?xt=urn:tree:tiger:" + l_TTH_str +
			             "&xl=" + Util::toString(_tth.get()->getFileSize()) + "&dn=" + Util::encodeURI(Util::getFileName(_mNameDCLST)) + "&dl=" + Util::toString(_totalSize);
			             
			SetDlgItemText(IDC_DCLSTGEN_MAGNET,  Text::toT(_strMagnet).c_str());
			SetDlgItemText(IDC_DCLSTGEN_NAME, target.c_str());
		}
		catch (const FileException& /*ex*/)
		{
			MessageBox(CTSTRING(DCLSTGEN_METAFILECANNOTMOVED), CTSTRING(DCLSTGEN_TITLE), MB_OK | MB_ICONERROR);
		}
		
	}
	return 0;
}
开发者ID:snarkus,项目名称:flylinkdc-r5xx,代码行数:30,代码来源:dclstGenDlg.cpp


示例5: getValues

LRESULT FulHighlightDialog::onOk(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/){
	try{
		getValues();
	}catch(...) {
		MessageBox(CTSTRING(BAD_REGEXP), _T(APPNAME) _T(" ") _T(VERSIONSTRING), MB_OK | MB_ICONEXCLAMATION);
		return TRUE;
	}

	if(cs.getMatch().empty()){
		MessageBox(CTSTRING(ADD_EMPTY), _T(APPNAME) _T(" ") _T(VERSIONSTRING), MB_OK | MB_ICONEXCLAMATION);
		return TRUE;
	}

	if(cs.getMatch().find(_T("$Re:")) == 0) {
		string str1 = "^$";
		string str2 = (Text::fromT(cs.getMatch())).substr(4);
		try {
			boost::regex reg(str1);
			if(boost::regex_search(str2.begin(), str2.end(), reg)){
				//....
			}
		} catch(...) {
			MessageBox(CTSTRING(BAD_REGEXP), _T(APPNAME) _T(" ") _T(VERSIONSTRING), MB_OK | MB_ICONEXCLAMATION);
			return TRUE;
		}

	}

	EndDialog(IDOK);
	return 0;
}
开发者ID:BackupTheBerlios,项目名称:airdc-svn,代码行数:31,代码来源:FulHighlightDialog.cpp


示例6: CTSTRING

LRESULT WebServerPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {
	PropPage::translate((HWND)(*this), texts);

	::SetWindowText(GetDlgItem(IDC_WEBSERVER_PORT), Util::toStringW(webMgr->getPlainServerConfig().getPort()).c_str());
	::SetWindowText(GetDlgItem(IDC_WEBSERVER_TLSPORT), Util::toStringW(webMgr->getTlsServerConfig().getPort()).c_str());

	ctrlTlsPort.Attach(GetDlgItem(IDC_WEBSERVER_TLSPORT));
	ctrlPort.Attach(GetDlgItem(IDC_WEBSERVER_PORT));

	ctrlWebUsers.Attach(GetDlgItem(IDC_WEBSERVER_USERS));
	ctrlWebUsers.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT);
	CRect rc;
	ctrlWebUsers.GetClientRect(rc);
	ctrlWebUsers.InsertColumn(0, CTSTRING(NAME), LVCFMT_LEFT, rc.Width() / 2, 0);
	ctrlWebUsers.InsertColumn(1, CTSTRING(PASSWORD), LVCFMT_LEFT, rc.Width() / 2, 1);

	ctrlRemove.Attach(GetDlgItem(IDC_WEBSERVER_REMOVE_USER));
	ctrlAdd.Attach(GetDlgItem(IDC_WEBSERVER_ADD_USER));
	ctrlChange.Attach(GetDlgItem(IDC_WEBSERVER_CHANGE));
	ctrlStart.Attach(GetDlgItem(IDC_WEBSERVER_START));
	ctrlStatus.Attach(GetDlgItem(IDC_WEBSERVER_STATUS));

	currentState = webMgr->isRunning() ? STATE_STARTED : STATE_STOPPED;
	updateStatus();

	webUserList = webMgr->getUserManager().getUsers();
	for (auto u : webUserList) {
		addListItem(u->getUserName(), u->getPassword());
	}
	webMgr->addListener(this);
	return TRUE;
}
开发者ID:jameskumar,项目名称:airgit,代码行数:32,代码来源:WebserverPage.cpp


示例7: CTSTRING

LRESULT UCPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	PropPage::translate((HWND)(*this), texts);
	PropPage::read((HWND)*this, items);

	CRect rc;

	ctrlCommands.Attach(GetDlgItem(IDC_MENU_ITEMS));
	ctrlCommands.GetClientRect(rc);

	ctrlCommands.InsertColumn(0, CTSTRING(SETTINGS_NAME), LVCFMT_LEFT, rc.Width()/4, 0);
	ctrlCommands.InsertColumn(1, CTSTRING(SETTINGS_COMMAND), LVCFMT_LEFT, rc.Width()*2 / 4, 1);
	ctrlCommands.InsertColumn(2, CTSTRING(HUB), LVCFMT_LEFT, rc.Width() / 4, 2);
	ctrlCommands.SetExtendedListViewStyle(LVS_EX_LABELTIP | LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER);

	// Do specialized reading here
	UserCommand::List lst = FavoriteManager::getInstance()->getUserCommands();
	for(UserCommand::List::iterator i = lst.begin(); i != lst.end(); ++i) {
		UserCommand& uc = *i;	
		if(!uc.isSet(UserCommand::FLAG_NOSAVE)) {
			addEntry(uc, ctrlCommands.GetItemCount());
		}
	}
	
	return TRUE;
}
开发者ID:BackupTheBerlios,项目名称:rsxplusplus-svn,代码行数:26,代码来源:UCPage.cpp


示例8: CTSTRING

LRESULT AVIPreview::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	PropPage::translate((HWND)(*this), texts);
	
	CRect rc;
	
	ctrlCommands.Attach(GetDlgItem(IDC_MENU_ITEMS));
	ctrlCommands.GetClientRect(rc);
	
	ctrlCommands.InsertColumn(0, CTSTRING(SETTINGS_NAME), LVCFMT_LEFT, rc.Width() / 5, 0);
	ctrlCommands.InsertColumn(1, CTSTRING(SETTINGS_COMMAND), LVCFMT_LEFT, rc.Width() * 2 / 5, 1);
	ctrlCommands.InsertColumn(2, CTSTRING(SETTINGS_ARGUMENT), LVCFMT_LEFT, rc.Width() / 5, 2);
	ctrlCommands.InsertColumn(3, CTSTRING(SETTINGS_EXTENSIONS), LVCFMT_LEFT, rc.Width() / 5, 3);
	
	SET_EXTENDENT_LIST_VIEW_STYLE(ctrlCommands);
	SET_LIST_COLOR_IN_SETTING(ctrlCommands);
	
	// Do specialized reading here
	const PreviewApplication::List lst = FavoriteManager::getInstance()->getPreviewApps();
	auto cnt = ctrlCommands.GetItemCount();
	for (auto i = lst.cbegin(); i != lst.cend(); ++i)
	{
		PreviewApplication::Ptr pa = *i;
		addEntry(pa, cnt++);
	}
	return 0;
}
开发者ID:snarkus,项目名称:flylinkdc-r5xx,代码行数:27,代码来源:AVIPreviewPage.cpp


示例9: if

void AutoSearchFrame::addEntry(const AutoSearchPtr as, int pos) {
	if(as == NULL)
		return;
		
	if(pos < 0)
		pos = 0;

	TStringList lst;
	lst.push_back(Text::toT(as->getSearchString()));
	lst.push_back(Text::toT(getType(as->getFileType())));
		
	if(as->getAction() == 0){
		lst.push_back(CTSTRING(DOWNLOAD));
	}else if(as->getAction() == 1){
		lst.push_back(CTSTRING(ADD_TO_QUEUE));
	}else if(as->getAction() == 2){
		lst.push_back(CTSTRING(AS_REPORT));
	}
		
	lst.push_back(Text::toT(as->getTarget()));
	lst.push_back(Text::toT(as->getRemove()? "Yes" : "No"));
	lst.push_back(Text::toT(as->getNickPattern()));
	lst.push_back((as->getLastSearch() > 0 ? formatSearchDate(as->getLastSearch()).c_str() : _T("Unknown")));

	bool b = as->getEnabled();
	int i = ctrlAutoSearch.insert(pos, lst, 0, (LPARAM)as.get());
	ctrlAutoSearch.SetCheckState(i, b);
}
开发者ID:BackupTheBerlios,项目名称:airdc-svn,代码行数:28,代码来源:AutoSearchFrm.cpp


示例10: _T

uint64_t UserInfoSimple::inputSlotTime()
{
	static tstring deftext = _T("00:30");
	
	LineDlg dlg;
	dlg.description = TSTRING(EXTRA_SLOT_TIME_FORMAT);
	dlg.title = TSTRING(EXTRA_SLOT_TIMEOUT);
	dlg.line = deftext;
	
	if (dlg.DoModal() == IDOK)
	{
		deftext = dlg.line;
		unsigned int n = 0;
		for (size_t i = 0; i < deftext.length(); i++) // TODO: cleanup.
		{
			if (deftext[i] == L':') n++;
		}
		unsigned int d, h, m;
		switch (n)
		{
			case 1:
				if (swscanf(deftext.c_str(), L"%u:%u", &h, &m) == 2)
					return (h * 3600 + m * 60);
					
				break;
			case 2:
				if (swscanf(deftext.c_str(), L"%u:%u:%u", &d, &h, &m) == 3)
					return (d * 3600 * 24 + h * 3600 + m * 60);
					
				break;
		}
		::MessageBox(GetForegroundWindow(), CTSTRING(INVALID_TIME_FORMAT), CTSTRING(ERRORS), MB_OK | MB_ICONERROR);
	}
	return 0;
}
开发者ID:craxycat,项目名称:flylinkdc-r5xx,代码行数:35,代码来源:UserInfoSimple.cpp


示例11: CTSTRING

LRESULT CFulEditCtrl::onCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled){
	searchMenu.CreatePopupMenu();

	menu.CreatePopupMenu();
	if( isSet(MENU_COPY) )
		menu.AppendMenu(MF_STRING, IDC_COPY, CTSTRING(COPY));

	if( isSet(MENU_PASTE) )
		menu.AppendMenu(MF_STRING, IDC_PASTE, CTSTRING(PASTE));

	if( isSet(MENU_SEARCH) )
		menu.AppendMenu(MF_STRING, IDC_SEARCH, CTSTRING(SEARCH));

	if( isSet(MENU_SEARCH_TTH) )
		menu.AppendMenu(MF_STRING, IDC_SEARCH_BY_TTH, CTSTRING(SEARCH_BY_TTH));

	if( isSet(MENU_SEARCH_MENU) )
		menu.AppendMenu(MF_POPUP, (UINT_PTR)(HMENU)searchMenu, CTSTRING(SEARCH_SITES));

	//Set the MNS_NOTIFYBYPOS flag to receive WM_MENUCOMMAND
	MENUINFO inf;
	inf.cbSize = sizeof(MENUINFO);
	inf.fMask = MIM_STYLE | MIM_APPLYTOSUBMENUS;
	inf.dwStyle = MNS_NOTIFYBYPOS;
	menu.SetMenuInfo(&inf);

	handCursor = LoadCursor(NULL, MAKEINTRESOURCE(IDC_HAND));
	beamCursor = LoadCursor(NULL, MAKEINTRESOURCE(IDC_IBEAM));

	bHandled = FALSE;
	return 1;
}
开发者ID:BackupTheBerlios,项目名称:fuldc-svn,代码行数:32,代码来源:FulEditCtrl.cpp


示例12: GET_X_LPARAM

LRESULT UsersFrame::onContextMenu(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& bHandled) {
	if (reinterpret_cast<HWND>(wParam) == ctrlUsers && ctrlUsers.GetSelectedCount() > 0 ) { 
		POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };

		if(pt.x == -1 && pt.y == -1) {
			WinUtil::getContextMenuPos(ctrlUsers, pt);
		}
	
		OMenu usersMenu;
		usersMenu.CreatePopupMenu();
		usersMenu.AppendMenu(MF_STRING, IDC_OPEN_USER_LOG, CTSTRING(OPEN_USER_LOG));
		usersMenu.AppendMenu(MF_SEPARATOR);
		appendUserItems(usersMenu, Util::emptyString); // TODO: hubhint
		usersMenu.AppendMenu(MF_SEPARATOR);
		usersMenu.AppendMenu(MF_STRING, IDC_EDIT, CTSTRING(PROPERTIES));
		usersMenu.AppendMenu(MF_STRING, IDC_REMOVE, CTSTRING(REMOVE));
		
		tstring x;
		if (ctrlUsers.GetSelectedCount() == 1) {
			x = ctrlUsers.getItemData(WinUtil::getFirstSelectedIndex(ctrlUsers))->columns[COLUMN_NICK];
		} else {
			x = _T("");
		}

		if (!x.empty())
			usersMenu.InsertSeparatorFirst(x);
		
		usersMenu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, m_hWnd);

		return TRUE; 
	}
	bHandled = FALSE;
	return FALSE; 
}
开发者ID:strogo,项目名称:StrongDC,代码行数:34,代码来源:UsersFrame.cpp


示例13: SetDlgItemText

void ADLSProperties::setControlOverride() {
	bool b = (::SendMessage(GetDlgItem(IDC_OVERRIDE_FAV), BM_GETCHECK, 0, 0L) != 0);
	::ShowWindow(GetDlgItem(IDC_ADLS_KICK_STRING), !b);
	::ShowWindow(GetDlgItem(IDC_ADLSEARCH_RAW_ACTION), b);
	if (b)
		SetDlgItemText(IDC_ADLSEARCH_ACTION, CTSTRING(ACTION));
	else
		SetDlgItemText(IDC_ADLSEARCH_ACTION, CTSTRING(RAW));
}
开发者ID:BackupTheBerlios,项目名称:rsxplusplus-svn,代码行数:9,代码来源:ADLSProperties.cpp


示例14: switch

tstring ADLSearch::SizeTypeToDisplayString(ADLSearch::SizeType t) {
	switch(t) {
	default:
	case SizeBytes:		return CTSTRING(B);
	case SizeKiloBytes:	return CTSTRING(KB);
	case SizeMegaBytes:	return CTSTRING(MB);
	case SizeGigaBytes:	return CTSTRING(GB);
	}
}
开发者ID:Dimetro83,项目名称:DC_DDD,代码行数:9,代码来源:ADLSearch.cpp


示例15: GetDlgItem

LRESULT SharingOptionsPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	PropPage::translate((HWND)(*this), texts);
	PropPage::read((HWND)*this, items, listItems, GetDlgItem(IDC_SHARINGLIST));

	//refresh
	setMinMax(IDC_REFRESH_SPIN, 0, 3000);
	setMinMax(IDC_INCOMING_SPIN, 0, 1000);
	setMinMax(IDC_MONITORING_SECONDS_SPIN, 1, 1000);

	ctrlThreadedRefresh.Attach(GetDlgItem(IDC_MULTITHREADED_REFRESH));
	ctrlThreadedRefresh.InsertString(0, CTSTRING(NEVER));
	ctrlThreadedRefresh.InsertString(1, CTSTRING(MANUAL_REFRESHES));
	ctrlThreadedRefresh.InsertString(2, CTSTRING(ALWAYS));
	ctrlThreadedRefresh.SetCurSel(SETTING(REFRESH_THREADING));

	ctrlDelayMode.Attach(GetDlgItem(IDC_DELAY_MODE));
	ctrlDelayMode.InsertString(0, CTSTRING(MONITOR_DELAY_DIR));
	ctrlDelayMode.InsertString(1, CTSTRING(MONITOR_DELAY_VOLUME));
	ctrlDelayMode.InsertString(2, CTSTRING(MONITOR_DELAY_ANY));
	ctrlDelayMode.SetCurSel(SETTING(DELAY_COUNT_MODE));

	ctrlMonitoringMode.Attach(GetDlgItem(IDC_MONITORING_MODE));
	ctrlMonitoringMode.InsertString(0, CTSTRING(DISABLED));
	ctrlMonitoringMode.InsertString(1, CTSTRING(INCOMING_ONLY));
	ctrlMonitoringMode.InsertString(2, CTSTRING(ALL_DIRS));
	ctrlMonitoringMode.SetCurSel(SETTING(MONITORING_MODE));

	// Do specialized reading here
	return TRUE;
}
开发者ID:BackupTheBerlios,项目名称:airdc-svn,代码行数:31,代码来源:SharingOptionsPage.cpp


示例16: SetWindowText

LRESULT AsGroupsDlg::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {
	ctrlGroups.Attach(GetDlgItem(IDC_GROUPS));

	uint32_t width;
	{
		CRect rc;
		ctrlGroups.GetClientRect(rc);
		width = rc.Width() - 20; // for scroll
	}

	// Translate dialog
	SetWindowText(CTSTRING(MANAGE_GROUPS));
	SetDlgItemText(IDC_ADD, CTSTRING(ADD));
	SetDlgItemText(IDC_REMOVE, CTSTRING(REMOVE));
	SetDlgItemText(IDC_UPDATE, CTSTRING(UPDATE));
	SetDlgItemText(IDCANCEL, CTSTRING(CLOSE));
	SetDlgItemText(IDC_MOVE_UP, CTSTRING(MOVE_UP));
	SetDlgItemText(IDC_MOVE_DOWN, CTSTRING(MOVE_DOWN));
	SetDlgItemText(IDC_NAME_STATIC, CTSTRING(NAME));

	ctrlGroups.InsertColumn(0, CTSTRING(NAME), LVCFMT_LEFT, WinUtil::percent(width, 100), 0);
	ctrlGroups.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER);

	const auto groups = AutoSearchManager::getInstance()->getGroups();
	for (auto i : groups) {
		addItem(Text::toT(i),ctrlGroups.GetItemCount());
	}
	updateSelectedGroup(true);
	return 0;
}
开发者ID:jameskumar,项目名称:airgit,代码行数:30,代码来源:AutoSearchGroupDlg.cpp


示例17: CTSTRING

tstring ChatControl::findTextPopup() {
  LineDlg finddlg;
  finddlg.title = CTSTRING(SEARCH);
  finddlg.description = CTSTRING(SPECIFY_SEARCH_STRING);
  if (finddlg.DoModal() == IDOK) {
    return finddlg.line;
  }
  else {
    return Util::emptyStringT;
  }
}
开发者ID:inetra,项目名称:peers1,代码行数:11,代码来源:ChatControl.cpp


示例18: _T

void WebServerPage::updateStatus() {

	if (currentState == STATE_STARTED) {
		ctrlStart.SetWindowText(CTSTRING(STOP));
		ctrlStatus.SetWindowText((TSTRING(WEBSERVER_RUNNING) + (lastError.empty() ? _T("") : _T(" : ") + Text::toT(lastError))).c_str());
	} else if(currentState == STATE_STOPPING) {
		ctrlStatus.SetWindowText(_T("Stopping..."));
	} else if (currentState == STATE_STOPPED) {
	 ctrlStart.SetWindowText(CTSTRING(START));
	 ctrlStatus.SetWindowText(CTSTRING(WEBSERVER_STOPPED));
	}
}
开发者ID:jameskumar,项目名称:airgit,代码行数:12,代码来源:WebserverPage.cpp


示例19: SET_EXTENDENT_LIST_VIEW_STYLE

LRESULT RecentHubsFrame::onCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
{
	ctrlHubs.Create(m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
	                WS_HSCROLL | WS_VSCROLL | LVS_REPORT | LVS_SHOWSELALWAYS, WS_EX_CLIENTEDGE, IDC_RECENTS);
	                
	SET_EXTENDENT_LIST_VIEW_STYLE(ctrlHubs);
	SET_LIST_COLOR(ctrlHubs);
	
	// Create listview columns
	WinUtil::splitTokens(columnIndexes, SETTING(RECENTFRAME_ORDER), COLUMN_LAST);
	WinUtil::splitTokensWidth(columnSizes, SETTING(RECENTFRAME_WIDTHS), COLUMN_LAST);
	
	BOOST_STATIC_ASSERT(_countof(columnSizes) == COLUMN_LAST);
	BOOST_STATIC_ASSERT(_countof(columnNames) == COLUMN_LAST);
	for (int j = 0; j < COLUMN_LAST; j++)
	{
		const int fmt = LVCFMT_LEFT;
		ctrlHubs.InsertColumn(j, CTSTRING_I(columnNames[j]), fmt, columnSizes[j], j);
	}
	
	ctrlHubs.SetColumnOrderArray(COLUMN_LAST, columnIndexes);
	ctrlConnect.Create(m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
	                   BS_PUSHBUTTON , 0, IDC_CONNECT);
	ctrlConnect.SetWindowText(CTSTRING(CONNECT));
	ctrlConnect.SetFont(Fonts::g_systemFont); // [~] Sergey Shuhskanov
	
	ctrlRemove.Create(m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
	                  BS_PUSHBUTTON , 0, IDC_REMOVE);
	ctrlRemove.SetWindowText(CTSTRING(REMOVE));
	ctrlRemove.SetFont(Fonts::g_systemFont); // [~] Sergey Shuhskanov
	
	ctrlRemoveAll.Create(m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
	                     BS_PUSHBUTTON , 0, IDC_REMOVE_ALL);
	ctrlRemoveAll.SetWindowText(CTSTRING(REMOVE_ALL));
	ctrlRemoveAll.SetFont(Fonts::g_systemFont); // [~] Sergey Shuhskanov
	
	FavoriteManager::getInstance()->addListener(this);
	SettingsManager::getInstance()->addListener(this);
	updateList(FavoriteManager::getInstance()->getRecentHubs());
	
	const int l_sort = SETTING(HUBS_RECENTS_COLUMNS_SORT);
	int l_sort_type = ExListViewCtrl::SORT_STRING_NOCASE;
	if (l_sort == 2 || l_sort == 3)
		l_sort_type = ExListViewCtrl::SORT_INT;
	ctrlHubs.setSort(SETTING(HUBS_RECENTS_COLUMNS_SORT), l_sort_type , BOOLSETTING(HUBS_RECENTS_COLUMNS_SORT_ASC));
	
	hubsMenu.CreatePopupMenu();
	hubsMenu.AppendMenu(MF_STRING, IDC_CONNECT, CTSTRING(CONNECT));
	hubsMenu.AppendMenu(MF_STRING, IDC_ADD, CTSTRING(ADD_TO_FAVORITES_HUBS));
	hubsMenu.AppendMenu(MF_STRING, IDC_REM_AS_FAVORITE, CTSTRING(REMOVE_FROM_FAVORITES_HUBS));
	hubsMenu.AppendMenu(MF_STRING, IDC_EDIT, CTSTRING(PROPERTIES));
	hubsMenu.AppendMenu(MF_STRING, IDC_REMOVE, CTSTRING(REMOVE));
	hubsMenu.AppendMenu(MF_STRING, IDC_REMOVE_ALL, CTSTRING(REMOVE_ALL));
	hubsMenu.SetMenuDefaultItem(IDC_CONNECT);
	
	bHandled = FALSE;
	return TRUE;
}
开发者ID:snarkus,项目名称:flylinkdc-r5xx,代码行数:58,代码来源:RecentsFrm.cpp


示例20: onCheckDHTStats

LRESULT NetworkPage::onCheckDHTStats(WORD /* wNotifyCode */, WORD /*wID*/, HWND /* hWndCtl */, BOOL& /* bHandled */)
{
	if (IsDlgButtonChecked(IDC_SETTINGS_USE_DHT) == BST_CHECKED && !BOOLSETTING(USE_DHT_NOTANSWER))
	{
		if (MessageBox(CTSTRING(DHT_WARNING), CTSTRING(WARNING), MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON1) != IDYES)
		{
			CheckDlgButton(IDC_SETTINGS_USE_DHT, BST_UNCHECKED);
		}
	}
	fixControls();
	return 0;
}
开发者ID:snarkus,项目名称:flylinkdc-r5xx,代码行数:12,代码来源:NetworkPage.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ CTSVNPath函数代码示例发布时间:2022-05-30
下一篇:
C++ CTRL函数代码示例发布时间: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