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


C++ CPaintManagerUI::FindControl方法代码示例

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


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

示例1: InitWindow

void CSDKLoginWithSSOUIGroup::InitWindow(CPaintManagerUI& ui_mgr, CSDKLoginUIMgr* main_frame_)
{
	m_loginWithSSOPage = static_cast<CVerticalLayoutUI* >(ui_mgr.FindControl(_T("panel_Login_With_SSO")));
	m_editSSOtoken = static_cast<CRichEditUI* >(ui_mgr.FindControl(_T("edit_sso_token")));

	m_login_bottom = static_cast<CVerticalLayoutUI* >(ui_mgr.FindControl(_T("panel_Login_Buttom")));
	m_btnLogin = static_cast<CButtonUI* >(ui_mgr.FindControl(_T("btn_login")));
	m_chkRemember = static_cast<CCheckBoxUI* >(ui_mgr.FindControl(_T("chk_remember_me")));
	m_parentFrame = main_frame_;
}
开发者ID:zoomvideo,项目名称:Windows,代码行数:10,代码来源:LOGIN_sdk_login_UI.cpp

示例2: UIModify

void CALLBACK CUICommandHistory::UIModify(TiXmlNode* pNode)
{
	TiXmlElement* pElement = pNode->ToElement();
	CStringA strName = pElement->Attribute("myname");
	pElement->RemoveAttribute("myname");
	if(strName.IsEmpty())
		return;

	CPaintManagerUI* pManager = g_pMainFrame->GetActiveUIView()->GetPaintManager();
	CControlUI* pControl = pManager->FindControl(StringConvertor::Utf8ToWide(strName));
	TiXmlAttribute* pAttrib = pElement->FirstAttribute();
	if(pControl == NULL)
		return;

	while(pAttrib)
	{
		if(strcmp(pAttrib->Name(), "name") == 0)
		{
			pManager->ReapObjects(pControl);
			g_pClassView->RenameUITreeItem(pControl, StringConvertor::Utf8ToWide(pAttrib->Value()));
			pControl->SetAttribute(StringConvertor::Utf8ToWide(pAttrib->Name())
				, StringConvertor::Utf8ToWide(pAttrib->Value()));
			pManager->InitControls(pControl);
		}
		else
			pControl->SetAttribute(StringConvertor::Utf8ToWide(pAttrib->Name())
				, StringConvertor::Utf8ToWide(pAttrib->Value()));

		pAttrib = pAttrib->Next();
	}
	CControlUI* pParent = pControl->GetParent();
	if(pParent == NULL)
		pParent = pControl;
	pParent->SetPos(pParent->GetPos());
}
开发者ID:DayDayUpCQ,项目名称:misc,代码行数:35,代码来源:UICommandHistory.cpp

示例3: UIAdd

void CALLBACK CUICommandHistory::UIAdd(TiXmlNode* pNode)
{
	TiXmlElement* pElement = pNode->ToElement();
	CStringA strParentName = pElement->Attribute("parentname");
	pElement->RemoveAttribute("parentname");
	if(strParentName.IsEmpty())
		return;

	CUIDesignerView* pUIView = g_pMainFrame->GetActiveUIView();
	CPaintManagerUI* pManager = pUIView->GetPaintManager();
	CControlUI* pParentControl = pManager->FindControl(StringConvertor::Utf8ToWide(strParentName));
	if(pParentControl == NULL)
		return;

	TiXmlDocument xmlDoc;
	TiXmlDeclaration Declaration("1.0","utf-8","yes");
	xmlDoc.InsertEndChild(Declaration);
	TiXmlElement* pRootElem = new TiXmlElement("UIAdd");
	pRootElem->InsertEndChild(*pElement);
	xmlDoc.InsertEndChild(*pRootElem);
	TiXmlPrinter printer;
	xmlDoc.Accept(&printer);
	delete pRootElem;

	CDialogBuilder builder;
	CControlUI* pRoot=builder.Create(StringConvertor::Utf8ToWide(printer.CStr()), (UINT)0, NULL, pManager);
 	if(pRoot)
		pUIView->RedoUI(pRoot, pParentControl);
}
开发者ID:DayDayUpCQ,项目名称:misc,代码行数:29,代码来源:UICommandHistory.cpp

示例4: ViHwFindControl

// 脚本调用原型:
// VApiHandle VApiHwFindControl(HANDLE hWnd, string CtrlName);
SQInteger ViHwFindControl(HSQUIRRELVM v)
{
	VApiHandle       hRet           = 0;
	const SQChar*    szCtrlName    = NULL;
	SQInteger        nargs         = sq_gettop(v);
    SQInteger        nWnd          = 0;
    HANDLE           hWnd          = NULL;
	CScriptMgr*      pMgr          = NULL;
    CPaintManagerUI* pPM           = NULL;

	if (!v || 2 + 1 != nargs) {goto _Exit_;}

	if (OT_INTEGER != sq_gettype(v, 2)) {goto _Exit_;}
    if (OT_STRING != sq_gettype(v, 3)) {goto _Exit_;}

	sq_getinteger(v, 2, &nWnd);
    sq_getstring(v, 3, &szCtrlName);

    if (-1 == nWnd) {
        pMgr = (CScriptMgr*)sq_getforeignptr(v);
        if (!pMgr) {goto _Exit_;}
        pPM = pMgr->GetManager();
    } else {
        pPM = QiHwHandleToWin(nWnd)->pWinObj->GetPM();
    }
    if (!pPM) {goto _Exit_;}

	// fixbug - 未验证pm合法性
	hRet = QiHwCtrlToHandle(pPM->FindControl(szCtrlName));

_Exit_:
	sq_pushinteger(v, hRet);
	return 1;
}
开发者ID:eriser,项目名称:kdguigl,代码行数:36,代码来源:Scriptapi.cpp

示例5: TypeInit

void CNotice::TypeInit(TNotifyUI& msg)
{
	CPaintManagerUI* pPaintMgrUI = GetPaintMgr();
	ASSERT(pPaintMgrUI);
	
	CTextUI* pLabel = static_cast<CTextUI*>(pPaintMgrUI->FindControl(noticeView::kUser));
	if(pLabel){ 		
		pLabel->SetText(m_strText);
	}
	int iWidth = GetSystemMetrics(SM_CXSCREEN);
	int iHeight = GetSystemMetrics(SM_CYSCREEN);//计算的屏幕客户工作区域
	MONITORINFO oMonitor = {};
	oMonitor.cbSize = sizeof(oMonitor);
	::GetMonitorInfo(::MonitorFromWindow(*this, MONITOR_DEFAULTTOPRIMARY), &oMonitor);
	CDuiRect rcWork = oMonitor.rcWork;
	RECT rcWnd;
	SIZE szInit = GetPaintMgr()->GetInitSize();

	rcWnd.right = rcWork.right-1;
	rcWnd.left = rcWnd.right-szInit.cx;
	rcWnd.bottom = rcWork.bottom -1;
	rcWnd.top = rcWnd.bottom-szInit.cy;

//	MoveWindow(&rcWnd);
	HWND hWnd = GetForegroundWindow();
	SetWindowPos(HWND_TOPMOST,&rcWnd,SWP_NOACTIVATE);
	SetForegroundWindow(hWnd);
	/* 设置初始皮肤 */
}
开发者ID:hjhong,项目名称:MyDuiLib,代码行数:29,代码来源:notice.cpp

示例6: UIDelete

void CALLBACK CUICommandHistory::UIDelete(TiXmlNode* pNode)
{
	TiXmlElement* pElement = pNode->ToElement();
	CStringA strName = pElement->Attribute("myname");
	if(strName.IsEmpty())
		return;

	CUIDesignerView* pUIView = g_pMainFrame->GetActiveUIView();
	CPaintManagerUI* pManager = pUIView->GetPaintManager();
	CControlUI* pControl = pManager->FindControl(StringConvertor::Utf8ToWide(strName));
	if(pControl == NULL)
		return;
	CControlUI* pParent=pControl->GetParent();
	HTREEITEM hDelete=(HTREEITEM)(((ExtendedAttributes*)pControl->GetTag())->hItem);
	g_pClassView->RemoveUITreeItem(hDelete);
 	pUIView->DeleteUI(pControl);
	if(pParent)
		pParent->NeedUpdate();
}
开发者ID:DayDayUpCQ,项目名称:misc,代码行数:19,代码来源:UICommandHistory.cpp

示例7: SetUIValue

void CPropertiesWnd::SetUIValue(CMFCPropertyGridProperty* pProp,int nTag)
{
	CControlUI* pControl = m_wndUIProperties.GetCurUI();
	if(pControl == NULL)
		return;

	int nUpdate=UPDATE_REDRAW_CONTROL;
	CString strName=pProp->GetName();
	strName.MakeLower();
	CString strNewVal;
	CString strOldVal;
	strNewVal = pProp->FormatProperty();
	strOldVal = m_wndUIProperties.FormatOrigProperty(pProp);
	if(nTag!=tagName && nTag!=tagText && strName.Find(_T("image"))==-1)
	{
		strNewVal.MakeLower();
		strOldVal.MakeLower();
	}

	switch(nTag)
	{
	case tagName:
		{
			CPaintManagerUI* pManager = g_pMainFrame->GetActiveUIView()->GetPaintManager();
			if(strNewVal.IsEmpty() || pManager->FindControl(strNewVal))
			{
				if(!strNewVal.IsEmpty())
					MessageBox(strNewVal + _T(" 名称已被其他控件使用!"));
				pProp->SetValue((_variant_t)pControl->GetName());
				return;
			}
			else
				pManager->ReapObjects(pControl);

			g_pClassView->RenameUITreeItem(pControl, strNewVal);
			break;
		}
	case tagPos:
	case tagPadding:
		SetPropValue(pControl,tagSize);

		nUpdate=UPDATE_POS;
		break;
	case tagSize:
	case tagMinSize:
	case tagMaxSize:
	case tagMinMax:
		SetUIValue(pProp->GetSubItem(0),-1);
		SetUIValue(pProp->GetSubItem(1),-1);
		SetPropValue(pControl,tagPos);

		nUpdate=UPDATE_POS;
		break;
	case tagFloat:
	case tagColumns:
		nUpdate=UPDATE_POS;
		break;
	case tagVisible:
		nUpdate=UPDATE_REDRAW_PARENT;
		break;
	case tagListHeader:
		if (strNewVal.Compare(_T("false"))==0)
		{
			strNewVal = _T("hidden");
		}
		break;
	case tagAlpha:
		{
			int alpha=_ttoi(strNewVal);
			if (alpha<0)
			{
				strNewVal=_T("0");
				pProp->SetValue((_variant_t)(LONG)0);
			}
			else
			{
				strNewVal=_T("255");
				pProp->SetValue((_variant_t)(LONG)255);
			}
			break;
		}
	}

	CUIDesignerView* pUIView=g_pMainFrame->GetActiveUIView();
	ASSERT(pUIView);
	TNotifyUI Msg;
	UIAttribute oldAttrib = {strName, strOldVal};
	Msg.pSender=pControl;
	Msg.sType=_T("PropertyBeginChanged");
	Msg.wParam=0;
	Msg.lParam=(LPARAM)&oldAttrib;
	pUIView->Notify(Msg);

	pControl->SetAttribute(strName,strNewVal);
	pProp->SetOriginalValue(pProp->GetValue());

	UIAttribute newAttrib = {strName, strNewVal};
	Msg.sType = _T("PropertyEndChanged");
	Msg.lParam = (LPARAM)&newAttrib;
	pUIView->Notify(Msg);
//.........这里部分代码省略.........
开发者ID:DeltaYang,项目名称:duilib,代码行数:101,代码来源:PropertiesWnd.cpp


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