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


C++ CEditUI::GetText方法代码示例

本文整理汇总了C++中CEditUI::GetText方法的典型用法代码示例。如果您正苦于以下问题:C++ CEditUI::GetText方法的具体用法?C++ CEditUI::GetText怎么用?C++ CEditUI::GetText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CEditUI的用法示例。


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

示例1: GetData

void CLoginWnd::GetData()
{
	CEditUI* pAccount = static_cast<CEditUI*>(m_PaintManager.FindControl(_T("account")));
	m_strAccount = pAccount->GetText();
	CEditUI* pWord = static_cast<CEditUI*>(m_PaintManager.FindControl(_T("password")));
	m_strPassWord = pWord->GetText();
	COptionUI* pLeft = static_cast<COptionUI*>(m_PaintManager.FindControl(_T("remember")));
	m_IsLeftSelected = pLeft->IsSelected();
	COptionUI* pRight = static_cast<COptionUI*>(m_PaintManager.FindControl(_T("autolog")));
	m_IsRightSeleced = pRight->IsSelected();
}
开发者ID:Forlearngit,项目名称:VisitorManager,代码行数:11,代码来源:LoginWnd.cpp

示例2: Init

	void CEditWnd::Init(CEditUI* pOwner)
	{
		m_pOwner = pOwner;
		RECT rcPos = CalPos();
		UINT uStyle = WS_CHILD | ES_AUTOHSCROLL;
		if( m_pOwner->IsPasswordMode() ) uStyle |= ES_PASSWORD;
		Create(m_pOwner->GetManager()->GetPaintWindow(), NULL, uStyle, 0, rcPos);
		HFONT hFont=NULL;
		int iFontIndex=m_pOwner->GetFont();
		if (iFontIndex!=-1)
			hFont=m_pOwner->GetManager()->GetFont(iFontIndex);
		if (hFont==NULL)
			hFont=m_pOwner->GetManager()->GetDefaultFontInfo()->hFont;

		SetWindowFont(m_hWnd, hFont, TRUE);
		Edit_LimitText(m_hWnd, m_pOwner->GetMaxChar());
		if( m_pOwner->IsPasswordMode() ) Edit_SetPasswordChar(m_hWnd, m_pOwner->GetPasswordChar());
		Edit_SetText(m_hWnd, m_pOwner->GetText());
		Edit_SetModify(m_hWnd, FALSE);
		SendMessage(EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELPARAM(0, 0));
		Edit_Enable(m_hWnd, m_pOwner->IsEnabled() == true);
		Edit_SetReadOnly(m_hWnd, m_pOwner->IsReadOnly() == true);
		//Styls
		LONG styleValue = ::GetWindowLong(m_hWnd, GWL_STYLE);
		styleValue |= pOwner->GetWindowStyls();
		::SetWindowLong(GetHWND(), GWL_STYLE, styleValue);
		::ShowWindow(m_hWnd, SW_SHOWNOACTIVATE);
		::SetFocus(m_hWnd);
		m_bInit = true;    
	}
开发者ID:mofa005,项目名称:WebWeixin,代码行数:30,代码来源:UIEdit.cpp

示例3: Init

void CEditWnd::Init(CEditUI* pOwner)
{
    m_pOwner = pOwner;
    RECT rcPos = CalPos();
    UINT uStyle = WS_CHILD | ES_AUTOHSCROLL;

    if (m_pOwner->IsPasswordMode()) uStyle |= ES_PASSWORD;
    
	Create(m_pOwner->GetManager()->GetPaintWindow(), NULL, uStyle, 0, rcPos);
    SetWindowFont(m_hWnd, m_pOwner->GetManager()->GetFontInfo(m_pOwner->GetFont())->hFont, TRUE);
    Edit_LimitText(m_hWnd, m_pOwner->GetMaxChar());
    
	if (m_pOwner->IsPasswordMode()) Edit_SetPasswordChar(m_hWnd, m_pOwner->GetPasswordChar());
    
	Edit_SetText(m_hWnd, m_pOwner->GetText());
    Edit_SetModify(m_hWnd, FALSE);
    
	SendMessage(EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELPARAM(0, 0));
    Edit_Enable(m_hWnd, m_pOwner->IsEnabled() == true);
    Edit_SetReadOnly(m_hWnd, m_pOwner->IsReadOnly() == true);
    
	::ShowWindow(m_hWnd, SW_SHOWNOACTIVATE);
    ::SetFocus(m_hWnd);
    m_bInit = true;
}
开发者ID:Zhuguoping,项目名称:directui,代码行数:25,代码来源:UIEdit.cpp

示例4: OnBtnNetSegmentAdd

void CSettingDlg::OnBtnNetSegmentAdd()
{
	CEditUI*	pEditNetSegment = static_cast<CEditUI*>(m_PaintManager.FindControl(_T("edit_netsegment")));
	CListUI*	pListNetSegment = static_cast<CListUI*>(m_PaintManager.FindControl(_T("list_netsegment")));
	
	ASSERT(pEditNetSegment != NULL && pListNetSegment != NULL);
	
	CDuiString	strText = pEditNetSegment->GetText();
	if (strText.IsEmpty())
	{
		return ;
	}
	//DUI__Trace(_T("inet_addr(strText) = 0x%08X."), inet_addr(strText));
	// inet_addr(strText) == INADDR_NONE 并不能判断,比如输入一个"1",inet_addr会返回0x01000000 [12/27/2014 ybt]
	if (!IsValidAddrString(strText))
	{
		MessageBox(m_hWnd, _T("请输入正确的IP地址."), APPNAME_STR, MB_OK);
		return ;
	}
	pEditNetSegment->SetText(_T(""));
	CListLabelElementUI* pLableElement = new CListLabelElementUI;
	pLableElement->SetText(strText);
	pListNetSegment->Add(pLableElement);
	m_bNetworkChange = TRUE;
}
开发者ID:ybtq,项目名称:FxIM,代码行数:25,代码来源:SettingDlg.cpp

示例5: GetTalkInputMessage

//获得聊天框输入的内容
int CRightFrame::GetTalkInputMessage(char* szMsg)
{
	CEditUI* pEditCtrl = static_cast<CEditUI*>(m_pm.FindControl("Talk_Edt_Inp"));
	if (!pEditCtrl)
	{
		return 0;
	}

	if (szMsg)
	{
		strcpy(szMsg,pEditCtrl->GetText().GetData());
	}

	return pEditCtrl->GetText().GetLength();

}
开发者ID:liuwanbing,项目名称:liuwanbing,代码行数:17,代码来源:RightFrame.cpp

示例6: Notify

void ZYGroupCreator::Notify(TNotifyUI& msg) {
	if (!_tcscmp(msg.sType, _T("windowinit"))) {
		::SetWindowLong(m_hWnd, GWL_STYLE, ::GetWindowLong(m_hWnd, GWL_STYLE) & ~WS_CAPTION | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);
	}
	else if (!_tcscmp(msg.sType, _T("click"))) {
		if (!_tcscmp(msg.pSender->GetName(), _T("closebutton")) || !_tcscmp(msg.pSender->GetName(), _T("cancelbutton"))) {
			Close();
		} else if (!_tcscmp(msg.pSender->GetName(), _T("okbutton"))) {
			CEditUI *edit;
			if ((edit = (CEditUI *) m_paintManagerUi.FindControl(_T("groupname")))) {
				CStdString sql;
				CStdString groupname = edit->GetText();
				if (!groupname.IsEmpty()) {
					sql.Format(_T("INSERT INTO `group` (name) VALUES ('%s'); "), groupname.GetData());
					if (ZYDbHelper::GetInstance()->Query(sql.GetData(), NULL)) {
						if (m_cb) {
							m_cb->OnGroup(groupname.GetData());
						}
						Close();
					}
				}
			}
		}
	}
}
开发者ID:yuechuanbingzhi163,项目名称:WallpaperPlusplus,代码行数:25,代码来源:ZYGroupCreator.cpp

示例7: AddExpressionToTalkInput

//添加表情到聊天输入框
void CRightFrame::AddExpressionToTalkInput(char* szExpression)
{
	CEditUI* pEditCtrl = static_cast<CEditUI*>(m_pm.FindControl("Talk_Edt_Inp"));

	CStdString str = pEditCtrl->GetText();
	str += szExpression;

	pEditCtrl->SetText(str);

	return;
}
开发者ID:liuwanbing,项目名称:liuwanbing,代码行数:12,代码来源:RightFrame.cpp

示例8: OnKillFocusSignature

void MainFrame::OnKillFocusSignature(TNotifyUI& msg)
{
	msg.pSender->SetVisible(false);
	CControlUI* signature_tip = m_PaintManager.FindControl(kSignatureTipsControlName);
	if (signature_tip != NULL)
	{
		CEditUI* signature = static_cast<CEditUI*>(msg.pSender);
		if (signature != NULL)
			signature_tip->SetText(signature->GetText());
		signature_tip->SetVisible(true);
	}
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:12,代码来源:main_frame_event.cpp

示例9: MessageHandler

LRESULT CLoginFrameWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled)
{
	if( uMsg == WM_KEYDOWN ) {
		if( wParam == VK_RETURN ) {
			CEditUI* pEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("accountedit")));
			if( pEdit->GetText().IsEmpty() ) pEdit->SetFocus();
			else {
				pEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("pwdedit")));
				if( pEdit->GetText().IsEmpty() ) pEdit->SetFocus();
				else Close();
			}
			return true;
		}
		else if( wParam == VK_ESCAPE ) {
			PostQuitMessage(0);
			return true;
		}

	}
	return false;
}
开发者ID:killbug2004,项目名称:DvrWorkstation,代码行数:21,代码来源:CLoginFrameWnd.cpp

示例10: OnQueryPartner

void CSearchBussinessPartnerPage::OnQueryPartner()
{
	m_pBtnQuery->SetEnabled(false);
	if (!m_strFindPhoneNo.empty())
	{
		CMsgBox* pMsgBox = new CMsgBox("查找", "正在查找......",  MSGBOX_ICON_WARNING);
		pMsgBox->ShowModal(this->GetHWND());
		return;
	}
	

	CEditUI* pUsername = static_cast<CEditUI*>(m_PaintManager.FindControl(edit_phone));
	m_strFindPhoneNo = pUsername->GetText().GetData();
	if (m_strFindPhoneNo.empty())
	{
		CMsgBox* pMsgBox = new CMsgBox("查找", "请输入手机号",  MSGBOX_ICON_WARNING);
		pMsgBox->ShowModal(this->GetHWND());
		m_pBtnQuery->SetEnabled(true);
		return;
	}
	
	if (!CRegexHelper::IsValidMobileNo(m_strFindPhoneNo.c_str()))
	{
		CMsgBox* pMsgBox = new CMsgBox("查找", "输入的手机号码格式错误",  MSGBOX_ICON_WARNING);
		pMsgBox->ShowModal(this->GetHWND());
		m_strFindPhoneNo.clear();
		m_pBtnQuery->SetEnabled(true);
		return;
	}
	
	if (CWebClient::IsValidUser(m_strFindPhoneNo))
	{
		CController::Instance()->GetUserInfoMgr()->FetchVCardByAccount(m_strFindPhoneNo);		
	}
	else
	{
		ClearSearchResult();			
		CMsgBox* pMsgBox = new CMsgBox("查找联系人", "该用户还不是平台用户,是否需要邀请其加入平台?", MSGBOX_ICON_ASK, MSGBOX_IDYES|MSGBOX_IDNO);
		if (MSGBOX_IDYES == pMsgBox->ShowModal(this->GetHWND()))
		{
			tstring strErrDes;
			if (CWebClient::InviteBussinessParter(m_strFindPhoneNo, strErrDes))
			{
					CMsgBox* pMsgBox = new CMsgBox("添加商业伙伴", "添加商业伙伴成功");
					pMsgBox->ShowModal();
			}		
		}
		m_strFindPhoneNo.clear();
		m_pBtnQuery->SetEnabled(true);
	}	
}
开发者ID:Hopedream,项目名称:mm-win,代码行数:51,代码来源:SearchBussinessPartnerPage.cpp

示例11: MessageHandler

LRESULT CSelectOnlineUserWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled)
{

	if (uMsg == WM_KEYDOWN) {
		if (wParam == VK_RETURN) {
			CEditUI* pEdit = static_cast<CEditUI*>(m_pm.FindControl(DEF_ACCOUNT_ID_EDIT));
			if (pEdit->GetText().IsEmpty()) pEdit->SetFocus();
			else {
				pEdit = static_cast<CEditUI*>(m_pm.FindControl(DEF_PASSWORD_TEXT_EDIT));
				if (pEdit->GetText().IsEmpty()) pEdit->SetFocus();
				//else Close();
			}
			return true;
		}
		else if (wParam == VK_ESCAPE) {
			//PostQuitMessage(0);
			return true;
		}

	}

	return false;
}
开发者ID:StrokeAce,项目名称:YunKa_New,代码行数:23,代码来源:select_online_user_wnd.cpp

示例12: DoApplyData

void RedisConfigUI::DoApplyData()
{
	CEditUI exampleEditUI;
	CComboUI exampleComboUI;

	RedisClient::TDicConfig::const_iterator it = m_dicConfig.begin();
	RedisClient::TDicConfig::const_iterator itend = m_dicConfig.end();
	RedisClient::TDicConfig config;
	for ( ; it!=itend; ++it)
	{
		CDuiString name = _T("redisconfig_");
		CDuiString key = CharacterSet::ANSIToUnicode(it->first).c_str();	
		name.Append(key);
		CControlUI* pCtl = GetPaintMgr()->FindControl(name);

		string val ;
		if (pCtl->GetClass() == exampleEditUI.GetClass())
		{
			CEditUI* pEdit = static_cast<CEditUI*> (pCtl);
			val = CharacterSet::UnicodeToANSI(pEdit->GetText().GetData());
		}
		else if (pCtl->GetClass() == exampleComboUI.GetClass())
		{
			CComboUI* pCombo = static_cast<CComboUI*> (pCtl);
			int idx = pCombo->GetCurSel();
			if (it->first == "loglevel")
			{
				if (idx == 0) val = "debug";
				else if (idx == 1) val = "verbose";
				else if (idx == 2) val = "notice";
				else if (idx == 3) val = "warning";
			}
			else 
			{
				if (idx == 0) val = "yes";
				else if (idx == 1) val = "no";
			}
		}
		if (val != it->second)
		{
			config.insert(std::make_pair(it->first, val));
		}
	}
	if (SetConfig(config) && GetConfig())
	{
		DoFillData();
	}
}
开发者ID:PsyduckMans,项目名称:RedisStudio,代码行数:48,代码来源:RedisConfigUI.cpp

示例13: DuiControl

int     CZiMainFrame::OnReturnSearch(TNotifyUI & msg)
{
	CEditUI  * pSearchEdit  = DuiControl(CEditUI,  _T("SearchEdit"));
	CComboUI * pSearchCombo = DuiControl(CComboUI, _T("SearchCombo"));

	Assert(pSearchEdit && pSearchCombo);

	LPCTSTR    ptsItemName = pSearchEdit->GetText().GetData();
	if(!ptsItemName) return 0;

	if (wcscmp(ptsItemName, m_itemSelfInfo.tstrNickName.c_str()) == 0) {
		return 0;
	}

	// 增加 pSearchCombo 列表并显示. 
	// 测试代码 ***
	//AddComboItem(_T("111111"));
	//return 0;

	ImcNodeList_t nodeList;
	int size = pSearchCombo->GetCount();
	ClearComboItem();
	m_searchNodes.clear();
	SearchFriendsNode(ptsItemName, m_searchNodes);

	for(ImcNodeList_t::iterator it = m_searchNodes.begin(); 
		it != m_searchNodes.end(); it++)
	{
		ItemNodeInfo_t & itemInfo = (*it)->GetNodeData();
		if(itemInfo.Type() == Type_ImcFriend || 
			itemInfo.Type() == Type_ImcFriendX)
		{
			Assert(!itemInfo.IsInvalid());
			if(::_tcsstr(itemInfo.tstrNickName.c_str(), ptsItemName))
			{
				AddComboItem(itemInfo.tstrNickName.c_str());
			}
		}
	}

	// 不能够显示出来 list 的内容来, 不知道为什么 ?
	// HWND hF = ::GetFocus();
	::SendMessage(::GetFocus(), WM_KILLFOCUS, 0, 0);
	pSearchCombo->SetFocus();
	pSearchCombo->Activate();
	return 0;
}
开发者ID:yuechuanbingzhi163,项目名称:zimc,代码行数:47,代码来源:MainWindow.cpp

示例14: OnTextChanged

void MainDialog::OnTextChanged(TNotifyUI& msg)
{
	if (msg.pSender->GetName() == _T("editSearch"))
	{
		CEditUI* pCEditUI = static_cast<CEditUI*>(m_PaintManager.FindControl(_T("editSearch")));
		CControlUI* pMainListLayout = m_PaintManager.FindControl(_T("MainListLayout"));
		if (pMainListLayout && pCEditUI)
		{
			if (!pCEditUI->GetText().IsEmpty())
			{
				pMainListLayout->SetVisible(false);
			}
			else
			{
				pMainListLayout->SetVisible(true);
			}
		}
	}
}
开发者ID:hlyces,项目名称:teamtalk_TT,代码行数:19,代码来源:MainDialog.cpp

示例15: Notify

void CModifyMemoWnd::Notify(TNotifyUI& msg)
{
	if (_tcsicmp(msg.sType, _T("click")) == 0)
	{
		CDuiString strControlName = msg.pSender->GetName();

		//关闭界面
		if (_tcsicmp(msg.pSender->GetName(), memo_btn_close) == 0)
		{
			PostMessage(WM_CLOSE);
		}
		else if (_tcsicmp(msg.pSender->GetName(), memo_btn_ok) == 0)
		{
			//修改备注名
			CEditUI* pEditMemo = static_cast<CEditUI*>(m_PaintManager.FindControl(memo_edit));
			if (NULL != pEditMemo)
			{
				m_strNewMemo = pEditMemo->GetText();
			}

			if (_tcsicmp(m_strNewMemo.c_str(), m_strCurMemo.c_str())==0)
			{

			}
			else
			{
				char* pAccount = new char[256];
				memset(pAccount, 0, 256);
				strcpy(pAccount, m_strAccount.c_str());

				char* pMemo =new char[256];
				memset(pMemo, 0, 256);
				strcpy(pMemo, m_strNewMemo.c_str());

				::SendMessage(m_hMainWnd, WM_MEMO_UPDATE, (WPARAM)pAccount, (LPARAM)pMemo);
			}
			
			PostMessage(WM_CLOSE);
			//PostMessage(WM_CLOSE, (WPARAM)MB_RETURN_OK);
		}
	}
}
开发者ID:Hopedream,项目名称:mm-win,代码行数:42,代码来源:ModifyMemoWnd.cpp


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