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


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

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


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

示例1: InitWindow

void CLoginWnd::InitWindow()
{
	COptionUI* pLeft = static_cast<COptionUI*>(m_PaintManager.FindControl(_T("remember")));
	COptionUI* pRight = static_cast<COptionUI*>(m_PaintManager.FindControl(_T("autolog")));
	CEditUI* pName = static_cast<CEditUI*>(m_PaintManager.FindControl(_T("account")));
	CEditUI* pPassWord = static_cast<CEditUI*>(m_PaintManager.FindControl(_T("password")));

	HANDLE hFile = CreateFile(L"..\\logstate.dat",GENERIC_WRITE|GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,0,NULL);
	if (hFile == INVALID_HANDLE_VALUE)
	{
		return;
	}
	char account[128];
	memset(account,0,sizeof(account));
	char password[128];
	memset(password,0,sizeof(password));
	char left[32];
	memset(left,0,sizeof(left));
	char right[32];
	memset(right,0,sizeof(right));
	DWORD num = 0;
	ReadFile(hFile,account,sizeof(account),&num,NULL);
	SetFilePointer(hFile,150,NULL,FILE_BEGIN);
	ReadFile(hFile,password,sizeof(password),&num,NULL);
	SetFilePointer(hFile,300,NULL,FILE_BEGIN);
	ReadFile(hFile,left,sizeof(left),&num,NULL);
	SetFilePointer(hFile,350,NULL,FILE_BEGIN);
	ReadFile(hFile,right,sizeof(right),&num,NULL);
	CloseHandle(hFile);
	if (strcmp(left,"yes")==0)
	{
		pLeft->Selected(true);
		WCHAR wAccount[256];
		memset(wAccount,0,sizeof(wAccount));
		WCHAR wPassword[256];
		memset(wPassword,0,sizeof(wPassword));
		CCommonConvert::Char2WChar(account,sizeof(account),wAccount);
		CCommonConvert::Char2WChar(password,sizeof(password),wPassword);
		pName->SetText(wAccount);
		pPassWord->SetText(wPassword);
	}
	if (strcmp(right,"yes")==0)
	{
		pRight->Selected(true);
		Login();
		HMODULE hd = ::GetModuleHandle(NULL);
		LPTSTR lpFileName = NULL;
		::GetModuleFileName(hd,lpFileName,MAX_PATH);
		::WritePrivateProfileString(_T("Windows"),_T("load"),lpFileName,_T("c:windows\\win.ini"));
	}
}
开发者ID:Forlearngit,项目名称:VisitorManager,代码行数:51,代码来源:LoginWnd.cpp

示例2: Init

void CLoginFrameWnd::Init() 
{
	CComboUI* pAccountCombo = static_cast<CComboUI*>(m_pm.FindControl(_T("accountcombo")));
	CEditUI* pAccountEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("accountedit")));
	if( pAccountCombo && pAccountEdit ) pAccountEdit->SetText(pAccountCombo->GetText());
	pAccountEdit->SetFocus();
}
开发者ID:killbug2004,项目名称:DvrWorkstation,代码行数:7,代码来源:CLoginFrameWnd.cpp

示例3: 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

示例4: ClearTalkInput

//清空聊天输入框
void CRightFrame::ClearTalkInput()
{
	CEditUI* pEditCtrl = static_cast<CEditUI*>(m_pm.FindControl("Talk_Edt_Inp"));
	if (pEditCtrl)
	{
		pEditCtrl->SetText(_T(""));
	}
}
开发者ID:liuwanbing,项目名称:liuwanbing,代码行数:9,代码来源:RightFrame.cpp

示例5: 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

示例6: Notify

void CLoginFrameWnd::Notify(TNotifyUI& msg)
{
	if( msg.sType == _T("click") ) {
		if( msg.pSender->GetName() == _T("closebtn") ) { PostQuitMessage(0); return; }
		else if( msg.pSender->GetName() == _T("loginBtn") ) { Close(); return; }
	}
	else if( msg.sType == _T("itemselect") ) {
		if( msg.pSender->GetName() == _T("accountcombo") ) {
			CEditUI* pAccountEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("accountedit")));
			if( pAccountEdit ) pAccountEdit->SetText(msg.pSender->GetText());
		}
	}
}
开发者ID:killbug2004,项目名称:DvrWorkstation,代码行数:13,代码来源:CLoginFrameWnd.cpp

示例7: ShowModal

UINT CModifyMemoWnd::ShowModal(HWND hParnt)
{
	Create(m_hWnd, (_T("")), UI_WNDSTYLE_DIALOG, UI_WNDSTYLE_EX_FRAME, 0, 0, 0, 0, NULL);		
	CenterWindow();

	//初始化备注
	CEditUI* pEditMemo = static_cast<CEditUI*>(m_PaintManager.FindControl(memo_edit));
	if (NULL != pEditMemo)
	{
		pEditMemo->SetText(m_strCurMemo.c_str());
	}

	return CWindowWnd::ShowModal();
}
开发者ID:Hopedream,项目名称:mm-win,代码行数:14,代码来源:ModifyMemoWnd.cpp

示例8: OnClickItem

bool CMainDialog::OnClickItem (void* pParam)
{
	TEventUI* pEvent = (TEventUI*)pParam;
	if (pEvent->Type == UIEVENT_BUTTONDOWN) {
		CComboUI* pcbx = static_cast <CComboUI*> (m_pm.FindControl(_T ("combo2")));
		CEditUI* pedit = static_cast <CEditUI*> (m_pm.FindControl(_T ("ComboEdit")));
		assert (pedit);
		CContainerUI*  pItem = static_cast <CContainerUI*> (pcbx->GetItemAt (pEvent->pSender->GetTag()));
		pedit->SetText(pItem->GetItemAt(2)->GetText());
	}
	else if (pEvent->Type == UIEVENT_MOUSEENTER) {
		pEvent->pSender->SetBkColor(0xFF00FF00);
	}
	else if (pEvent->Type == UIEVENT_MOUSELEAVE) {
		pEvent->pSender->SetBkColor(0xFFFFFFFF);
	}
	return true;
}
开发者ID:yiminyangguang520,项目名称:duilib,代码行数:18,代码来源:MainDialog.cpp

示例9: DoFillData

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

    RedisClient::TDicConfig::const_iterator it = m_dicConfig.begin();
    RedisClient::TDicConfig::const_iterator itend = m_dicConfig.end();

    for ( ; it!=itend; ++it)
    {
        CDuiString name = _T("redisconfig_");
        CDuiString key = Base::CharacterSet::ANSIToUnicode(it->first).c_str();
        CDuiString val = Base::CharacterSet::ANSIToUnicode(it->second).c_str();
        name.Append(key);
        CControlUI* pCtl = GetPaintMgr()->FindControl(name);

        /// xml中未配置该项
        if (pCtl == NULL) continue;

        if (pCtl->GetClass() == exampleEditUI.GetClass())
        {
            CEditUI* pEdit = static_cast<CEditUI*> (pCtl);
            pEdit->SetText(val);
        }
        else if (pCtl->GetClass() == exampleComboUI.GetClass())
        {
            CComboUI* pCombo = static_cast<CComboUI*> (pCtl);
            int idx = 0;
            if (val == _T("yes")) idx = 0;
            else if (val == _T("no")) idx = 1;
            else if (it->first == "loglevel")
            {
                string loglevel = it->second;
                if (loglevel == "debug") idx = 0;
                else if (loglevel == "verbose") idx = 1;
                else if (loglevel == "notice") idx = 2;
                else if (loglevel == "warning") idx = 3;
            }
            pCombo->SetInternVisible(true);
            pCombo->SelectItem(idx);
            pCombo->SetFocus();
        }
    }
}
开发者ID:247687009,项目名称:RedisStudio,代码行数:44,代码来源:RedisConfigUI.cpp

示例10: ShowWindow

void CModifyMemoWnd::ShowWindow(HWND hParent)
{
	m_hMainWnd = hParent;

	Create(hParent, _T("mmemo"), 
		WS_EX_TOOLWINDOW | WS_EX_TOPMOST, 
		WS_EX_TOOLWINDOW, 
		0, 0, 398,200);
	CenterWindow();

	//初始化备注
	CEditUI* pEditMemo = static_cast<CEditUI*>(m_PaintManager.FindControl(memo_edit));
	if (NULL != pEditMemo)
	{
		pEditMemo->SetText(m_strCurMemo.c_str());
	}

	return CWindowWnd::ShowWindow();
}
开发者ID:Hopedream,项目名称:mm-win,代码行数:19,代码来源:ModifyMemoWnd.cpp

示例11: DuiControl

int     CZiMainFrame::OnSelectSearch(TNotifyUI & msg)
{
	CEditUI  * pSearchEdit   = DuiControl(CEditUI,  _T("SearchEdit"));
	CComboUI * pSearchCombo  = DuiControl(CComboUI, _T("SearchCombo"));
	LPCTSTR    ptsSearchName = pSearchEdit->GetText().GetData();

	Assert(pSearchEdit && pSearchCombo);
	Assert(ptsSearchName);

	int        nIndex        = pSearchCombo->GetCurSel();
	if(nIndex < 0) return 0;

	CListLabelElementUI * pItem = static_cast<CListLabelElementUI*>(
		pSearchCombo->GetItemAt(nIndex));

	Assert(pItem);
	Assert(nIndex < (int)m_searchNodes.size());
	pSearchEdit->SetText(pItem->GetText());
	CreateChatDailog(m_searchNodes[nIndex]);

	return 0;
}
开发者ID:yuechuanbingzhi163,项目名称:zimc,代码行数:22,代码来源:MainWindow.cpp

示例12: OnReLoadTalkINI

//重读talkIngame.ini
void CRightFrame::OnReLoadTalkINI()
{
	CComboUI* pCobCtrl = static_cast<CComboUI*>(m_pm.FindControl("Talk_Cob_Inp"));
	CEditUI* pEditCtrl = static_cast<CEditUI*>(m_pm.FindControl("Talk_Edt_Inp"));
	if (!pCobCtrl || !pEditCtrl)
	{
		return;
	}

	//清除原来内容
	pCobCtrl->RemoveAll();

	CBcfFile f("talkInGame.bcf");
	CString key="BZW_TALK";
	CString szTalk;
	CString szNumber;
	int nIdx = 0;
	do
	{
		szNumber.Format("%d",++nIdx);
		szTalk = f.GetKeyVal(key,"T"+szNumber,"");
		if (!szTalk.IsEmpty())
		{
			CListLabelElementUI* p = new CListLabelElementUI();
			p->SetText(szTalk.GetBuffer());
			pCobCtrl->Add(p);
		}
	}
	while(!szTalk.IsEmpty());

	SIZE si = {-1,600};
	pCobCtrl->SetDropBoxSize(si);

	pEditCtrl->SetText(_T(""));

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

示例13: Notify

void imsdkDemoLogin::Notify(TNotifyUI& msg) {
    if (msg.sType == _T("click")) {
        if (msg.pSender == m_pCloseBtn) {
            PostQuitMessage(0);
            return;
        }
        if (msg.pSender == m_pLoginBtn) {
            CEditUI* pEditServer = static_cast<CEditUI*>(m_pm.FindControl(_T("editServer")));
            CEditUI* pEditAccount = static_cast<CEditUI*>(m_pm.FindControl(_T("editAccount")));
            CEditUI* pEditPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("editPassword")));
            std::string server = getString(pEditServer->GetText().GetData());
            std::string account = getString(pEditAccount->GetText().GetData());
            std::string password = getString(pEditPassword->GetText().GetData());
            gClientDemo.login(server, account, password, std::bind(&imsdkDemoLogin::onLoginCb, this, std::placeholders::_1));
            //Close(7);
        }
        if (msg.pSender == m_pSignCodeBtn) {
            CEditUI* pEditServer = static_cast<CEditUI*>(m_pm.FindControl(_T("signServer")));
            CEditUI* pEditPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("signPhone")));
            std::string server = getString(pEditServer->GetText().GetData());
            std::string phone = getString(pEditPhone->GetText().GetData());

            gClientDemo.getRegCode(server, phone);
            m_secGetSignCode = 30;
            m_pSignCodeBtn->SetEnabled(false);
            std::string strText = std::to_string(m_secGetSignCode) + "s后重试";
            auto strT = getWString(strText.c_str());
            m_pSignCodeBtn->SetText(strT.c_str());
            ::SetTimer(GetHWND(), 7, 1000, NULL);
        }
        if (msg.pSender == m_pSignUpBtn) {
            CEditUI* pEditAccount = static_cast<CEditUI*>(m_pm.FindControl(_T("signAccount")));
            CEditUI* pEditPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("signPassword")));
            CEditUI* pEditSignCode = static_cast<CEditUI*>(m_pm.FindControl(_T("signCode")));
            std::string account = getString(pEditAccount->GetText().GetData());
            std::string password = getString(pEditPassword->GetText().GetData());
            std::string signcode = getString(pEditSignCode->GetText().GetData());
            gClientDemo.reg(account, password, signcode);
        }
    }
    else if (msg.sType == _T("selectchanged")) {
        CDuiString name = msg.pSender->GetName();
        CTabLayoutUI* pControl = static_cast<CTabLayoutUI*>(m_pm.FindControl(_T("login")));
        if (name == _T("optLogin")){
            CEditUI* pEditAccount = static_cast<CEditUI*>(m_pm.FindControl(_T("editAccount")));
            CEditUI* pEditPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("editPassword")));
            pEditAccount->SetText(_T("手机号"));
            pEditPassword->SetText(_T("密码"));
            pControl->SelectItem(0);
        }
        else if (name == _T("optSignUp")) {
            CEditUI* pEditPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("signPhone")));
            CEditUI* pEditAccount = static_cast<CEditUI*>(m_pm.FindControl(_T("signAccount")));
            CEditUI* pEditPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("signPassword")));
            CEditUI* pEditSignCode = static_cast<CEditUI*>(m_pm.FindControl(_T("signCode")));
            pEditPhone->SetText(_T("手机号"));
            pEditAccount->SetText(_T("用户名"));
            pEditPassword->SetText(_T("密码"));
            pEditSignCode->SetText(_T("验证码"));

            pControl->SelectItem(1);
        }
    }
    else if (msg.sType == _T("return"))
    {
        // Enter键注册、登录
        CTabLayoutUI* pTab = static_cast<CTabLayoutUI*>(m_pm.FindControl(_T("login")));
        if (0 == pTab->GetCurSel()){
            //
            CEditUI* pEditServer = static_cast<CEditUI*>(m_pm.FindControl(_T("editServer")));
            CEditUI* pEditAccount = static_cast<CEditUI*>(m_pm.FindControl(_T("editAccount")));
            CEditUI* pEditPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("editPassword")));
            if (pEditPassword->IsFocused())
            {
                std::string server = getString(pEditServer->GetText().GetData());
                std::string account = getString(pEditAccount->GetText().GetData());
                std::string password = getString(pEditPassword->GetText().GetData());
                gClientDemo.login(server, account, password, std::bind(&imsdkDemoLogin::onLoginCb, this, std::placeholders::_1));
            }
            if (pEditAccount->IsFocused())
            {
                pEditPassword->SetFocus();
            }
        }
        else
        {
            CEditUI* pEditAccount = static_cast<CEditUI*>(m_pm.FindControl(_T("signAccount")));
            CEditUI* pEditPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("signPassword")));
            CEditUI* pEditSignCode = static_cast<CEditUI*>(m_pm.FindControl(_T("signCode")));
            std::string account = getString(pEditAccount->GetText().GetData());
            std::string password = getString(pEditPassword->GetText().GetData());
            std::string signcode = getString(pEditSignCode->GetText().GetData());
            gClientDemo.reg(account, password, signcode);
        }
    }
}
开发者ID:VRVIM,项目名称:VIM_PC_SDK,代码行数:96,代码来源:DemoLogin.cpp

示例14: Notify


//.........这里部分代码省略.........
			strKey.Format("%d",pGameFrame->m_pGameInfo->uNameID);

			//不能使用道具的游戏场判断
			if (pGameFrame->m_pGameInfo->dwRoomRule & GRR_NOTCHEAT)
				strMsg = _T("对不起,防作弊场不能使用道具!");
			else if (pGameFrame->m_pGameInfo->dwRoomRule & GRR_EXPERCISE_ROOM)
				strMsg = _T("对不起, 体验场(免费场)不能使用游戏道具!"); 
			else if (fsr.GetKeyVal (_T("BJLType"),strKey,0) > 0)
				strMsg = _T("对不起,无法在百人类游戏使用道具!");

			//提示
			if (strMsg != "")
			{
				ShowMessageTip(pButton,strMsg,BUBLE_ON_BOARDCAST_POS);
				return;
			}

			//弹出喇叭窗口
			if (!m_pBoardCastWnd)
			{
				m_pBoardCastWnd = new CUseBoardCastWnd();
				m_pBoardCastWnd->Create(m_hWnd,NULL,UI_WNDSTYLE_DIALOG,0,0,0,0,0,NULL);
				m_pBoardCastWnd->SetParentWnd(m_pRoom);
				m_pBoardCastWnd->CenterWindow();
				m_pBoardCastWnd->ShowModal();
				if (m_pBoardCastWnd != NULL)
				{
					delete m_pBoardCastWnd;
					m_pBoardCastWnd = NULL;
				}
			}
		}
	}

	else if(msg.sType == _T("return"))
	{
		if (msg.pSender->GetName() == "Talk_Edt_Inp")
		{
			CLoveSendClassInExe* pGameFrame = static_cast<CLoveSendClassInExe*>(m_pRoom);
			pGameFrame->SendTalkMessage();
			return;
		}
	}

	else if (msg.sType == _T("itemselect"))
	{
		if (msg.pSender == m_pUsersList->m_pListCtrl)
		{
			ShowUserInfo(m_pUsersList->GetUser(msg.wParam));
			return;
		}

		if( msg.pSender->GetName() == _T("Talk_Cob_Inp")) 
		{
			CEditUI* pEditCtrl = static_cast<CEditUI*>(m_pm.FindControl("Talk_Edt_Inp"));
			pEditCtrl->SetText(msg.pSender->GetText());

			CLoveSendClassInExe* pGameFrame = static_cast<CLoveSendClassInExe*>(m_pRoom);
			pGameFrame->SendTalkMessage(msg.wParam);

			return;
		}
	}

	else if (msg.sType == _T("menu"))
	{
		if (msg.pSender == m_pUsersList->m_pListCtrl)
		{
			OnPopupUserListMenu(msg.ptMouse);
			return;
		}
	}

	else if( msg.sType == _T("settext") ) 
	{
		if (msg.pSender == m_pTalkTempText)
		{
			m_pTalkTempText->SetVisible(false);
			OnTalkBufferReady(m_pTalkTempText->GetText(),msg.wParam);
			return;
		}

	}
	else if (msg.sType == _T("ScrollSetRange"))
	{
		if (m_pTalkBoxList)
		{
			if (msg.pSender == m_pTalkBoxList->GetVerticalScrollBar())
			{
				m_pTalkBoxList->Scroll(0,msg.wParam);
			}
		}

	}

// 	CString str;
// 	str.Format("DClient: Notify msg = %s",msg.sType);
// 	OutputDebugString(str);
	
}
开发者ID:liuwanbing,项目名称:liuwanbing,代码行数:101,代码来源:RightFrame.cpp

示例15: OnClick

void MainFrame::OnClick(TNotifyUI& msg)
{
	WindowImplBase::OnClick(msg);
	if (_tcsicmp(msg.pSender->GetName(), kHideLeftMainPannelControlName) == 0)
	{
		CControlUI* left_main_pannel = m_PaintManager.FindControl(kLeftMainPannelControlName);
		CControlUI* hide_left_main_pannel = m_PaintManager.FindControl(kHideLeftMainPannelControlName);
		CControlUI* show_left_main_pannel = m_PaintManager.FindControl(kShowLeftMainPannelControlName);
		if ((left_main_pannel != NULL) && (show_left_main_pannel != NULL) && (hide_left_main_pannel != NULL))
		{
			hide_left_main_pannel->SetVisible(false);
			left_main_pannel->SetVisible(false);
			show_left_main_pannel->SetVisible(true);
		}
	}
	else if (_tcsicmp(msg.pSender->GetName(), kShowLeftMainPannelControlName) == 0)
	{
		CControlUI* left_main_pannel = m_PaintManager.FindControl(kLeftMainPannelControlName);
		CControlUI* hide_left_main_pannel = m_PaintManager.FindControl(kHideLeftMainPannelControlName);
		CControlUI* show_left_main_pannel = m_PaintManager.FindControl(kShowLeftMainPannelControlName);
		if ((left_main_pannel != NULL) && (show_left_main_pannel != NULL) && (hide_left_main_pannel != NULL))
		{
			hide_left_main_pannel->SetVisible(true);
			left_main_pannel->SetVisible(true);
			show_left_main_pannel->SetVisible(false);
		}
	}
	else if (_tcsicmp(msg.pSender->GetName(), kSignatureTipsControlName) == 0)
	{
		msg.pSender->SetVisible(false);
		CEditUI* signature = static_cast<CEditUI*>(m_PaintManager.FindControl(kSignatureControlName));
		if (signature != NULL)
		{
			signature->SetText(msg.pSender->GetText());
			signature->SetVisible(true);
		}
	}
	else if (_tcsicmp(msg.pSender->GetName(), kSearchEditTipControlName) == 0)
	{
		msg.pSender->SetVisible(false);
		CEditUI* search_edit = static_cast<CEditUI*>(m_PaintManager.FindControl(kSearchEditControlName));
		if (search_edit != NULL)
		{
			search_edit->SetText(msg.pSender->GetText());
			search_edit->SetVisible(true);
		}
	}
	else if (_tcsicmp(msg.pSender->GetName(), kChangeBkSkinControlName) == 0)
	{
		CControlUI* background = m_PaintManager.FindControl(kBackgroundControlName);
		if (background != NULL)
		{
			TCHAR szBuf[MAX_PATH] = { 0 };
			++bk_image_index_;
			if (kBackgroundSkinImageCount < bk_image_index_)
				bk_image_index_ = 0;

			_stprintf_s(szBuf, MAX_PATH - 1, _T("file='bg%d.png' corner='600,200,1,1'"), bk_image_index_);

			background->SetBkImage(szBuf);

			SkinChangedParam param;
			CControlUI* background = m_PaintManager.FindControl(kBackgroundControlName);
			if (background != NULL)
			{
				param.bkcolor = background->GetBkColor();
				if (_tcslen(background->GetBkImage()) > 0)
				{
					_stprintf_s(szBuf, MAX_PATH - 1, _T("bg%d.png"), bk_image_index_);
				}

				param.bgimage = szBuf;
			}
			skin_changed_observer_.Broadcast(param);
		}
	}
	else if (_tcsicmp(msg.pSender->GetName(), kChangeColorSkinControlName) == 0)
	{
		CDuiRect rcWindow;
		GetWindowRect(m_hWnd, &rcWindow);
		rcWindow.top = rcWindow.top + msg.pSender->GetPos().bottom;
		new ColorSkinWindow(this, rcWindow);
	}
	else if (0 == _tcsicmp(msg.pSender->GetName(), _T("phone")))
	{
		logic::GetLogic()->asynNotifyObserver(module::KEY_LOGIN_USERID,10);
	}
	else if (0 == _tcsicmp(msg.pSender->GetName(), _T("QQpalycenter")))
	{
		logic::GetLogic()->removeObserver(this);
	}
	else if (0 == _tcsicmp(msg.pSender->GetName(), _T("MainMenu")))
	{
		CMenuWnd* pMenu = new CMenuWnd(m_hWnd);
		DuiLib::CPoint point = msg.ptMouse;
		ClientToScreen(m_hWnd, &point);
		STRINGorID xml(_T("menutest.xml"));
		pMenu->Init(NULL, xml, _T("xml"), point);
	}
	else if (0 == _tcsicmp(msg.pSender->GetName(), _T("ToolsBtn")))//设置按钮
//.........这里部分代码省略.........
开发者ID:hgl888,项目名称:TeamTalk,代码行数:101,代码来源:main_frame_event.cpp


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