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


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

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


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

示例1: SetControlData

NSDUILIB_API void  SetControlData(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
{
	TCHAR controlName[MAX_PATH];
	TCHAR controlData[MAX_PATH];
	TCHAR dataType[MAX_PATH];

	EXDLL_INIT();

	ZeroMemory(controlName, MAX_PATH*sizeof(TCHAR));
	ZeroMemory(controlData, MAX_PATH*sizeof(TCHAR));
	ZeroMemory(dataType, MAX_PATH*sizeof(TCHAR));

	popstring( controlName,sizeof(controlName));
	popstring( controlData,sizeof(controlData));
	popstring( dataType,sizeof(dataType));

	CControlUI* pControl = static_cast<CControlUI*>(g_pFrame->GetPaintManager().FindControl( controlName ));
	if( pControl == NULL )
		return;

	if( _tcsicmp( dataType, _T("text") ) == 0 )
	{
		if( _tcsicmp( controlData, _T("error")) == 0 || _tcsicmp( controlData, _T("")) == 0 )
			pControl->SetText( pControl->GetText() );
		else
			pControl->SetText( controlData );
	}
	else if( _tcsicmp( dataType, _T("bkimage") ) == 0 )
	{
		if( _tcsicmp( controlData, _T("error")) == 0 || _tcsicmp( controlData, _T("")) == 0 )
			pControl->SetBkImage( pControl->GetBkImage());
		else
			pControl->SetBkImage( controlData );
	}
	else if( _tcsicmp( dataType, _T("link") ) == 0 )
	{
		g_controlLinkInfoMap[controlName] = controlData;
	}
	else if( _tcsicmp( dataType, _T("enable") ) == 0 )
	{
		if( _tcsicmp( controlData, _T("true")) == 0 )
			pControl->SetEnabled( true );
		else if( _tcsicmp( controlData, _T("false")) == 0 )
			pControl->SetEnabled( false );
	}
	else if( _tcsicmp( dataType, _T("visible") ) == 0 )
	{
		if( _tcsicmp( controlData, _T("true")) == 0 )
			pControl->SetVisible( true );
		else if( _tcsicmp( controlData, _T("false")) == 0 )
			pControl->SetVisible( false );
	}
}
开发者ID:liao0818,项目名称:nsduilib,代码行数:53,代码来源:nsduilib.cpp

示例2: ViCbGetText

// wchar* ViCbGetText(VApiHandle hWnd)
SQInteger ViCbGetText(HSQUIRRELVM v)
{
	SQInteger      nargs         = sq_gettop(v);
	SQInteger      Handle        = 0;
	CControlUI*    pCtrl         = NULL;
	CStdString     sName;
	if (!v || 1 + 1 != nargs) {goto _Exit_;}
	if (OT_INTEGER != sq_gettype(v, 2)) {goto _Exit_;}
	
	sq_getinteger(v, 2, &Handle);
	pCtrl = QiHwHandleToCtrl(Handle);
	if (!pCtrl) {goto _Exit_;}
	sName = pCtrl->GetText();
	
_Exit_:
	sq_pushstring(v, sName.GetData(), sName.GetLength());
	return 1;
}
开发者ID:eriser,项目名称:kdguigl,代码行数:19,代码来源:Scriptapi.cpp

示例3: DoPressEnterKey

void CSDKMeetingChatUIMgr::DoPressEnterKey()
{
	std::wstring chat_info;
	if (m_input_content)
	{
		chat_info = std::wstring(m_input_content->GetText().GetData());
		m_input_content->SetText(L"");
	}
	unsigned int user_id = 0;
	if (m_pUserList && m_pUserListCombox)
	{
		CControlUI* pCurrentSelect = m_pUserListCombox->GetItemAt(m_pUserListCombox->GetCurSel());
		LPCTSTR user_name = pCurrentSelect->GetText().GetData();
		ZOOM_SDK_NAMESPACE::IUserInfo* pUserInfo = m_pUserList->GetUserByName(user_name);
		if (pUserInfo)
		{
			user_id = pUserInfo->GetUserID();
		}
	}

	std::wstring show_info;
	if (SendChatMsg(user_id, const_cast<wchar_t* >(chat_info.c_str())))
	{
		if (user_id == 0)
		{
			show_info = std::wstring(L"From Me send to Everyone:\n")+chat_info+L"\n";
		}
		else
		{
			ZOOM_SDK_NAMESPACE::IUserInfo* pUserInfo = m_pUserList->GetUserByID(user_id);
			if (pUserInfo)
			{
				show_info = std::wstring(L"From Me send to ") +std::wstring(pUserInfo->GetUserName())+L":\n"+chat_info+L"\n";
			}
		}		
		if (m_show_chat_info)
		{
			m_show_chat_info->AppendText(show_info.c_str());
		}
	}
}
开发者ID:zoomvideo,项目名称:Windows,代码行数:41,代码来源:chat_controller_ui.cpp

示例4: GetControlData

NSDUILIB_API void  GetControlData(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
{
	TCHAR ctlName[MAX_PATH];
	TCHAR dataType[MAX_PATH];

	EXDLL_INIT();

	ZeroMemory(ctlName, MAX_PATH*sizeof(TCHAR));
	ZeroMemory(dataType, MAX_PATH*sizeof(TCHAR));
	popstring( ctlName ,sizeof(ctlName));
	popstring( dataType,sizeof(dataType));
	
	CControlUI* pControl = static_cast<CControlUI*>(g_pFrame->GetPaintManager().FindControl( ctlName ));
	if( pControl == NULL )
		return;

	TCHAR temp[MAX_PATH] = {0};
	_tcscpy( temp, pControl->GetText().GetData());
	if( _tcsicmp( dataType, _T("text") ) == 0 )
		pushstring( temp );
}
开发者ID:liao0818,项目名称:nsduilib,代码行数:21,代码来源:nsduilib.cpp

示例5: GetText

CStdString CDropDownUI::GetText() const
{
	if( m_iCurSel < 0 ) return _T("");
	CControlUI* pControl = static_cast<CControlUI*>(m_items[m_iCurSel]);
	return pControl->GetText();
}
开发者ID:kovrov,项目名称:scrap,代码行数:6,代码来源:UICombo.cpp


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