void CUIProperties::InitPropList()
pProp=new CMFCPropertyGridProperty(_T("Class"),(_variant_t)_T(""),_T("控件的类型"),tagClass);//class
pPropUI->AddSubItem(pProp);
void CUIProperties::ShowControlProperty(CControlUI* pControl)
{
ASSERT(pControl);
CMFCPropertyGridProperty* pPropControl=m_wndPropList.FindItemByData(classControl,FALSE);
ASSERT(pPropControl);
//class
CString strClass = pControl->GetClass();
strClass = strClass.Mid(0, strClass.GetLength() - 2);
pPropControl->GetSubItem(tagClass-tagControl)->SetValue((_variant_t)strClass);
pPropControl->GetSubItem(tagClass-tagControl)->SetOriginalValue((_variant_t)strClass);
void CLayoutManager::SaveProperties(CControlUI* pControl, TiXmlElement* pParentNode
, BOOL bSaveChildren/* = TRUE*/)
{
if((pControl == NULL) || (pParentNode == NULL))
return;
CString strClass = pControl->GetClass();
strClass = strClass.Mid(0, strClass.GetLength() - 2);
文档信息
- 本文作者:zhupite
- 本文链接:https://zhupite.com/duilib/duilib-clayoutmanager-saveproperties.html
- 版权声明:自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)