﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>学习日记 &#187; duilib</title>
	<atom:link href="https://www.softwareace.cn/?feed=rss2&#038;tag=duilib" rel="self" type="application/rss+xml" />
	<link>https://www.softwareace.cn</link>
	<description>时刻想着为自己的产品多做一些对他好的事情</description>
	<lastBuildDate>Fri, 20 Mar 2026 06:58:28 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>Duilib技巧：背景图片平铺</title>
		<link>https://www.softwareace.cn/?p=1343</link>
		<comments>https://www.softwareace.cn/?p=1343#comments</comments>
		<pubDate>Wed, 10 Jun 2015 06:09:58 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[win32]]></category>
		<category><![CDATA[duilib]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1343</guid>
		<description><![CDATA[贴图的描述 方式有两种 // 1、aaa.jpg // 2、file=&#8217;aaa.jpg&#8217 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><span style="color: #ff0000;">贴图的描述</span></p>
<p><span style="color: #454545;">方式有两种<br />
// 1、aaa.jpg<br />
// 2、file=&#8217;aaa.jpg&#8217; res=&#8221; restype=&#8217;0&#8242; dest=&#8217;0,0,0,0&#8242; source=&#8217;0,0,0,0&#8242; corner=&#8217;0,0,0,0&#8242;<br />
// mask=&#8217;#FF0000&#8242; fade=&#8217;255&#8242; hole=&#8217;false&#8217; xtiled=&#8217;false&#8217; ytiled=&#8217;false&#8217;</span></p>
<p>第一种是最简单的，加载图片文件并将整张图片拉伸铺满整个控件<br />
第二种既支持从文件中加载图片，也可以从资源中加载<br />
1、如果是从文件加载，设置file属性，如file=&#8217;XXX.png&#8217;，不要写res和restype属性<br />
2、如果从资源加载，设置res和restype属性，不要设置file属性<br />
3、dest属性的作用是指定图片绘制在控件的一部分上面（绘制目标位置）<br />
4、source属性的作用是指定使用图片的一部分<br />
5、corner属性是指图片安装scale9方式绘制（scale9含义往下边看）<br />
6、mask属性是给不支持alpha通道的图片格式（如bmp）指定透明色<br />
7、fade属性是设置图片绘制的透明度<br />
8、hole属性是指定scale9绘制时要不要绘制中间部分（有些地方对提升性能比较有用）<br />
9、xtiled属性设置成true就是指定图片在x轴不要拉伸而是平铺，ytiled属性设置成true就是指定图片在y轴不要拉伸而是平铺</p>
<p>让背景图片平铺要写：xtiled=&#8217;true&#8217; ytiled=&#8217;true&#8217;</p>
<p style="color: #454545;">这个UI设计器是不识别的.</p>
<p style="color: #454545;">==================================================================</p>
<p><span style="color: #ff0000;">Scale9的含义</span></p>
<p>它是使用网格将图像划分为9个区域，如图2所示，我用数字1-9标出了对应的区域，其中标红色的区域是不需要缩放的，而标蓝色的区域则是需要缩放的区域。</p>
<p><img src="http://img.blog.csdn.net/20150109115256081?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd2hhdGRheQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" /><br />
图2 对图片使用Scale9技术进行缩放</p>
<p>当这张图片被放大，依据Scale9的定义，区域1，3，7，9需要保持原有的尺寸（通过对比左侧和右侧的图像可以发现这一点），而其它区域则需要依据一定的规则改变自己的尺寸：<br />
区域2，当图片放大，本区域宽度增加，高度保持不变<br />
区域4，当图片放大，本区域高度增加，宽度保持不变<br />
区域5，当图片放大，本区域宽度和高度都增加<br />
区域6，当图片放大，本区域高度增加，宽度保持不变（规则与区域4一致）<br />
区域8，当图片放大，本区域宽度增加，高度保持不变（规则与区域2一致）</p>
<p>对于区域5，我们在做外观设计的时候要重点注意，这个区域不要放置复杂图形，对于单色或简单渐变色而言，一定程度的放大是可以接受的，但如果是复杂图形，那么放大所产生的失真是非常明显的（当然如果是矢量图形，就不会有这个问题，但矢量图形对于CPU有较大的计算消耗，通常在性能敏感型的Flex应用中我们尽量使用位图皮肤）。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="color: #454545;">==================================================================</p>
<p><span style="color: #ff0000;">Scale9在duilib中的实例应用</span></p>
<p>以控件Combo为例,原本皮肤如图:<img src="http://img.blog.csdn.net/20150114110409750?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd2hhdGRheQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />,宽度是71,现在设置一个长200的Combo控件效果如图:<img src="http://img.blog.csdn.net/20150114110749352?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd2hhdGRheQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" /></p>
<p>可以看到明显被拉伸了,添加<span style="color: #454545;">corner属性代码如下:</span></p>
<div class="dp-highlighter bg_cpp">
<div class="bar">
<div class="tools" style="color: silver;">
<pre class="crayon-plain-tag">&lt;Combo name="ComboClientDirSelect" text="TCP" height="20" width="200" itemshowhtml="true" itemtextcolor="#FF000000" itemselectedtextcolor="#FF000000" itemselectedbkcolor="#FFC1E3FF" itemhottextcolor="#FF000000" itemhotbkcolor="#FFE9F5FF" itemdisabledtextcolor="#FFCCCCCC" itemdisabledbkcolor="#FFFFFFFF" normalimage="file='Combo_nor.png' corner='5,2,30,2'" hotimage="file='Combo_over.png' corner='5,2,30,2'" pushedimage="file='Combo_over.png' corner='5,2,30,2'" dropboxsize="0,150"&gt;
...</pre><br />
&nbsp;</p>
</div>
</div>
</div>
<ol class="dp-cpp" style="color: #5c5c5c;" start="1">
<li><span style="color: black;">&#8230;  </span></li>
</ol>
<p>此时效果如图:<img src="http://img.blog.csdn.net/20150114110953996?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd2hhdGRheQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />,显示正常了,其中corner=&#8217;5,2,30,2&#8242;的含义是＃字的4条线分别到 左 上 右 下的距离 然后把＃中间的图片进行拉伸 最后达到完美效果.</p>
<p>&nbsp;</p>
<p><span style="font-family: Arial; font-size: 14px; line-height: 26px;"> </span></p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1343</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DUILIB入门简明教程</title>
		<link>https://www.softwareace.cn/?p=842</link>
		<comments>https://www.softwareace.cn/?p=842#comments</comments>
		<pubDate>Fri, 27 Jun 2014 04:50:31 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[duilib]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=842</guid>
		<description><![CDATA[目录: &#160; 2013 duilib入门简明教程 &#8212; 前言(1) 2013 duilib入 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>目录:</strong></p>
<p>&nbsp;</p>
<ul>
<li><a href="http://www.cnblogs.com/Alberl/p/3341956.html" target="_blank">2013 duilib入门简明教程 &#8212; 前言(1)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3342030.html" target="_blank">2013 duilib入门简明教程 &#8212; VS环境配置(2)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3343579.html" target="_blank">2013 duilib入门简明教程 &#8212; 第一个程序 Hello World(3)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3343610.html" target="_blank">2013 duilib入门简明教程 &#8212; 响应按钮事件(4)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3343667.html" target="_blank">2013 duilib入门简明教程 &#8212; 自绘标题栏(5)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3343699.html" target="_blank">2013 duilib入门简明教程 &#8212; XML配置界面(6)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3343743.html" target="_blank">2013 duilib入门简明教程 &#8212; XML基础类(7)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3343763.html" target="_blank">2013 duilib入门简明教程 &#8212; 完整的自绘标题栏(8)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3343806.html" target="_blank">2013 duilib入门简明教程 &#8212; 界面布局(9)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3343838.html" target="_blank">2013 duilib入门简明教程 &#8212; 界面设计器 DuiDesigner (10)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3344886.html" target="_blank">2013 duilib入门简明教程 &#8212; 部分bug (11)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3344936.html" target="_blank">2013 duilib入门简明教程 &#8212; 简单控件介绍 (12)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3345102.html" target="_blank">2013 duilib入门简明教程 &#8212; 复杂控件介绍 (13)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3352131.html" target="_blank">2013 duilib入门简明教程 &#8212; 部分bug 2 (14)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3352461.html" target="_blank">2013 duilib入门简明教程 &#8212; 自绘控件 (15)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3352696.html" target="_blank">2013 duilib入门简明教程 &#8212; 结合win32和MFC (16)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3352904.html" target="_blank">2013 duilib入门简明教程 &#8212; 事件处理和消息响应 (17)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3354173.html" target="_blank">2013 duilib入门简明教程 &#8212; 其他 (18)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3354294.html" target="_blank">2013 duilib入门简明教程 &#8212; FAQ (19)</a></li>
<li><a href="http://www.cnblogs.com/Alberl/p/3354459.html" target="_blank">2013 duilib入门简明教程 &#8212; 总结 (20)</a></li>
</ul>
<p style="color: #454545;">http://www.who1753.com/duilib-study-summary.html</p>
<p style="color: #454545;">Duilib学习笔记：</p>
<p style="color: #454545;"><a style="color: #ff6100;" href="http://www.who1753.com/duilib-study-01.html" target="_blank">Duilib学习笔记《01》— duilib整体框架认识</a></p>
<p style="color: #454545;"><a style="color: #ff6100;" href="http://www.who1753.com/duilib-study-02.html" target="_blank">Duilib学习笔记《02》— 界面布局</a></p>
<p style="color: #454545;"><a style="color: #ff6100;" href="http://www.who1753.com/duilib-study-03.html" target="_blank">Duilib学习笔记《03》— 控件使用</a></p>
<p style="color: #454545;"><a style="color: #ff6100;" href="http://www.who1753.com/duilib-study-04.html" target="_blank">Duilib学习笔记《04》— 窗体显示</a></p>
<p style="color: #454545;"><a style="color: #ff6100;" href="http://www.who1753.com/duilib-study-05.html" target="_blank">Duilib学习笔记《05》— 消息响应处理</a></p>
<p style="color: #454545;"><a style="color: #ff6100;" href="http://www.who1753.com/duilib-study-06.html" target="_blank">Duilib学习笔记《06》— 窗体基类WindowImpBase</a></p>
<p style="color: #454545;"><a style="color: #ff6100;" href="http://www.who1753.com/duilib-study-07.html" target="_blank">Duilib学习笔记《07》— 资源加载</a></p>
<p style="color: #454545;">Duilib扩展：</p>
<p style="color: #454545;"><a style="color: #ff6100;" href="http://www.who1753.com/duilib-expand-01.html" target="_blank">Duilib扩展《01》— 双击、右键消息扩展</a></p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=842</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>duilib中CTextUI控件设置文字时不刷新显示的bug .</title>
		<link>https://www.softwareace.cn/?p=675</link>
		<comments>https://www.softwareace.cn/?p=675#comments</comments>
		<pubDate>Wed, 01 Jan 2014 10:48:10 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[win32]]></category>
		<category><![CDATA[duilib]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=675</guid>
		<description><![CDATA[http://blog.csdn.net/chenlycly/article/details/17291765 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>http://blog.csdn.net/chenlycly/article/details/17291765</p>
<p>duilib中常用的文本控件CTextUI，有个很重要的特性：控件的长度会自适应所设置文本的长度，即所设置文本的的长度变化了，控件的长度也会随之变化。但是会有这样的问题：当设置的文本长度大于先前旧的文本的长度时，界面没有及时刷新，仍然显示的是之前的旧的文本，需要通过页面的切换才能刷新显示。下面我们来详细看一下自适应特性是如何实现的、是如何被应用的、自适应特性引起的问题以及问题是如何来解决的。</p>
<p><strong>1、自适应特性的实现</strong></p>
<p>CTextUI控件提供了EstimateSize接口，接口的代码如下所示。</p>
<div class="dp-highlighter bg_cpp">
<div class="bar">
<div class="tools"><b>[cpp]</b> <a class="ViewSource" title="view plain" href="#">view plain</a><a class="CopyToClipboard" title="copy" href="#">copy</a><a class="PrintSource" title="print" href="#">print</a><a class="About" title="?" href="#">?</a><a style="text-indent: 0px;" title="在CODE上查看代码片" href="https://code.csdn.net/snippets/137626" target="_blank"><img style="position: relative; top: 1px; left: 2px;" alt="在CODE上查看代码片" src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" /></a><a style="text-indent: 0px;" title="派生到我的代码片" href="https://code.csdn.net/snippets/137626/fork" target="_blank"><img style="position: relative; top: 2px; left: 2px;" alt="派生到我的代码片" src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" /></a></div>
</div>
<ol class="dp-cpp">
<li class="alt"><span><span>SIZE CTextUI::EstimateSize(SIZE szAvailable)  </span></span></li>
<li><span>{  </span></li>
<li class="alt"><span>    RECT rcText = { 0, 0, MAX(szAvailable.cx, m_cxyFixed.cx), 9999 };  </span></li>
<li><span>    rcText.left += m_rcTextPadding.left;  </span></li>
<li class="alt"><span>    rcText.right -= m_rcTextPadding.right;  </span></li>
<li><span>    </span><span class="keyword">if</span><span>( m_bShowHtml )  </span></li>
<li class="alt"><span>    {     </span></li>
<li><span>        </span><span class="datatypes">int</span><span> nLinks = 0;  </span></li>
<li class="alt"><span>        CRenderEngine::DrawHtmlText(m_pManager-&gt;GetPaintDC(), m_pManager, rcText, m_sText, m_dwTextColor, NULL, NULL, nLinks, DT_CALCRECT | m_uTextStyle);  </span></li>
<li><span>    }  </span></li>
<li class="alt"><span>    </span><span class="keyword">else</span><span>  </span></li>
<li><span>    {  </span></li>
<li class="alt"><span>        CRenderEngine::DrawText(m_pManager-&gt;GetPaintDC(), m_pManager, rcText, m_sText, m_dwTextColor, m_iFont, DT_CALCRECT | m_uTextStyle);  </span></li>
<li><span>    }  </span></li>
<li class="alt"><span>    SIZE cXY = {rcText.right - rcText.left + m_rcTextPadding.left + m_rcTextPadding.right,  </span></li>
<li><span>        rcText.bottom - rcText.top + m_rcTextPadding.top + m_rcTextPadding.bottom};  </span></li>
<li class="alt"><span>  </span></li>
<li><span>    </span><span class="keyword">if</span><span>( m_cxyFixed.cy != 0 ) cXY.cy = m_cxyFixed.cy;  </span></li>
<li class="alt"><span>    </span><span class="keyword">return</span><span> cXY;  </span></li>
<li><span>}  </span></li>
</ol>
</div>
<p></p><pre class="crayon-plain-tag">SIZE CTextUI::EstimateSize(SIZE szAvailable)
{
    RECT rcText = { 0, 0, MAX(szAvailable.cx, m_cxyFixed.cx), 9999 };
    rcText.left += m_rcTextPadding.left;
    rcText.right -= m_rcTextPadding.right;
    if( m_bShowHtml )
	{   
        int nLinks = 0;
        CRenderEngine::DrawHtmlText(m_pManager-&amp;gt;GetPaintDC(), m_pManager, rcText, m_sText, m_dwTextColor, NULL, NULL, nLinks, DT_CALCRECT | m_uTextStyle);
    }
    else
	{
        CRenderEngine::DrawText(m_pManager-&amp;gt;GetPaintDC(), m_pManager, rcText, m_sText, m_dwTextColor, m_iFont, DT_CALCRECT | m_uTextStyle);
    }
    SIZE cXY = {rcText.right - rcText.left + m_rcTextPadding.left + m_rcTextPadding.right,
        rcText.bottom - rcText.top + m_rcTextPadding.top + m_rcTextPadding.bottom};

    if( m_cxyFixed.cy != 0 ) cXY.cy = m_cxyFixed.cy;
    return cXY;
}</pre><p>从上面代码我们看出，给DrawHtmlText和DrawText函数均传入了rcText，并且在接下来的代码中，利用rcText修正了控件相关的位置信息。代码看起来会有疑问，本接口仅仅是用来估计控件的大小，为什么要调用DrawHtmlText和DrawText函数呢？是用这两个函数来实现估计的？那我们接着看看CRenderEngine::DrawText的代码。</p>
<div class="dp-highlighter bg_cpp">
<div class="bar">
<div class="tools"><b>[cpp]</b> <a class="ViewSource" title="view plain" href="#">view plain</a><a class="CopyToClipboard" title="copy" href="#">copy</a><a class="PrintSource" title="print" href="#">print</a><a class="About" title="?" href="#">?</a><a style="text-indent: 0px;" title="在CODE上查看代码片" href="https://code.csdn.net/snippets/137626" target="_blank"><img style="position: relative; top: 1px; left: 2px;" alt="在CODE上查看代码片" src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" /></a><a style="text-indent: 0px;" title="派生到我的代码片" href="https://code.csdn.net/snippets/137626/fork" target="_blank"><img style="position: relative; top: 2px; left: 2px;" alt="派生到我的代码片" src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" /></a></div>
</div>
<ol class="dp-cpp">
<li class="alt"><span><span class="keyword">void</span><span> CRenderEngine::DrawText( </span><span class="datatypes">HDC</span><span> hDC, CPaintManagerUI* pManager, RECT&amp; rc, </span><span class="datatypes">LPCTSTR</span><span> pstrText, </span><span class="datatypes">DWORD</span><span> dwTextColor, </span><span class="datatypes">int</span><span> iFont, </span><span class="datatypes">UINT</span><span> uStyle )  </span></span></li>
<li><span>{  </span></li>
<li class="alt"><span>    ASSERT(::GetObjectType(hDC) == OBJ_DC || ::GetObjectType(hDC) == OBJ_MEMDC);  </span></li>
<li><span>    </span><span class="keyword">if</span><span> (pstrText == NULL || pManager == NULL) </span><span class="keyword">return</span><span>;  </span></li>
<li class="alt"><span>    ::SetBkMode(hDC, TRANSPARENT);  </span></li>
<li><span>    ::SetTextColor(hDC, RGB(GetBValue(dwTextColor), GetGValue(dwTextColor), GetRValue(dwTextColor)));  </span></li>
<li class="alt"><span>    </span><span class="datatypes">HFONT</span><span> hOldFont = (</span><span class="datatypes">HFONT</span><span>)::SelectObject(hDC, pManager-&gt;GetFont(iFont));  </span></li>
<li><span>    ::DrawText(hDC, pstrText, -1, &amp;rc, uStyle | DT_NOPREFIX );  </span></li>
<li class="alt"><span>    ::SelectObject(hDC, hOldFont);  </span></li>
<li><span>}  </span></li>
</ol>
</div>
<p></p><pre class="crayon-plain-tag">void CRenderEngine::DrawText( HDC hDC, CPaintManagerUI* pManager, RECT&amp;amp; rc, LPCTSTR pstrText, DWORD dwTextColor, int iFont, UINT uStyle )
{
    ASSERT(::GetObjectType(hDC) == OBJ_DC || ::GetObjectType(hDC) == OBJ_MEMDC);
    if (pstrText == NULL || pManager == NULL) return;
    ::SetBkMode(hDC, TRANSPARENT);
    ::SetTextColor(hDC, RGB(GetBValue(dwTextColor), GetGValue(dwTextColor), GetRValue(dwTextColor)));
    HFONT hOldFont = (HFONT)::SelectObject(hDC, pManager-&amp;gt;GetFont(iFont));
    ::DrawText(hDC, pstrText, -1, &amp;amp;rc, uStyle | DT_NOPREFIX );
    ::SelectObject(hDC, hOldFont);
}</pre><p>代码是将文字绘制到制定的dc上，那到底是如何实现估计的呢？只能一步步看，于是到msdn中查看::DrawText API的函数说明，如下所示。</p>
<div class="dp-highlighter bg_cpp">
<div class="bar">
<div class="tools"><b>[cpp]</b> <a class="ViewSource" title="view plain" href="#">view plain</a><a class="CopyToClipboard" title="copy" href="#">copy</a><a class="PrintSource" title="print" href="#">print</a><a class="About" title="?" href="#">?</a><a style="text-indent: 0px;" title="在CODE上查看代码片" href="https://code.csdn.net/snippets/137626" target="_blank"><img style="position: relative; top: 1px; left: 2px;" alt="在CODE上查看代码片" src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" /></a><a style="text-indent: 0px;" title="派生到我的代码片" href="https://code.csdn.net/snippets/137626/fork" target="_blank"><img style="position: relative; top: 2px; left: 2px;" alt="派生到我的代码片" src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" /></a></div>
</div>
<ol class="dp-cpp">
<li class="alt"><span><span class="datatypes">int</span><span> DrawText(  </span></span></li>
<li><span>  </span><span class="datatypes">HDC</span><span> hDC,          </span><span class="comment">// handle to DC </span><span>  </span></li>
<li class="alt"><span>  </span><span class="datatypes">LPCTSTR</span><span> lpString, </span><span class="comment">// text to draw </span><span>  </span></li>
<li><span>  </span><span class="datatypes">int</span><span> nCount,       </span><span class="comment">// text length </span><span>  </span></li>
<li class="alt"><span>  LPRECT lpRect,    </span><span class="comment">// formatting dimensions </span><span>  </span></li>
<li><span>  </span><span class="datatypes">UINT</span><span> uFormat      </span><span class="comment">// text-drawing options </span><span>  </span></li>
<li class="alt"><span>);  </span></li>
</ol>
</div>
<p></p><pre class="crayon-plain-tag">int DrawText(
  HDC hDC,          // handle to DC
  LPCTSTR lpString, // text to draw
  int nCount,       // text length
  LPRECT lpRect,    // formatting dimensions
  UINT uFormat      // text-drawing options
);</pre><p>注意第四个参数，对应的说明：</p>
<dl>
<dt><em>lpRect</em></dt>
<dd>[in/out] Pointer to a <a target="_blank"><strong>RECT</strong></a> structure that contains the rectangle (in logical coordinates) in which the text is to be formatted.</dd>
<dt></dt>
</dl>
<p>它既是一个传入参数，也是一个传出参数，传出应该就是所绘画文字绘画后所占用的实际区域大小。所以结合上面的追踪过程，正是给DrawHtmlText和DrawText函数均传入了rcText参数，并且执行完后将绘画的文字占用的实际大小返回给了rcText传了出来，进而用实际占用大小来重新更新CTextUI控件的大小，这样就实现了控件对文字长度的自适应特性。</p>
<p><strong>  2、自适应特性的使用</strong></p>
<p>这种自适应的特性可以巧妙的用在一些场合下面。比如类似于QQ讨论组的聊天框，在聊天框的右侧会显示当前的讨论组成员列表，如果成员是管理员，我们需要在成员名称后面添加一个小图标，以标识该成员是管理员。一般的做法是，利用CContainer的自动布局特性，我们将不变宽度的控件设置固定宽度值，位于右边的管理员图标宽度也设置为固定值，这样中间的成员名称是文本，可长可短，不设置成固定值，使用CLabelUI控件即可。这样，中间的名称宽度就是可变的，但是这样做有个问题，管理员图标会固定在每个成员item的左右边，不能跟随名称紧贴名称后面，显得不太美观。后来考虑到CTextUI的对文字长度能自适应，就改用CTextUI，能很好的实现管理员图标能紧贴在成员名称后面。</p>
<dl>
<dt>        <strong>3、自适应特性引起的问题及问题分析</strong></p>
</dt>
</dl>
<p>        上面列举的例子中，当成员名称过长时，由于讨论组成员列表的宽度是固定的，当名称过长时，会将管理员图标给挤掉，看不见了或显示不全。这该如何解决呢？好在CTextUI有个maxwidth属性来设置最大宽度，这样我们将管理员图标位置预留出来，估计出控件的最大宽度，设置一下即可，当成员名称显示不下时，以省略号显示。</p>
<p>除了这个问题，还有个更严重的问题：当设置的文本长度大于先前旧的文本的长度时，界面没有及时刷新，仍然显示的是之前的旧的文本，需要通过页面的切换才能刷新显示。CTextUI是duilib中的基本控件，有这个问题是没法使用的，是要想办法解决掉的。</p>
<p>原因估计是这样的：由于CTextUI是自适应文字宽度的，对于旧的能显示全的文字，宽度是和文字宽度一致的；当我们设置更长的文字时，估计没有没有触发CTextUI::EstimateSize接口的调用，导致控件还是以前的大小，从而出现新文字没有刷新或显示不全的问题。</p>
<p>下面我们就来从代码中看一下不能刷新显示的问题是如何产生的。设置文字时，会调用基类CControlUI的SetText接口，接口的代码如下所示。</p>
<div class="dp-highlighter bg_cpp">
<div class="bar">
<div class="tools"><b>[cpp]</b> <a class="ViewSource" title="view plain" href="#">view plain</a><a class="CopyToClipboard" title="copy" href="#">copy</a><a class="PrintSource" title="print" href="#">print</a><a class="About" title="?" href="#">?</a><a style="text-indent: 0px;" title="在CODE上查看代码片" href="https://code.csdn.net/snippets/137626" target="_blank"><img style="position: relative; top: 1px; left: 2px;" alt="在CODE上查看代码片" src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" /></a><a style="text-indent: 0px;" title="派生到我的代码片" href="https://code.csdn.net/snippets/137626/fork" target="_blank"><img style="position: relative; top: 2px; left: 2px;" alt="派生到我的代码片" src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" /></a></div>
</div>
<ol class="dp-cpp">
<li class="alt"><span><span class="keyword">void</span><span> CControlUI::SetText( </span><span class="datatypes">LPCTSTR</span><span> pstrText )  </span></span></li>
<li><span>{  </span></li>
<li class="alt"><span>    </span><span class="keyword">if</span><span>( m_sText == pstrText )   </span></li>
<li><span>    {  </span></li>
<li class="alt"><span>        </span><span class="keyword">return</span><span>;  </span></li>
<li><span>    }  </span></li>
<li class="alt"><span>  </span></li>
<li><span>    m_sText = pstrText;  </span></li>
<li class="alt"><span>    Invalidate();  </span></li>
<li><span>}  </span></li>
</ol>
</div>
<p></p><pre class="crayon-plain-tag">void CControlUI::SetText( LPCTSTR pstrText )
{
    if( m_sText == pstrText ) 
	{
		return;
	}

    m_sText = pstrText;
    Invalidate();
}</pre><p>在上面的代码中调用CControlUI::Invalidate函数，</p>
<div class="dp-highlighter bg_cpp">
<div class="bar">
<div class="tools"><b>[cpp]</b> <a class="ViewSource" title="view plain" href="#">view plain</a><a class="CopyToClipboard" title="copy" href="#">copy</a><a class="PrintSource" title="print" href="#">print</a><a class="About" title="?" href="#">?</a><a style="text-indent: 0px;" title="在CODE上查看代码片" href="https://code.csdn.net/snippets/137626" target="_blank"><img style="position: relative; top: 1px; left: 2px;" alt="在CODE上查看代码片" src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" /></a><a style="text-indent: 0px;" title="派生到我的代码片" href="https://code.csdn.net/snippets/137626/fork" target="_blank"><img style="position: relative; top: 2px; left: 2px;" alt="派生到我的代码片" src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" /></a></div>
</div>
<ol class="dp-cpp">
<li class="alt"><span><span class="keyword">void</span><span> CControlUI::Invalidate()  </span></span></li>
<li><span>{  </span></li>
<li class="alt"><span>    </span><span class="keyword">if</span><span>( !IsVisible() ) </span><span class="keyword">return</span><span>;  </span></li>
<li><span>  </span></li>
<li class="alt"><span>    RECT invalidateRc = m_rcItem;  </span></li>
<li><span>  </span></li>
<li class="alt"><span>    CControlUI* pParent = </span><span class="keyword">this</span><span>;  </span></li>
<li><span>    RECT rcTemp;  </span></li>
<li class="alt"><span>    RECT rcParent;  </span></li>
<li><span>    </span><span class="keyword">while</span><span>( pParent = pParent-&gt;GetParent() )  </span></li>
<li class="alt"><span>    {  </span></li>
<li><span>        rcTemp = invalidateRc;  </span></li>
<li class="alt"><span>        rcParent = pParent-&gt;GetPos();  </span></li>
<li><span>        </span><span class="keyword">if</span><span>( !::IntersectRect(&amp;invalidateRc, &amp;rcTemp, &amp;rcParent) )   </span></li>
<li class="alt"><span>        {  </span></li>
<li><span>            </span><span class="keyword">return</span><span>;  </span></li>
<li class="alt"><span>        }  </span></li>
<li><span>    }  </span></li>
<li class="alt"><span>  </span></li>
<li><span>    </span><span class="keyword">if</span><span>( m_pManager != NULL ) m_pManager-&gt;Invalidate(invalidateRc);  </span></li>
<li class="alt"><span>}  </span></li>
</ol>
</div>
<p></p><pre class="crayon-plain-tag">void CControlUI::Invalidate()
{
	if( !IsVisible() ) return;

	RECT invalidateRc = m_rcItem;

	CControlUI* pParent = this;
	RECT rcTemp;
	RECT rcParent;
	while( pParent = pParent-&amp;gt;GetParent() )
	{
		rcTemp = invalidateRc;
		rcParent = pParent-&amp;gt;GetPos();
		if( !::IntersectRect(&amp;amp;invalidateRc, &amp;amp;rcTemp, &amp;amp;rcParent) ) 
		{
			return;
		}
	}

	if( m_pManager != NULL ) m_pManager-&amp;gt;Invalidate(invalidateRc);
}</pre><p>然后调到CPaintManagerUI::Invalidate中，即</p>
<div class="dp-highlighter bg_cpp">
<div class="bar">
<div class="tools"><b>[cpp]</b> <a class="ViewSource" title="view plain" href="#">view plain</a><a class="CopyToClipboard" title="copy" href="#">copy</a><a class="PrintSource" title="print" href="#">print</a><a class="About" title="?" href="#">?</a><a style="text-indent: 0px;" title="在CODE上查看代码片" href="https://code.csdn.net/snippets/137626" target="_blank"><img style="position: relative; top: 1px; left: 2px;" alt="在CODE上查看代码片" src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" /></a><a style="text-indent: 0px;" title="派生到我的代码片" href="https://code.csdn.net/snippets/137626/fork" target="_blank"><img style="position: relative; top: 2px; left: 2px;" alt="派生到我的代码片" src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" /></a></div>
</div>
<ol class="dp-cpp">
<li class="alt"><span><span class="keyword">void</span><span> CPaintManagerUI::Invalidate(RECT&amp; rcItem)  </span></span></li>
<li><span>{  </span></li>
<li class="alt"><span>    ::InvalidateRect(m_hWndPaint, &amp;rcItem, FALSE);  </span></li>
<li><span>}  </span></li>
</ol>
</div>
<p></p><pre class="crayon-plain-tag">void CPaintManagerUI::Invalidate(RECT&amp;amp; rcItem)
{
    ::InvalidateRect(m_hWndPaint, &amp;amp;rcItem, FALSE);
}</pre><p>也就是最终调用API函数::InvalidateRect，产生一个WM_PAINT消息。于是进入CPaintManagerUI::MessageHandler中，查看收到WM_PAINT消息是如何处理的。</p>
<div class="dp-highlighter bg_cpp">
<div class="bar">
<div class="tools"><b>[cpp]</b> <a class="ViewSource" title="view plain" href="#">view plain</a><a class="CopyToClipboard" title="copy" href="#">copy</a><a class="PrintSource" title="print" href="#">print</a><a class="About" title="?" href="#">?</a><a style="text-indent: 0px;" title="在CODE上查看代码片" href="https://code.csdn.net/snippets/137626" target="_blank"><img style="position: relative; top: 1px; left: 2px;" alt="在CODE上查看代码片" src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" /></a><a style="text-indent: 0px;" title="派生到我的代码片" href="https://code.csdn.net/snippets/137626/fork" target="_blank"><img style="position: relative; top: 2px; left: 2px;" alt="派生到我的代码片" src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" /></a></div>
</div>
<ol class="dp-cpp">
<li class="alt"><span><span class="datatypes">bool</span><span> CPaintManagerUI::MessageHandler(</span><span class="datatypes">UINT</span><span> uMsg, </span><span class="datatypes">WPARAM</span><span> wParam, </span><span class="datatypes">LPARAM</span><span> lParam, </span><span class="datatypes">LRESULT</span><span>&amp; lRes)  </span></span></li>
<li><span>{  </span></li>
<li class="alt"><span>&#8230;&#8230;  </span></li>
<li><span>    </span><span class="keyword">case</span><span> WM_PAINT:  </span></li>
<li class="alt"><span>        {  </span></li>
<li><span>            </span><span class="comment">// Should we paint? </span><span>  </span></li>
<li class="alt"><span>            RECT rcPaint = { 0 };  </span></li>
<li><span>            </span><span class="keyword">if</span><span>( !::GetUpdateRect( m_hWndPaint, &amp;rcPaint, FALSE) )   </span></li>
<li class="alt"><span>            {  </span></li>
<li><span>                </span><span class="keyword">return</span><span> </span><span class="keyword">true</span><span>;  </span></li>
<li class="alt"><span>            }  </span></li>
<li><span>  </span></li>
<li class="alt"><span>            </span><span class="keyword">if</span><span>( NULL == m_pRoot )   </span></li>
<li><span>            {  </span></li>
<li class="alt"><span>                PAINTSTRUCT ps = { 0 };  </span></li>
<li><span>                ::BeginPaint( m_hWndPaint, &amp;ps );  </span></li>
<li class="alt"><span>                ::EndPaint( m_hWndPaint, &amp;ps );  </span></li>
<li><span>                </span><span class="keyword">return</span><span> </span><span class="keyword">true</span><span>;  </span></li>
<li class="alt"><span>            }              </span></li>
<li><span>            </span><span class="comment">// Do we need to resize anything? </span><span>  </span></li>
<li class="alt"><span>            </span><span class="comment">// This is the time where we layout the controls on the form. </span><span>  </span></li>
<li><span>            </span><span class="comment">// We delay this even from the WM_SIZE messages since resizing can be </span><span>  </span></li>
<li class="alt"><span>            </span><span class="comment">// a very expensive operation. </span><span>  </span></li>
<li><span>            </span><span class="keyword">if</span><span>( m_bUpdateNeeded )   </span></li>
<li class="alt"><span>            {  </span></li>
<li><span>                m_bUpdateNeeded = </span><span class="keyword">false</span><span>;  </span></li>
<li class="alt"><span>                RECT rcClient = { 0 };  </span></li>
<li><span>                ::GetClientRect( m_hWndPaint, &amp;rcClient );  </span></li>
<li class="alt"><span>                </span><span class="keyword">if</span><span>( !::IsRectEmpty( &amp;rcClient ) )   </span></li>
<li><span>                {  </span></li>
<li class="alt"><span>                    </span><span class="keyword">if</span><span>( m_pRoot-&gt;IsUpdateNeeded() )   </span></li>
<li><span>                    {  </span></li>
<li class="alt"><span>                        m_pRoot-&gt;SetPos( rcClient );  </span></li>
<li><span>                        </span><span class="keyword">if</span><span>( m_hDcOffscreen != NULL ) ::DeleteDC( m_hDcOffscreen );  </span></li>
<li class="alt"><span>                        </span><span class="keyword">if</span><span>( m_hDcBackground != NULL ) ::DeleteDC( m_hDcBackground );  </span></li>
<li><span>                        </span><span class="keyword">if</span><span>( m_hbmpOffscreen != NULL ) ::DeleteObject( m_hbmpOffscreen );  </span></li>
<li class="alt"><span>                        </span><span class="keyword">if</span><span>( m_hbmpBackground != NULL ) ::DeleteObject( m_hbmpBackground );  </span></li>
<li><span>                        m_hDcOffscreen = NULL;  </span></li>
<li class="alt"><span>                        m_hDcBackground = NULL;  </span></li>
<li><span>                        m_hbmpOffscreen = NULL;  </span></li>
<li class="alt"><span>                        m_hbmpBackground = NULL;  </span></li>
<li><span>                    }  </span></li>
<li class="alt"><span>                    </span><span class="keyword">else</span><span>   </span></li>
<li><span>                    {  </span></li>
<li class="alt"><span>                        CControlUI* pControl = NULL;  </span></li>
<li><span>                        </span><span class="keyword">while</span><span>( pControl = m_pRoot-&gt;FindControl(__FindControlFromUpdate, NULL, UIFIND_VISIBLE | UIFIND_ME_FIRST) )   </span></li>
<li class="alt"><span>                        {  </span></li>
<li><span>                            pControl-&gt;SetPos( pControl-&gt;GetPos() );  </span></li>
<li class="alt"><span>                        }  </span></li>
<li><span>                    }  </span></li>
<li class="alt"><span>&#8230;&#8230;  </span></li>
<li><span>}  </span></li>
</ol>
</div>
<p></p><pre class="crayon-plain-tag">bool CPaintManagerUI::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT&amp;amp; lRes)
{
......
    case WM_PAINT:
        {
            // Should we paint?
            RECT rcPaint = { 0 };
            if( !::GetUpdateRect( m_hWndPaint, &amp;amp;rcPaint, FALSE) ) 
			{
				return true;
			}

            if( NULL == m_pRoot ) 
			{
                PAINTSTRUCT ps = { 0 };
                ::BeginPaint( m_hWndPaint, &amp;amp;ps );
                ::EndPaint( m_hWndPaint, &amp;amp;ps );
                return true;
            }            
            // Do we need to resize anything?
            // This is the time where we layout the controls on the form.
            // We delay this even from the WM_SIZE messages since resizing can be
            // a very expensive operation.
            if( m_bUpdateNeeded ) 
			{
                m_bUpdateNeeded = false;
                RECT rcClient = { 0 };
                ::GetClientRect( m_hWndPaint, &amp;amp;rcClient );
                if( !::IsRectEmpty( &amp;amp;rcClient ) ) 
				{
                    if( m_pRoot-&amp;gt;IsUpdateNeeded() ) 
					{
                        m_pRoot-&amp;gt;SetPos( rcClient );
                        if( m_hDcOffscreen != NULL ) ::DeleteDC( m_hDcOffscreen );
                        if( m_hDcBackground != NULL ) ::DeleteDC( m_hDcBackground );
                        if( m_hbmpOffscreen != NULL ) ::DeleteObject( m_hbmpOffscreen );
                        if( m_hbmpBackground != NULL ) ::DeleteObject( m_hbmpBackground );
                        m_hDcOffscreen = NULL;
                        m_hDcBackground = NULL;
                        m_hbmpOffscreen = NULL;
                        m_hbmpBackground = NULL;
                    }
					else 
					{
						CControlUI* pControl = NULL;
						while( pControl = m_pRoot-&amp;gt;FindControl(__FindControlFromUpdate, NULL, UIFIND_VISIBLE | UIFIND_ME_FIRST) ) 
						{
							pControl-&amp;gt;SetPos( pControl-&amp;gt;GetPos() );
						}
					}
......
}</pre><p>上面只给出了一部分代码。搜索一下调用EstimateSize函数的地方，发现CVerticalLayoutUI、CHorizontalLayoutUI、CTileLayoutUI和CTabLayoutUI类的SetPos函数中都会调到EstimateSize函数。从上面的代码可以看出，仅仅是产生一个WM_PAINT消息是不行的，是执行不到CVerticalLayoutUI、CHorizontalLayoutUI、CTileLayoutU等类的SetPos函数，执行不到CTextUI::EstimateSize函数的。也就是说，在设置文字的CControlUI::SetText函数中仅仅调用CControlUI::Invalidate函数是行不通的，是没法更新CTextUI控件大小的。<br />
要调用到CVerticalLayoutUI、CHorizontalLayoutUI、CTileLayoutU等类的SetPos函数，首先要CPaintManagerUI::m_bUpdateNeeded为TRUE，那是不是要调用CPaintManagerUI::NeedUpdate()，先将m_bUpdateNeeded置为TRUE呢？于是加上代码，CTextUI文字还是刷新不了。于是继续看上面的代码，发现只有当CControlUI::m_bUpdateNeeded为TRUE时，才会调用控件对应的SetPos接口。于是有添加了CControlUI::NeedUpdate调用，问题还是没解决。其实，此时只是触发了控件本身CTextUI::SetPos的调用，此函数并没有调用CTextUI::EstimateSize，当然CTextUI::SetPos中不可能直接调用CTextUI::EstimateSize，是由于牵涉到父布局中的所有子控件（包括CTextUI控件）的摆放，理应由父布局统一统筹。</p>
<p><strong>        4、自适应特性引起的不刷新问题的解决</strong></p>
<p>那如何才能调到CTextUI::EstimateSize呢？该如何处理呢？考虑到CVerticalLayoutUI、CHorizontalLayoutUI、CTileLayoutUI和CTabLayoutUI类的SetPos函数中都会调到EstimateSize函数，而CTextUI控件一般是依附在CVerticalLayoutUI、CHorizontalLayoutUI等父布局下的，那么只要我们触发这些父布局调用对应的SetPos，就可以调用到CTextUI::EstimateSize函数，进而利用最新的文字来估计CTextUI控件的尺寸，将CTextUI控件的尺寸更新掉，从而能让最新的文字刷新显示出来。</p>
<p>那如何触发这些父布局调用对应的SetPos呢？我们且看CPaintManagerUI::MessageHandler中代码，</p>
<div class="dp-highlighter bg_cpp">
<div class="bar">
<div class="tools"><b>[cpp]</b> <a class="ViewSource" title="view plain" href="#">view plain</a><a class="CopyToClipboard" title="copy" href="#">copy</a><a class="PrintSource" title="print" href="#">print</a><a class="About" title="?" href="#">?</a><a style="text-indent: 0px;" title="在CODE上查看代码片" href="https://code.csdn.net/snippets/137626" target="_blank"><img style="position: relative; top: 1px; left: 2px;" alt="在CODE上查看代码片" src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" /></a><a style="text-indent: 0px;" title="派生到我的代码片" href="https://code.csdn.net/snippets/137626/fork" target="_blank"><img style="position: relative; top: 2px; left: 2px;" alt="派生到我的代码片" src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" /></a></div>
</div>
<ol class="dp-cpp">
<li class="alt"><span><span class="datatypes">bool</span><span> CPaintManagerUI::MessageHandler(</span><span class="datatypes">UINT</span><span> uMsg, </span><span class="datatypes">WPARAM</span><span> wParam, </span><span class="datatypes">LPARAM</span><span> lParam, </span><span class="datatypes">LRESULT</span><span>&amp; lRes)  </span></span></li>
<li><span>{  </span></li>
<li class="alt"><span>&#8230;&#8230;  </span></li>
<li><span>    </span><span class="keyword">case</span><span> WM_PAINT:  </span></li>
<li class="alt"><span>        {  </span></li>
<li><span> &#8230;&#8230;  </span></li>
<li class="alt"><span>            </span><span class="keyword">if</span><span>( m_bUpdateNeeded )   </span></li>
<li><span>            {  </span></li>
<li class="alt"><span>                m_bUpdateNeeded = </span><span class="keyword">false</span><span>;  </span></li>
<li><span>                RECT rcClient = { 0 };  </span></li>
<li class="alt"><span>                ::GetClientRect( m_hWndPaint, &amp;rcClient );  </span></li>
<li><span>                </span><span class="keyword">if</span><span>( !::IsRectEmpty( &amp;rcClient ) )   </span></li>
<li class="alt"><span>                {  </span></li>
<li><span>                    </span><span class="keyword">if</span><span>( m_pRoot-&gt;IsUpdateNeeded() )   </span></li>
<li class="alt"><span>                    {  </span></li>
<li><span>                        m_pRoot-&gt;SetPos( rcClient );  </span></li>
<li class="alt"><span>                        </span><span class="keyword">if</span><span>( m_hDcOffscreen != NULL ) ::DeleteDC( m_hDcOffscreen );  </span></li>
<li><span>                        </span><span class="keyword">if</span><span>( m_hDcBackground != NULL ) ::DeleteDC( m_hDcBackground );  </span></li>
<li class="alt"><span>                        </span><span class="keyword">if</span><span>( m_hbmpOffscreen != NULL ) ::DeleteObject( m_hbmpOffscreen );  </span></li>
<li><span>                        </span><span class="keyword">if</span><span>( m_hbmpBackground != NULL ) ::DeleteObject( m_hbmpBackground );  </span></li>
<li class="alt"><span>                        m_hDcOffscreen = NULL;  </span></li>
<li><span>                        m_hDcBackground = NULL;  </span></li>
<li class="alt"><span>                        m_hbmpOffscreen = NULL;  </span></li>
<li><span>                        m_hbmpBackground = NULL;  </span></li>
<li class="alt"><span>                    }  </span></li>
<li><span>                    </span><span class="keyword">else</span><span>   </span></li>
<li class="alt"><span>                    {  </span></li>
<li><span>                        CControlUI* pControl = NULL;  </span></li>
<li class="alt"><span>                        </span><span class="keyword">while</span><span>( pControl = m_pRoot-&gt;FindControl(__FindControlFromUpdate, NULL, UIFIND_VISIBLE | UIFIND_ME_FIRST) )   </span></li>
<li><span>                        {  </span></li>
<li class="alt"><span>                            pControl-&gt;SetPos( pControl-&gt;GetPos() );  </span></li>
<li><span>                        }  </span></li>
<li class="alt"><span>                    }  </span></li>
<li><span>&#8230;&#8230;  </span></li>
<li class="alt"><span>}  </span></li>
</ol>
</div>
<p></p><pre class="crayon-plain-tag">bool CPaintManagerUI::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT&amp;amp; lRes)
{
......
    case WM_PAINT:
        {
 ......
            if( m_bUpdateNeeded ) 
			{
                m_bUpdateNeeded = false;
                RECT rcClient = { 0 };
                ::GetClientRect( m_hWndPaint, &amp;amp;rcClient );
                if( !::IsRectEmpty( &amp;amp;rcClient ) ) 
				{
                    if( m_pRoot-&amp;gt;IsUpdateNeeded() ) 
					{
                        m_pRoot-&amp;gt;SetPos( rcClient );
                        if( m_hDcOffscreen != NULL ) ::DeleteDC( m_hDcOffscreen );
                        if( m_hDcBackground != NULL ) ::DeleteDC( m_hDcBackground );
                        if( m_hbmpOffscreen != NULL ) ::DeleteObject( m_hbmpOffscreen );
                        if( m_hbmpBackground != NULL ) ::DeleteObject( m_hbmpBackground );
                        m_hDcOffscreen = NULL;
                        m_hDcBackground = NULL;
                        m_hbmpOffscreen = NULL;
                        m_hbmpBackground = NULL;
                    }
 					else 
					{
 						CControlUI* pControl = NULL;
						while( pControl = m_pRoot-&amp;gt;FindControl(__FindControlFromUpdate, NULL, UIFIND_VISIBLE | UIFIND_ME_FIRST) ) 
						{
							pControl-&amp;gt;SetPos( pControl-&amp;gt;GetPos() );
						}
					}
......
}</pre><p>如果让整个窗口的m_pRoot全布局全部刷新一遍，肯定实现上述更新CTextUI控件尺寸的目的。但是这代价太高了，仅仅是为了刷新一个CTextUI子控件的位置和尺寸，就让窗口的整个布局都重新刷新一遍，这肯定不可取的、不合理的。于是看其中的这段代码，</p>
<div class="dp-highlighter bg_cpp">
<div class="bar">
<div class="tools"><b>[cpp]</b> <a class="ViewSource" title="view plain" href="#">view plain</a><a class="CopyToClipboard" title="copy" href="#">copy</a><a class="PrintSource" title="print" href="#">print</a><a class="About" title="?" href="#">?</a><a style="text-indent: 0px;" title="在CODE上查看代码片" href="https://code.csdn.net/snippets/137626" target="_blank"><img style="position: relative; top: 1px; left: 2px;" alt="在CODE上查看代码片" src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" /></a><a style="text-indent: 0px;" title="派生到我的代码片" href="https://code.csdn.net/snippets/137626/fork" target="_blank"><img style="position: relative; top: 2px; left: 2px;" alt="派生到我的代码片" src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" /></a></div>
</div>
<ol class="dp-cpp">
<li class="alt"><span><span class="keyword">else</span><span>   </span></span></li>
<li><span>  </span></li>
<li class="alt"><span>    CControlUI* pControl = NULL;  </span></li>
<li><span class="keyword">while</span><span>( pControl = m_pRoot-&gt;FindControl(__FindControlFromUpdate, NULL, UIFIND_VISIBLE | UIFIND_ME_FIRST) )   </span></li>
<li class="alt"><span>{  </span></li>
<li><span>    pControl-&gt;SetPos( pControl-&gt;GetPos() );  </span></li>
<li class="alt"><span>}  </span></li>
</ol>
</div>
<p></p><pre class="crayon-plain-tag">else 
					{
 						CControlUI* pControl = NULL;
						while( pControl = m_pRoot-&amp;gt;FindControl(__FindControlFromUpdate, NULL, UIFIND_VISIBLE | UIFIND_ME_FIRST) ) 
						{
							pControl-&amp;gt;SetPos( pControl-&amp;gt;GetPos() );
						}
					}</pre><p>继续跟到__FindControlFromUpdate函数，如下所示。</p>
<div class="dp-highlighter bg_cpp">
<div class="bar">
<div class="tools"><b>[cpp]</b> <a class="ViewSource" title="view plain" href="#">view plain</a><a class="CopyToClipboard" title="copy" href="#">copy</a><a class="PrintSource" title="print" href="#">print</a><a class="About" title="?" href="#">?</a><a style="text-indent: 0px;" title="在CODE上查看代码片" href="https://code.csdn.net/snippets/137626" target="_blank"><img style="position: relative; top: 1px; left: 2px;" alt="在CODE上查看代码片" src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" /></a><a style="text-indent: 0px;" title="派生到我的代码片" href="https://code.csdn.net/snippets/137626/fork" target="_blank"><img style="position: relative; top: 2px; left: 2px;" alt="派生到我的代码片" src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" /></a></div>
</div>
<ol class="dp-cpp">
<li class="alt"><span><span>CControlUI* CALLBACK CPaintManagerUI::__FindControlFromUpdate( CControlUI* pThis, </span><span class="datatypes">LPVOID</span><span> pData )  </span></span></li>
<li><span>{  </span></li>
<li class="alt"><span>    </span><span class="keyword">return</span><span> pThis-&gt;IsUpdateNeeded() ? pThis : NULL;  </span></li>
<li><span>}  </span></li>
</ol>
</div>
<p></p><pre class="crayon-plain-tag">CControlUI* CALLBACK CPaintManagerUI::__FindControlFromUpdate( CControlUI* pThis, LPVOID pData )
{
    return pThis-&amp;gt;IsUpdateNeeded() ? pThis : NULL;
}</pre><p>所以，我们只要将CTextUI所依附的父布局CVerticalLayoutUI或者CHorizontalLayoutUI等设置为需要刷新即可调用到CVerticalLayoutUI或者CHorizontalLayoutUI等的SetPos函数。所以最终的解决办法：在CTextUI中重写父类CControlUI中的虚函数SetText，添加的代码如下所示。</p>
<div class="dp-highlighter bg_cpp">
<div class="bar">
<div class="tools"><b>[cpp]</b> <a class="ViewSource" title="view plain" href="#">view plain</a><a class="CopyToClipboard" title="copy" href="#">copy</a><a class="PrintSource" title="print" href="#">print</a><a class="About" title="?" href="#">?</a><a style="text-indent: 0px;" title="在CODE上查看代码片" href="https://code.csdn.net/snippets/137626" target="_blank"><img style="position: relative; top: 1px; left: 2px;" alt="在CODE上查看代码片" src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" /></a><a style="text-indent: 0px;" title="派生到我的代码片" href="https://code.csdn.net/snippets/137626/fork" target="_blank"><img style="position: relative; top: 2px; left: 2px;" alt="派生到我的代码片" src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" /></a></div>
</div>
<ol class="dp-cpp">
<li class="alt"><span><span class="keyword">void</span><span> CTextUI::SetText( </span><span class="datatypes">LPCTSTR</span><span> pstrText )  </span></span></li>
<li><span>{  </span></li>
<li class="alt"><span>    CControlUI::SetText( pstrText );  </span></li>
<li><span>  </span></li>
<li class="alt"><span>    NeedParentUpdate();  </span></li>
<li><span>}  </span></li>
</ol>
</div>
<p></p><pre class="crayon-plain-tag">void CTextUI::SetText( LPCTSTR pstrText )
{
	CControlUI::SetText( pstrText );

	NeedParentUpdate();
}</pre><p>为了说明问题，将CControlUI::NeedParentUpdate的代码也贴出来，</p>
<div class="dp-highlighter bg_cpp">
<div class="bar">
<div class="tools"><b>[cpp]</b> <a class="ViewSource" title="view plain" href="#">view plain</a><a class="CopyToClipboard" title="copy" href="#">copy</a><a class="PrintSource" title="print" href="#">print</a><a class="About" title="?" href="#">?</a><a style="text-indent: 0px;" title="在CODE上查看代码片" href="https://code.csdn.net/snippets/137626" target="_blank"><img style="position: relative; top: 1px; left: 2px;" alt="在CODE上查看代码片" src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" /></a><a style="text-indent: 0px;" title="派生到我的代码片" href="https://code.csdn.net/snippets/137626/fork" target="_blank"><img style="position: relative; top: 2px; left: 2px;" alt="派生到我的代码片" src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" /></a></div>
</div>
<ol class="dp-cpp">
<li class="alt"><span><span class="keyword">void</span><span> CControlUI::NeedParentUpdate()  </span></span></li>
<li><span>{  </span></li>
<li class="alt"><span>    </span><span class="keyword">if</span><span>( GetParent() )  </span></li>
<li><span>    {  </span></li>
<li class="alt"><span>        GetParent()-&gt;NeedUpdate();  </span></li>
<li><span>        GetParent()-&gt;Invalidate();  </span></li>
<li class="alt"><span>    }  </span></li>
<li><span>    </span><span class="keyword">else</span><span>  </span></li>
<li class="alt"><span>    {  </span></li>
<li><span>        NeedUpdate();  </span></li>
<li class="alt"><span>    }  </span></li>
<li><span>  </span></li>
<li class="alt"><span>    </span><span class="keyword">if</span><span>( m_pManager != NULL )  </span></li>
<li><span>    {  </span></li>
<li class="alt"><span>        m_pManager-&gt;NeedUpdate();  </span></li>
<li><span>    }  </span></li>
<li class="alt"><span>}  </span></li>
</ol>
</div>
<p></p><pre class="crayon-plain-tag">void CControlUI::NeedParentUpdate()
{
    if( GetParent() )
    {
        GetParent()-&amp;gt;NeedUpdate();
        GetParent()-&amp;gt;Invalidate();
    }
    else
    {
        NeedUpdate();
    }

    if( m_pManager != NULL )
    {
        m_pManager-&amp;gt;NeedUpdate();
    }
}</pre><p>所以CTextUI::SetText不仅将父布局设置为需要刷新状态，而且调用CPaintManagerUI::NeedUpdate将m_bUpdateNeeded置为TRUE，进而保证代码能运行到CPaintManagerUI::MessageHandler中的WM_PAINT消息处理分支的如下代码段，</p>
<div class="dp-highlighter bg_cpp">
<div class="bar">
<div class="tools"><b>[cpp]</b> <a class="ViewSource" title="view plain" href="#">view plain</a><a class="CopyToClipboard" title="copy" href="#">copy</a><a class="PrintSource" title="print" href="#">print</a><a class="About" title="?" href="#">?</a><a style="text-indent: 0px;" title="在CODE上查看代码片" href="https://code.csdn.net/snippets/137626" target="_blank"><img style="position: relative; top: 1px; left: 2px;" alt="在CODE上查看代码片" src="https://code.csdn.net/assets/CODE_ico.png" width="12" height="12" /></a><a style="text-indent: 0px;" title="派生到我的代码片" href="https://code.csdn.net/snippets/137626/fork" target="_blank"><img style="position: relative; top: 2px; left: 2px;" alt="派生到我的代码片" src="https://code.csdn.net/assets/ico_fork.svg" width="12" height="12" /></a></div>
</div>
<ol class="dp-cpp">
<li class="alt"><span><span class="keyword">else</span><span>   </span></span></li>
<li><span>  </span></li>
<li class="alt"><span>    CControlUI* pControl = NULL;  </span></li>
<li><span class="keyword">while</span><span>( pControl = m_pRoot-&gt;FindControl(__FindControlFromUpdate, NULL, UIFIND_VISIBLE | UIFIND_ME_FIRST) )   </span></li>
<li class="alt"><span>{  </span></li>
<li><span>    pControl-&gt;SetPos( pControl-&gt;GetPos() );  </span></li>
<li class="alt"><span>}  </span></li>
</ol>
</div>
<p></p><pre class="crayon-plain-tag">else 
					{
 						CControlUI* pControl = NULL;
						while( pControl = m_pRoot-&amp;gt;FindControl(__FindControlFromUpdate, NULL, UIFIND_VISIBLE | UIFIND_ME_FIRST) ) 
						{
							pControl-&amp;gt;SetPos( pControl-&amp;gt;GetPos() );
						}
					}</pre><p>最终解决本案例中CTextUI控件不刷新显示的问题。</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=675</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CControlUI  Paint BkImage</title>
		<link>https://www.softwareace.cn/?p=673</link>
		<comments>https://www.softwareace.cn/?p=673#comments</comments>
		<pubDate>Tue, 31 Dec 2013 03:37:09 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[ui]]></category>
		<category><![CDATA[duilib]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=673</guid>
		<description><![CDATA[[crayon-69e76486af305732988918/] &#160;]]></description>
				<content:encoded><![CDATA[<p></p><pre class="crayon-plain-tag">void CControlUI::PaintBkImage(HDC hDC)
{
	if (m_hIcon == NULL)
	{
		if( m_sBkImage.IsEmpty() ) return;
		if( !DrawImage(hDC, (LPCTSTR)m_sBkImage) ) m_sBkImage.Empty();
		}
	else
	{
		int iconSize = 0;
		// 因为icon宽和高都是一样的，所以取控件宽和高其中最小的值进行判断取多大的图标画出来。
		int minIcon = GetWidth() &lt; GetHeight() ? GetWidth() : GetHeight();
		int m_iconSize[7] = {16, 24, 32, 48, 64, 128, 256};
		bool flag = false; 
		for (int i=0; i&lt;6; ++i)
		{
			if (minIcon &gt;= m_iconSize[i] &amp;&amp; minIcon &lt; m_iconSize[i+1])
			{
				iconSize = m_iconSize[i];
				flag = true;
				break;
			}
		}
		if (!flag)
		{
			if (minIcon&lt;m_iconSize[0])
			iconSize = m_iconSize[0];
			else
			iconSize = m_iconSize[6];
		}

		int x = (GetWidth()-iconSize)/2;
		int y = (GetHeight()-iconSize)/2;
		::DrawIconEx(hDC, m_rcItem.left+x, m_rcItem.top+y, m_hIcon, iconSize, iconSize, 0, 0, DI_NORMAL);
	}

}

//m_hicon需要添加个方法设置，</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=673</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>duilib error C2371: “IDispatchEx”: 重定义；不同的基类型的解决方案</title>
		<link>https://www.softwareace.cn/?p=664</link>
		<comments>https://www.softwareace.cn/?p=664#comments</comments>
		<pubDate>Wed, 18 Dec 2013 02:32:42 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[开发问题]]></category>
		<category><![CDATA[duilib]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=664</guid>
		<description><![CDATA[UIFlash.h #import &#8220;..\Utils/Flash11.tlb&#8221; ra [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>UIFlash.h</p>
<p>#import &#8220;..\Utils/Flash11.tlb&#8221; raw_interfaces_only, named_guids</p>
<p>改为：</p>
<p>#import &#8220;..\Utils/Flash11.tlb&#8221; raw_interfaces_only, named_guids, rename(&#8220;IDispatchEx&#8221;,&#8221;IMyDispatchEx&#8221;)</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=664</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>duilib 属性列表</title>
		<link>https://www.softwareace.cn/?p=571</link>
		<comments>https://www.softwareace.cn/?p=571#comments</comments>
		<pubDate>Tue, 17 Sep 2013 04:15:08 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[开源项目]]></category>
		<category><![CDATA[duilib]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=571</guid>
		<description><![CDATA[&#60;?xml version="1.0" encoding="UTF-8"?&#62; &#60;!-- 可能 [&#8230;]]]></description>
				<content:encoded><![CDATA[<pre class="lang:xhtml decode:true crayon-selected">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!-- 可能有错漏，欢迎补充。wangchyz(wangchyz@gmail.com) --&gt;
&lt;Controls&gt;
	&lt;Window parent=""&gt;
		&lt;Attribute name="size" default="0,0" type="SIZE" comment="窗口的初始化大小,如(800,600)"/&gt;
		&lt;Attribute name="sizebox" default="0,0,0,0" type="RECT" comment="窗口可拖动改变窗口大小的边距,如(4,4,6,6)"/&gt;
		&lt;Attribute name="caption" default="0,0,0,0" type="RECT" comment="窗口可拖动的标题栏大小的边距,最后一个参数是指离上边框的距离,如(0,0,0,28)"/&gt;
		&lt;Attribute name="roundcorner" default="0,0" type="SIZE" comment="窗口圆角大小,如(4,4)"/&gt;
		&lt;Attribute name="mininfo" default="0,0" type="SIZE" comment="窗口最小大小,如(320,240)"/&gt;
		&lt;Attribute name="maxinfo" default="0,0" type="SIZE" comment="窗口最大大小,如(1600,1200)"/&gt;
		&lt;Attribute name="alpha" default="255" type="BYTE" comment="窗口的alpha值(0-255),如(100)"/&gt;
		&lt;Attribute name="bktrans" default="false" type="BOOL" comment="窗口是否使用静态透明背景,如(false)"/&gt;
		&lt;Attribute name="disabledfontcolor" default="0xFFA7A6AA" type="DWORD" comment="默认的disabled字体颜色,如(0xFFA7A6AA)"/&gt;
		&lt;Attribute name="defaultfontcolor" default="0xFF000000" type="DWORD" comment="默认的字体颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="linkfontcolor" default="0xFF0000FF" type="DWORD" comment="默认的link字体颜色,如(0xFF0000FF)"/&gt;
		&lt;Attribute name="linkhoverfontcolor" default="0xFFD3215F" type="DWORD" comment="默认的linkhoverfont字体颜色,如(0xFFD3215F)"/&gt;
		&lt;Attribute name="selectedcolor" default="0xFFBAE4FF" type="DWORD" comment="默认的selected字体颜色,如(0xFFBAE4FF)"/&gt;
	&lt;/Window&gt;
	&lt;Control parent="" notifies="setfocus killfocus timer menu windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="keyboard" default="true" type="BOOL" comment="非CButtonUI类忽略该值，为false时不支持TAB_STOP,且该对象不处理键盘信息"/&gt;
	&lt;/Control&gt;
	&lt;Container parent="Control" notifies="setfocus killfocus timer menu windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="mousechild" default="true" type="BOOL" comment="本控件的子控件是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="inset" default="0,0,0,0" type="RECT" comment="容器的内边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="vscrollbar" default="false" type="BOOL" comment="是否使用竖向滚动条,如(true)"/&gt;
		&lt;Attribute name="hscrollbar" default="false" type="BOOL" comment="是否使用横向滚动条,如(true)"/&gt;
		&lt;Attribute name="childpadding" default="0" type="INT" comment="子控件之间的额外距离,如(4)"/&gt;
	&lt;/Container&gt;
	&lt;VerticalLayout parent="Container" notifies="setfocus killfocus timer menu windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0'(绘图区域) source='0,0,0,0' corner='0,0,0,0' mask='#FF0000'(透明色) fade='255'(透明度) hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="mousechild" default="true" type="BOOL" comment="本控件的子控件是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="inset" default="0,0,0,0" type="RECT" comment="容器的内边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="vscrollbar" default="false" type="BOOL" comment="是否使用竖向滚动条,如(true)"/&gt;
		&lt;Attribute name="hscrollbar" default="false" type="BOOL" comment="是否使用横向滚动条,如(true)"/&gt;
		&lt;Attribute name="childpadding" default="0" type="INT" comment="子控件之间的额外距离,如(4)"/&gt;
		&lt;Attribute name="sepheight" default="0" type="INT" comment="分隔符高度,正负表示分隔符在顶部还是底部,如(4)"/&gt;
		&lt;Attribute name="sepimm" default="false" type="BOOL" comment="拖动分隔符是否立即改变大小,如(false)"/&gt;
	&lt;/VerticalLayout&gt;
	&lt;HorizontalLayout parent="Container" notifies="setfocus killfocus timer menu windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="mousechild" default="true" type="BOOL" comment="本控件的子控件是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="inset" default="0,0,0,0" type="RECT" comment="容器的内边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="vscrollbar" default="false" type="BOOL" comment="是否使用竖向滚动条,如(true)"/&gt;
		&lt;Attribute name="hscrollbar" default="false" type="BOOL" comment="是否使用横向滚动条,如(true)"/&gt;
		&lt;Attribute name="childpadding" default="0" type="INT" comment="子控件之间的额外距离,如(4)"/&gt;
		&lt;Attribute name="sepwidth" default="0" type="INT" comment="分隔符宽,正负表示分隔符在左边还是右边,如(-4)"/&gt;
		&lt;Attribute name="sepimm" default="false" type="BOOL" comment="拖动分隔符是否立即改变大小,如(false)"/&gt;
	&lt;/HorizontalLayout&gt;
	&lt;TileLayout parent="Container" notifies="setfocus killfocus timer menu windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="mousechild" default="true" type="BOOL" comment="本控件的子控件是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="inset" default="0,0,0,0" type="RECT" comment="容器的内边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="vscrollbar" default="false" type="BOOL" comment="是否使用竖向滚动条,如(true)"/&gt;
		&lt;Attribute name="hscrollbar" default="false" type="BOOL" comment="是否使用横向滚动条,如(true)"/&gt;
		&lt;Attribute name="childpadding" default="0" type="INT" comment="子控件之间的额外距离,如(4)"/&gt;
		&lt;Attribute name="columns" default="1" type="INT" comment="列数,如(4)"/&gt;
		&lt;Attribute name="itemsize" default="0,0" type="SIZE" comment="子项固定大小，如(128,128)"/&gt;
	&lt;/TileLayout&gt;
	&lt;TabLayout parent="Container" notifies="setfocus killfocus timer menu tabselect windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="mousechild" default="true" type="BOOL" comment="本控件的子控件是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="inset" default="0,0,0,0" type="RECT" comment="容器的内边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="vscrollbar" default="false" type="BOOL" comment="是否使用竖向滚动条,如(true)"/&gt;
		&lt;Attribute name="hscrollbar" default="false" type="BOOL" comment="是否使用横向滚动条,如(true)"/&gt;
		&lt;Attribute name="childpadding" default="0" type="DWORD" comment="子控件之间的额外距离,如(4)"/&gt;
		&lt;Attribute name="selectedid" default="0" type="INT" comment="默认选中的页面id,如(0)"/&gt;
	&lt;/TabLayout&gt;
	&lt;ActiveX parent="Control" notifies="setfocus killfocus timer menu showactivex windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="mousechild" default="true" type="BOOL" comment="本控件的子控件是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="clsid" default="" type="STRING" comment="activex的clsid,如({8856F961-340A-11D0-A96B-00C04FD705A2})"/&gt;
		&lt;Attribute name="modulename" default="" type="STRING" comment="activex从指定位置加载,如(flash/flash.ocx)"/&gt;
		&lt;Attribute name="delaycreate" default="true" type="BOOL" comment="是否需要延迟创建activex,如(false)"/&gt;
	&lt;/ActiveX&gt;
	&lt;Combo parent="Container" notifies="setfocus killfocus timer menu dropdown itemselect windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="mousechild" default="true" type="BOOL" comment="本控件的子控件是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="inset" default="0,0,0,0" type="RECT" comment="容器的内边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="vscrollbar" default="false" type="BOOL" comment="是否使用竖向滚动条,如(true)"/&gt;
		&lt;Attribute name="hscrollbar" default="false" type="BOOL" comment="是否使用横向滚动条,如(true)"/&gt;
		&lt;Attribute name="childpadding" default="0" type="INT" comment="子控件之间的额外距离,如(4)"/&gt;
		&lt;Attribute name="textpadding" default="0,0,0,0" type="RECT" comment="文字显示的边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="normalimage" default="" type="STRING" comment="普通状态图片"/&gt;
		&lt;Attribute name="hotimage" default="" type="STRING" comment="鼠标悬浮的状态图片"/&gt;
		&lt;Attribute name="pushedimage" default="" type="STRING" comment="鼠标按下的状态图片"/&gt;
		&lt;Attribute name="focusedimage" default="" type="STRING" comment="获得焦点时的状态图片"/&gt;
		&lt;Attribute name="disabledimage" default="" type="STRING" comment="禁用的状态图片"/&gt;
		&lt;Attribute name="dropbox" default="" type="STRING" comment="弹出框root属性设置"/&gt;
		&lt;Attribute name="itemfont" default="-1" type="INT" comment="item的字体id,如(0)"/&gt;
		&lt;Attribute name="itemalign" default="center" type="STRING" comment="item对齐方式,取值left、right、center，如(center)"/&gt;
		&lt;Attribute name="itemendellipsis" default="false" type="BOOL" comment="item句末显示不全是否使用...代替,如(true)"/&gt;
		&lt;Attribute name="itemtextpadding" default="0,0,0,0" type="RECT" comment="item文字显示的边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="itemtextcolor" default="0xFF000000" type="DWORD" comment="item字体颜色"/&gt;
		&lt;Attribute name="itembkcolor" default="0x00000000" type="DWORD" comment="item背景颜色"/&gt;
		&lt;Attribute name="itembkimage" default="" type="STRING" comment="item背景图片"/&gt;
		&lt;Attribute name="itemaltbk" default="false" type="BOOL" comment="item是否使用隔行交替背景"/&gt;
		&lt;Attribute name="itemselectedtextcolor" default="0xFF000000" type="DWORD" comment="item被选中时的字体颜色"/&gt;
		&lt;Attribute name="itemselectedbkcolor" default="0xFFC1E3FF" type="DWORD" comment="item被选中时的背景颜色"/&gt;
		&lt;Attribute name="itemselectedimage" default="" type="STRING" comment="item被选中时的背景图片"/&gt;
		&lt;Attribute name="itemhottextcolor" default="0xFF000000" type="DWORD" comment="item鼠标悬浮时的字体颜色"/&gt;
		&lt;Attribute name="itemhotbkcolor" default="0xFFE9F5FF" type="DWORD" comment="item鼠标悬浮时的背景颜色"/&gt;
		&lt;Attribute name="itemhotimage" default="" type="STRING" comment="item鼠标悬浮时的背景图片"/&gt;
		&lt;Attribute name="itemdisabledtextcolor" default="0xFFCCCCCC" type="DWORD" comment="item禁用时的字体颜色"/&gt;
		&lt;Attribute name="itemdisabledbkcolor" default="0xFFFFFFFF" type="DWORD" comment="item禁用时的背景颜色"/&gt;
		&lt;Attribute name="itemdisabledimage" default="" type="STRING" comment="item禁用时的背景图片"/&gt;
		&lt;Attribute name="itemlinecolor" default="0x00000000" type="DWORD" comment="item行分割线颜色"/&gt;
		&lt;Attribute name="itemshowhtml" default="false" type="BOOL" comment="item是否使用类html富文本绘制,如(false)"/&gt;
		&lt;Attribute name="multiexpanding" default="false" type="BOOL" comment="是否支持多个item同时打开,如(false)"/&gt;
	&lt;/Combo&gt;
	&lt;Label parent="Control" notifies="setfocus killfocus timer menu windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="align" default="left" type="STRING" comment="文字对齐方式,取值left、right、center、top、bottom，如(center)"/&gt;
		&lt;Attribute name="endellipsis" default="false" type="BOOL" comment="句末显示不全是否使用...代替,如(true)"/&gt;
		&lt;Attribute name="font" default="-1" type="INT" comment="字体id,如(0)"/&gt;
		&lt;Attribute name="textcolor" default="0x00000000" type="DWORD" comment="字体颜色，0表示使用默认字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="disabledtextcolor" default="0x00000000" type="DWORD" comment="disabled字体颜色，0表示使用默认disabled字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="textpadding" default="0,0,0,0" type="RECT" comment="文字显示的边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="showhtml" default="false" type="BOOL" comment="是否使用类html富文本绘制,如(false)"/&gt;
	&lt;/Label&gt;
	&lt;Button parent="Label" notifies="setfocus killfocus timer menu click windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="align" default="left" type="STRING" comment="文字对齐方式,取值left、right、center、top、button，如(center)"/&gt;
		&lt;Attribute name="endellipsis" default="false" type="BOOL" comment="句末显示不完是否使用...代替,如(true)"/&gt;
		&lt;Attribute name="font" default="-1" type="INT" comment="字体id,如(0)"/&gt;
		&lt;Attribute name="textcolor" default="0x00000000" type="DWORD" comment="字体颜色，0表示使用默认字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="disabledtextcolor" default="0x00000000" type="DWORD" comment="disabled字体颜色，0表示使用默认disabled字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="textpadding" default="0,0,0,0" type="RECT" comment="文字显示的边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="showhtml" default="false" type="BOOL" comment="是否使用类html富文本绘制,如(false)"/&gt;
		&lt;Attribute name="normalimage" default="" type="STRING" comment="普通状态图片"/&gt;
		&lt;Attribute name="hotimage" default="" type="STRING" comment="鼠标悬浮的状态图片"/&gt;
		&lt;Attribute name="pushedimage" default="" type="STRING" comment="鼠标按下的状态图片"/&gt;
		&lt;Attribute name="focusedimage" default="" type="STRING" comment="获得焦点时的状态图片"/&gt;
		&lt;Attribute name="disabledimage" default="" type="STRING" comment="禁用的状态图片"/&gt;
		&lt;Attribute name="hottextcolor" default="0x00000000" type="DWORD" comment="鼠标悬浮字体颜色，0表示不使用此颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="pushedtextcolor" default="0x00000000" type="DWORD" comment="鼠标按下字体颜色，0表示不使用此颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="focusedtextcolor" default="0x00000000" type="DWORD" comment="获得焦点字体颜色，0表示不使用此颜色,如(0xFFFF0000)"/&gt;
	&lt;/Button&gt;
	&lt;Option parent="Button" notifies="setfocus killfocus timer menu click selectchanged windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="align" default="left" type="STRING" comment="文字对齐方式,取值left、right、center、top、button，如(center)"/&gt;
		&lt;Attribute name="endellipsis" default="false" type="BOOL" comment="句末显示不完是否使用...代替,如(true)"/&gt;
		&lt;Attribute name="font" default="-1" type="INT" comment="字体id,如(0)"/&gt;
		&lt;Attribute name="textcolor" default="0x00000000" type="DWORD" comment="字体颜色，0表示使用默认字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="disabledtextcolor" default="0x00000000" type="DWORD" comment="disabled字体颜色，0表示使用默认disabled字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="textpadding" default="0,0,0,0" type="RECT" comment="文字显示的边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="showhtml" default="false" type="BOOL" comment="是否使用类html富文本绘制,如(false)"/&gt;
		&lt;Attribute name="normalimage" default="" type="STRING" comment="普通状态图片"/&gt;
		&lt;Attribute name="hotimage" default="" type="STRING" comment="鼠标悬浮的状态图片"/&gt;
		&lt;Attribute name="pushedimage" default="" type="STRING" comment="鼠标按下的状态图片"/&gt;
		&lt;Attribute name="focusedimage" default="" type="STRING" comment="获得焦点时的状态图片"/&gt;
		&lt;Attribute name="disabledimage" default="" type="STRING" comment="禁用的状态图片"/&gt;
		&lt;Attribute name="selectedimage" default="" type="STRING" comment="选中的状态图片"/&gt;
		&lt;Attribute name="foreimage" default="" type="STRING" comment="前景图片"/&gt;
		&lt;Attribute name="hottextcolor" default="0x00000000" type="DWORD" comment="鼠标悬浮字体颜色，0表示不使用此颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="pushedtextcolor" default="0x00000000" type="DWORD" comment="鼠标按下字体颜色，0表示不使用此颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="focusedtextcolor" default="0x00000000" type="DWORD" comment="获得焦点字体颜色，0表示不使用此颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="selectedtextcolor" default="0x00000000" type="DWORD" comment="选中状态字体颜色，0表示不使用此颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="group" default="" type="STRING" comment="所属组的名称，可不设"/&gt;
		&lt;Attribute name="selected" default="false" type="BOOL" comment="是否选中"/&gt;
	&lt;/Option&gt;
	&lt;Text parent="Label" notifies="setfocus killfocus timer menu link windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="align" default="left" type="STRING" comment="文字对齐方式,取值left、right、center、top、button，如(center)"/&gt;
		&lt;Attribute name="endellipsis" default="false" type="BOOL" comment="句末显示不完是否使用...代替,如(true)"/&gt;
		&lt;Attribute name="font" default="-1" type="INT" comment="字体id,如(0)"/&gt;
		&lt;Attribute name="textcolor" default="0x00000000" type="DWORD" comment="字体颜色，0表示使用默认字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="disabledtextcolor" default="0x00000000" type="DWORD" comment="disabled字体颜色，0表示使用默认disabled字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="textpadding" default="2,0,2,0" type="RECT" comment="文字显示的边距,如(2,0,2,0)"/&gt;
		&lt;Attribute name="showhtml" default="false" type="BOOL" comment="是否使用类html富文本绘制,如(false)"/&gt;
	&lt;/Text&gt;
	&lt;Progress parent="Label" notifies="setfocus killfocus timer menu windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="align" default="certer" type="STRING" comment="文字对齐方式,取值left、right、center、top、button，如(center)"/&gt;
		&lt;Attribute name="endellipsis" default="false" type="BOOL" comment="句末显示不完是否使用...代替,如(true)"/&gt;
		&lt;Attribute name="font" default="-1" type="INT" comment="字体id,如(0)"/&gt;
		&lt;Attribute name="textcolor" default="0x00000000" type="DWORD" comment="字体颜色，0表示使用默认字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="disabledtextcolor" default="0x00000000" type="DWORD" comment="disabled字体颜色，0表示使用默认disabled字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="textpadding" default="2,0,2,0" type="RECT" comment="文字显示的边距,如(2,0,2,0)"/&gt;
		&lt;Attribute name="showhtml" default="false" type="BOOL" comment="是否使用类html富文本绘制,如(false)"/&gt;
		&lt;Attribute name="foreimage" default="" type="STRING" comment="前景图片"/&gt;
		&lt;Attribute name="hor" default="true" type="BOOL" comment="水平或垂直,如(true)"/&gt;
		&lt;Attribute name="min" default="0" type="INT" comment="进度最小值，如(0)"/&gt;
		&lt;Attribute name="max" default="100" type="INT" comment="进度最大值，如(100)"/&gt;
		&lt;Attribute name="value" default="0" type="INT" comment="进度值，如(50)"/&gt;
	&lt;/Progress&gt;
	&lt;Slider parent="Progress" notifies="setfocus killfocus timer menu valuechanged windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="align" default="center" type="STRING" comment="文字对齐方式,取值left、right、center、top、button，如(center)"/&gt;
		&lt;Attribute name="endellipsis" default="false" type="BOOL" comment="句末显示不完是否使用...代替,如(true)"/&gt;
		&lt;Attribute name="font" default="-1" type="INT" comment="字体id,如(0)"/&gt;
		&lt;Attribute name="textcolor" default="0x00000000" type="DWORD" comment="字体颜色，0表示使用默认字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="disabledtextcolor" default="0x00000000" type="DWORD" comment="disabled字体颜色，0表示使用默认disabled字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="textpadding" default="2,0,2,0" type="RECT" comment="文字显示的边距,如(2,0,2,0)"/&gt;
		&lt;Attribute name="showhtml" default="false" type="BOOL" comment="是否使用类html富文本绘制,如(false)"/&gt;
		&lt;Attribute name="foreimage" default="" type="STRING" comment="前景图片"/&gt;
		&lt;Attribute name="hor" default="true" type="BOOL" comment="水平或垂直,如(true)"/&gt;
		&lt;Attribute name="min" default="0" type="INT" comment="进度最小值，如(0)"/&gt;
		&lt;Attribute name="max" default="100" type="INT" comment="进度最大值，如(100)"/&gt;
		&lt;Attribute name="value" default="0" type="INT" comment="进度值，如(50)"/&gt;
		&lt;Attribute name="thumbimage" default="" type="STRING" comment="拖动滑块普通状态图片"/&gt;
		&lt;Attribute name="thumbhotimage" default="" type="STRING" comment="拖动滑块鼠标悬浮状态图片"/&gt;
		&lt;Attribute name="thumbpushedimage" default="" type="STRING" comment="拖动滑块鼠标按下状态图片"/&gt;
		&lt;Attribute name="thumbsize" default="10,10" type="SIZE" comment="拖动滑块大小,如(10,10)"/&gt;
		&lt;Attribute name="step" default="1" type="INT" comment="进度步长，如(1)"/&gt;
	&lt;/Slider&gt;
	&lt;Edit parent="Label" notifies="setfocus killfocus timer menu return textchanged windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="align" default="left" type="STRING" comment="文字对齐方式,取值left、right、center、top、button，如(center)"/&gt;
		&lt;Attribute name="endellipsis" default="false" type="BOOL" comment="句末显示不完是否使用...代替,如(true)"/&gt;
		&lt;Attribute name="font" default="-1" type="INT" comment="字体id,如(0)"/&gt;
		&lt;Attribute name="textcolor" default="0x00000000" type="DWORD" comment="字体颜色，0表示使用默认字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="disabledtextcolor" default="0x00000000" type="DWORD" comment="disabled字体颜色，0表示使用默认disabled字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="textpadding" default="0,0,0,0" type="RECT" comment="文字显示的边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="showhtml" default="false" type="BOOL" comment="是否使用类html富文本绘制,如(false)"/&gt;
		&lt;Attribute name="readonly" default="false" type="BOOL" comment="是否只读,如(false)"/&gt;
		&lt;Attribute name="password" default="false" type="BOOL" comment="是否显示密码字符,如(false)"/&gt;
		&lt;Attribute name="maxchar" default="255" type="INT" comment="输入字符最大长度，如(100)"/&gt;
		&lt;Attribute name="normalimage" default="" type="STRING" comment="普通状态图片"/&gt;
		&lt;Attribute name="hotimage" default="" type="STRING" comment="鼠标悬浮状态图片"/&gt;
		&lt;Attribute name="focusedimage" default="" type="STRING" comment="获得焦点状态图片"/&gt;
		&lt;Attribute name="disabledimage" default="" type="STRING" comment="禁用状态图片"/&gt;
		&lt;Attribute name="nativebkcolor" default="0x00000000" type="DWORD" comment="windows原生edit控件的背景颜色,如(0xFFFFFFFF)"/&gt;
	&lt;/Edit&gt;
	&lt;ScrollBar parent="Control" notifies="timer menu scrolled windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="button1normalimage" default="" type="STRING" comment="左或上按钮普通状态图片"/&gt;
		&lt;Attribute name="button1hotimage" default="" type="STRING" comment="左或上按钮鼠标悬浮状态图片"/&gt;
		&lt;Attribute name="button1pushedimage" default="" type="STRING" comment="左或上按钮鼠标按下状态图片"/&gt;
		&lt;Attribute name="button1disabledimage" default="" type="STRING" comment="左或上按钮禁用状态图片"/&gt;
		&lt;Attribute name="button2normalimage" default="" type="STRING" comment="右或下按钮普通状态图片"/&gt;
		&lt;Attribute name="button2hotimage" default="" type="STRING" comment="右或下按钮鼠标悬浮状态图片"/&gt;
		&lt;Attribute name="button2pushedimage" default="" type="STRING" comment="右或下按钮鼠标按下状态图片"/&gt;
		&lt;Attribute name="button2disabledimage" default="" type="STRING" comment="右或下按钮禁用状态图片"/&gt;
		&lt;Attribute name="thumbnormalimage" default="" type="STRING" comment="滑块普通状态图片"/&gt;
		&lt;Attribute name="thumbhotimage" default="" type="STRING" comment="滑块鼠标悬浮状态图片"/&gt;
		&lt;Attribute name="thumbpushedimage" default="" type="STRING" comment="滑块鼠标按下状态图片"/&gt;
		&lt;Attribute name="thumbdisabledimage" default="" type="STRING" comment="滑块禁用状态图片"/&gt;
		&lt;Attribute name="railnormalimage" default="" type="STRING" comment="滑块中间标识普通状态图片"/&gt;
		&lt;Attribute name="railhotimage" default="" type="STRING" comment="滑块中间标识鼠标悬浮状态图片"/&gt;
		&lt;Attribute name="railpushedimage" default="" type="STRING" comment="滑块中间标识鼠标按下状态图片"/&gt;
		&lt;Attribute name="raildisabledimage" default="" type="STRING" comment="滑块中间标识禁用状态图片"/&gt;
		&lt;Attribute name="bknormalimage" default="" type="STRING" comment="背景普通状态图片"/&gt;
		&lt;Attribute name="bkhotimage" default="" type="STRING" comment="背景鼠标悬浮状态图片"/&gt;
		&lt;Attribute name="bkpushedimage" default="" type="STRING" comment="背景鼠标按下状态图片"/&gt;
		&lt;Attribute name="bkdisabledimage" default="" type="STRING" comment="背景禁用状态图片"/&gt;
		&lt;Attribute name="hor" default="true" type="BOOL" comment="水平或垂直,如(true)"/&gt;
		&lt;Attribute name="linesize" default="8" type="INT" comment="滚动一行的大小，如(8)"/&gt;
		&lt;Attribute name="range" default="100" type="INT" comment="滚动范围，如(100)"/&gt;
		&lt;Attribute name="value" default="0" type="INT" comment="滚动位置，如(0)"/&gt;
		&lt;Attribute name="showbutton1" default="true" type="BOOL" comment="是否显示左或上按钮,如(true)"/&gt;
		&lt;Attribute name="showbutton2" default="true" type="BOOL" comment="是否显示右或下按钮,如(true)"/&gt;
	&lt;/ScrollBar&gt;
	&lt;List parent="VerticalLayout" notifies="setfocus killfocus timer menu itemselect windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0'(圆角)| mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="mousechild" default="true" type="BOOL" comment="本控件的子控件是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="inset" default="0,0,0,0" type="RECT" comment="容器的内边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="vscrollbar" default="false" type="BOOL" comment="是否使用竖向滚动条,如(true)"/&gt;
		&lt;Attribute name="hscrollbar" default="false" type="BOOL" comment="是否使用横向滚动条,如(true)"/&gt;
		&lt;Attribute name="childpadding" default="0" type="INT" comment="子控件之间的额外距离,如(4)"/&gt;
		&lt;Attribute name="sepheight" default="0" type="INT" comment="分隔符高度,正负表示分隔符在顶部还是底部,如(4)"/&gt;
		&lt;Attribute name="sepimm" default="false" type="BOOL" comment="拖动分隔符是否立即改变大小,如(false)"/&gt;
		&lt;Attribute name="header" default="true" type="BOOL" comment="是否显示表头,如(true)"/&gt;
		&lt;Attribute name="headerbkimage" default="" type="STRING" comment="表头背景图片"/&gt;
		&lt;Attribute name="scrollselect" default="false" type="BOOL" comment="是否随滚动改变选中项,如(false)"/&gt;
		&lt;Attribute name="itemfont" default="-1" type="INT" comment="item的字体id,如(0)"/&gt;
		&lt;Attribute name="itemalign" default="center" type="STRING" comment="item对齐方式,取值left、right、center，如(center)"/&gt;
		&lt;Attribute name="itemendellipsis" default="false" type="BOOL" comment="item句末显示不全是否使用...代替,如(true)"/&gt;
		&lt;Attribute name="itemtextpadding" default="0,0,0,0" type="RECT" comment="item文字显示的边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="itemtextcolor" default="0xFF000000" type="DWORD" comment="item字体颜色"/&gt;
		&lt;Attribute name="itembkcolor" default="0x00000000" type="DWORD" comment="item背景颜色"/&gt;
		&lt;Attribute name="itembkimage" default="" type="STRING" comment="item背景图片"/&gt;
		&lt;Attribute name="itemaltbk" default="false" type="BOOL" comment="item是否使用隔行交替背景"/&gt;
		&lt;Attribute name="itemselectedtextcolor" default="0xFF000000" type="DWORD" comment="item被选中时的字体颜色"/&gt;
		&lt;Attribute name="itemselectedbkcolor" default="0xFFC1E3FF" type="DWORD" comment="item被选中时的背景颜色"/&gt;
		&lt;Attribute name="itemselectedimage" default="" type="STRING" comment="item被选中时的背景图片"/&gt;
		&lt;Attribute name="itemhottextcolor" default="0xFF000000" type="DWORD" comment="item鼠标悬浮时的字体颜色"/&gt;
		&lt;Attribute name="itemhotbkcolor" default="0xFFE9F5FF" type="DWORD" comment="item鼠标悬浮时的背景颜色"/&gt;
		&lt;Attribute name="itemhotimage" default="" type="STRING" comment="item鼠标悬浮时的背景图片"/&gt;
		&lt;Attribute name="itemdisabledtextcolor" default="0xFFCCCCCC" type="DWORD" comment="item禁用时的字体颜色"/&gt;
		&lt;Attribute name="itemdisabledbkcolor" default="0xFFFFFFFF" type="DWORD" comment="item禁用时的背景颜色"/&gt;
		&lt;Attribute name="itemdisabledimage" default="" type="STRING" comment="item禁用时的背景图片"/&gt;
		&lt;Attribute name="itemlinecolor" default="0x00000000" type="DWORD" comment="item行分割线颜色"/&gt;
		&lt;Attribute name="itemshowhtml" default="false" type="BOOL" comment="item是否使用类html富文本绘制,如(false)"/&gt;
		&lt;Attribute name="multiexpanding" default="false" type="BOOL" comment="是否支持多个item同时打开,如(false)"/&gt;
	&lt;/List&gt;
	&lt;ListHeader parent="HorizontalLayout" notifies="setfocus killfocus timer windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="mousechild" default="true" type="BOOL" comment="本控件的子控件是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="inset" default="0,0,0,0" type="RECT" comment="容器的内边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="vscrollbar" default="false" type="BOOL" comment="是否使用竖向滚动条,如(true)"/&gt;
		&lt;Attribute name="hscrollbar" default="false" type="BOOL" comment="是否使用横向滚动条,如(true)"/&gt;
		&lt;Attribute name="childpadding" default="0" type="INT" comment="子控件之间的额外距离,如(4)"/&gt;
		&lt;Attribute name="sepwidth" default="0" type="INT" comment="分隔符宽,正负表示分隔符在左边还是右边,如(-4)"/&gt;
		&lt;Attribute name="sepimm" default="false" type="BOOL" comment="拖动分隔符是否立即改变大小,如(false)"/&gt;
	&lt;/ListHeader&gt;
	&lt;ListHeaderItem parent="Control" notifies="setfocus killfocus timer headerclick windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="16" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="dragable" default="true" type="BOOL" comment="是否可拖动改变大小,如(true)"/&gt;
		&lt;Attribute name="sepwidth" default="4" type="INT" comment="分隔符宽,如(4)"/&gt;
		&lt;Attribute name="align" default="left" type="STRING" comment="文字对齐方式,取值left、right、cente，如(center)"/&gt;
		&lt;Attribute name="endellipsis" default="false" type="BOOL" comment="句末显示不全是否使用...代替,如(true)"/&gt;
		&lt;Attribute name="font" default="-1" type="INT" comment="字体id,如(0)"/&gt;
		&lt;Attribute name="textcolor" default="0x00000000" type="DWORD" comment="字体颜色，0表示使用默认字体颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="textpadding" default="2,0,2,0" type="RECT" comment="文字显示的边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="showhtml" default="false" type="BOOL" comment="是否使用类html富文本绘制,如(false)"/&gt;
		&lt;Attribute name="normalimage" default="" type="STRING" comment="普通状态图片"/&gt;
		&lt;Attribute name="hotimage" default="" type="STRING" comment="鼠标悬浮的状态图片"/&gt;
		&lt;Attribute name="pushedimage" default="" type="STRING" comment="鼠标按下的状态图片"/&gt;
		&lt;Attribute name="focusedimage" default="" type="STRING" comment="获得焦点时的状态图片"/&gt;
		&lt;Attribute name="sepimage" default="" type="STRING" comment="拖动条图片"/&gt;
	&lt;/ListHeaderItem&gt;
	&lt;ListLabelElement parent="Control" notifies="setfocus killfocus timer itemactivate itemclick windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="selected" default="false" type="BOOL" comment="是否选中,如(true)"/&gt;
	&lt;/ListLabelElement&gt;
	&lt;ListTextElement parent="ListLabelElement" notifies="setfocus killfocus timer itemactivate itemclick link windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="selected" default="false" type="BOOL" comment="是否选中,如(true)"/&gt;
	&lt;/ListTextElement&gt;
	&lt;ListContainerElement parent="Container" notifies="setfocus killfocus timer itemactivate itemclick itemexpanded itemcollapsed windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="mousechild" default="true" type="BOOL" comment="本控件的子控件是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="inset" default="0,0,0,0" type="RECT" comment="容器的内边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="vscrollbar" default="false" type="BOOL" comment="是否使用竖向滚动条,如(true)"/&gt;
		&lt;Attribute name="hscrollbar" default="false" type="BOOL" comment="是否使用横向滚动条,如(true)"/&gt;
		&lt;Attribute name="childpadding" default="0" type="INT" comment="子控件之间的额外距离,如(4)"/&gt;
		&lt;Attribute name="selected" default="false" type="BOOL" comment="是否选中,如(true)"/&gt;
	&lt;/ListContainerElement&gt;
	&lt;RichEdit parent="Container" notifies="setfocus killfocus timer menu return windowinit(root)"&gt;
		&lt;Attribute name="name" default="" type="STRING" comment="控件名字，同一窗口内必须唯一，如(testbtn)"/&gt;
		&lt;Attribute name="pos" default="0,0,0,0" type="RECT" comment="位置，如果为float控件则指定位置和大小，否则只指定大小,如(0,0,100,100)"/&gt;
		&lt;Attribute name="padding" default="0,0,0,0" type="RECT" comment="外边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="bkcolor" default="0x00000000" type="DWORD" comment="背景颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="bkcolor2" default="0x00000000" type="DWORD" comment="背景渐变色2,和bkcolor配合使用,如(0xFFFFFF00)"/&gt;
		&lt;Attribute name="bkcolor3" default="0x00000000" type="DWORD" comment="背景渐变色3,和bkcolor、bkcolor2配合使用,如(0xFFFF00FF)"/&gt;
		&lt;Attribute name="bordercolor" default="0x00000000" type="DWORD" comment="边框颜色,如(0xFF000000)"/&gt;
		&lt;Attribute name="focusbordercolor" default="0x00000000" type="DWORD" comment="获得焦点时边框的颜色,如(0xFFFF0000)"/&gt;
		&lt;Attribute name="colorhsl" default="false" type="BOOL" comment="本控件的颜色是否随窗口的hsl变化而变化,如(false)"/&gt;
		&lt;Attribute name="bordersize" default="1" type="INT" comment="边框大小，如(1)"/&gt;
		&lt;Attribute name="borderround" default="0,0" type="SIZE" comment="边框圆角半径,如(2,2)"/&gt;
		&lt;Attribute name="bkimage" default="" type="STRING" comment="背景图片,如(bk.bmp或file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0' corner='0,0,0,0' mask='#FF0000' fade='255' hole='false' xtiled='false' ytiled='false')"/&gt;
		&lt;Attribute name="width" default="0" type="INT" comment="控件预设的宽度，如(100)"/&gt;
		&lt;Attribute name="height" default="0" type="INT" comment="控件预设的高度，如(30)"/&gt;
		&lt;Attribute name="minwidth" default="0" type="INT" comment="控件的最小宽度，如(100)"/&gt;
		&lt;Attribute name="minheight" default="0" type="INT" comment="控件的最小高度，如(30)"/&gt;
		&lt;Attribute name="maxwidth" default="9999" type="INT" comment="控件的最大宽度，如(100)"/&gt;
		&lt;Attribute name="maxheight" default="9999" type="INT" comment="控件的最大高度，如(30)"/&gt;
		&lt;Attribute name="text" default="" type="STRING" comment="显示文本,如(测试文本)"/&gt;
		&lt;Attribute name="tooltip" default="" type="STRING" comment="鼠标悬浮提示,如(请在这里输入你的密码)"/&gt;
		&lt;Attribute name="userdata" default="" type="STRING" comment="自定义标识"/&gt;
		&lt;Attribute name="enabled" default="true" type="BOOL" comment="是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="mouse" default="true" type="BOOL" comment="本控件是否可以响应鼠标操作,如(true)"/&gt;
		&lt;Attribute name="mousechild" default="true" type="BOOL" comment="本控件的子控件是否可以响应用户操作,如(true)"/&gt;
		&lt;Attribute name="visible" default="true" type="BOOL" comment="是否可见,如(true)"/&gt;
		&lt;Attribute name="float" default="false" type="BOOL" comment="是否使用绝对定位,如(true)"/&gt;
		&lt;Attribute name="shortcut" default="" type="CHAR" comment="对应的快捷键,如(P)"/&gt;
		&lt;Attribute name="menu" default="false" type="BOOL" comment="是否需要右键菜单,如(true)"/&gt;
		&lt;Attribute name="inset" default="0,0,0,0" type="RECT" comment="容器的内边距,如(2,2,2,2)"/&gt;
		&lt;Attribute name="vscrollbar" default="false" type="BOOL" comment="是否使用竖向滚动条,如(true)"/&gt;
		&lt;Attribute name="autovscroll" default="false" type="BOOL" comment="是否随输入竖向滚动,如(true)"/&gt;
		&lt;Attribute name="hscrollbar" default="false" type="BOOL" comment="是否使用横向滚动条,如(true)"/&gt;
		&lt;Attribute name="autohscroll" default="false" type="BOOL" comment="是否随输入横向滚动,如(true)"/&gt;
		&lt;Attribute name="childpadding" default="0" type="INT" comment="子控件之间的额外距离,如(4)"/&gt;
		&lt;Attribute name="wanttab" default="true" type="BOOL" comment="是否接受tab按键消息,如(true)"/&gt;
		&lt;Attribute name="wantreturn" default="true" type="BOOL" comment="是否接受return按键消息,如(true)"/&gt;
		&lt;Attribute name="wantctrlreturn" default="true" type="BOOL" comment="是否接受ctrl+return按键消息,如(true)"/&gt;
		&lt;Attribute name="transparent" default="true" type="BOOL" comment="是否背景透明,如(true)"/&gt;
		&lt;Attribute name="rich" default="true" type="BOOL" comment="是否使用富格式,如(true)"/&gt;
		&lt;Attribute name="multiline" default="true" type="BOOL" comment="是否使用多行,如(true)"/&gt;
		&lt;Attribute name="readonly" default="false" type="BOOL" comment="是否只读,如(false)"/&gt;
		&lt;Attribute name="numberonly" default="false" type="BOOL" comment="是否只接受数字输入,如(true)"/&gt;
		&lt;Attribute name="password" default="false" type="BOOL" comment="是否显示密码符,如(true)"/&gt;
		&lt;Attribute name="align" default="left" type="STRING" comment="文字对齐方式,取值left、right、cente，如(center)"/&gt;
		&lt;Attribute name="font" default="-1" type="INT" comment="字体id,如(0)"/&gt;
		&lt;Attribute name="textcolor" default="0xFF000000" type="DWORD" comment="字体颜色，如(0xFFFF0000)"/&gt;
	&lt;/RichEdit&gt;
&lt;/Controls&gt;</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=571</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Duilib中使用TeeChart Pro v8（or手动添加ActiveX控件）</title>
		<link>https://www.softwareace.cn/?p=562</link>
		<comments>https://www.softwareace.cn/?p=562#comments</comments>
		<pubDate>Tue, 10 Sep 2013 00:48:37 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[win32]]></category>
		<category><![CDATA[duilib]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=562</guid>
		<description><![CDATA[作为一个方便大众的ActiveX控件，在C++中竟然只能在MFC被傻瓜式地操控是不对滴，而当这种专利居然在不引 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>作为一个方便大众的ActiveX控件，在C++中竟然只能在MFC被傻瓜式地操控是不对滴，而当这种专利居然在不引入afxwin.h和afxdisp.h的情况下都还要有所体现的时候，朕就hold不住了，誓要能死你个落伍的小玩意儿！</p>
<p>经过这两天的搏斗，朕在没有整过activeX这小b玩意儿的情况下还是收获了一些技巧，特此记录下来以便日后查看，也为苦于在C++中手动添加ActiveX时想摆脱mfc的小白们提供一些便利。<br />
p.s. 当初在网上搜了半天都没有找到完整的一套操作步骤，对于朕这种小白来说入手起来真是太耽误时间了&#8230;</p>
<p>废话不多说，上正文 &gt;&gt;&gt;</p>
<p>● 主要思想<br />
用MFC加载ActiveX控件很简单，几步就弄好了，在面板上直接插入、设置属性、添加变量&#8230;反正几下就可以显示了，VS会直接生成啥啥头文件（cpp文件目录下）还有tlh、tli之类的文件(Debug文件夹中)。但在非MFC工程中无法以同样的方法自动引入控件来使用，因此我们引入MFC中生成好的.tlh和.tli文件，就可以使用控件中的各种属性和方法了。</p>
<p>● 下载安装TeeChart Pro ActiveX控件<br />
慧都公司是TeeChart在国内的代理，慧都控件网上可以下载试用版和用户手册啥的，但是其可恨之处在于下载了试用版后，去TeeChart官网上申请序列号时网站慢得一比那啥，而且朕还是翻墙哟亲，不翻的话连卡的机会都木有哟亲，好不容易加载完界面，填完了信息后一提交便陷入无止尽的等待&#8230;朕只好转而用盗版了&#8230;TeeChart Pro v8还真不好找，全是CSDN上收3分5分的下载，后来下个v5的版本整了半天老崩溃（朕是win7 64位home版，IDE是vs2008）。</p>
<p>最后才发现其实下载下来安装完了无非就用到个.ocx文件，安装时顺便帮你注册了，还有就是安装后会自带很多MFC的例子，然后就没有然后了。于是果断只下载了个TeeChart v8的ocx文件（度娘一搜就有很多，还不用受50天试用限制哟亲）。</p>
<p>下载了.ocx文件了要在注册表里注册啊，简单啊，但正版的win7有时很2啊，直接运行cmd注册这玩意儿不好使啊，所以64位的win7童鞋，请打开您的C:\Windows\SysWOW64\，里面有个cmd.exe看到了伐，右键“以管理员身份运行”，然后在cmd里面输入“regsvr32 D:\TeeChart8.ocx”（绝对路径就行），这样就算注册完鸟，就可以在MFC里面找到这个ActiveX控件鸟~</p>
<p>● 在MFC中引入ActiveX控件，生成.tlh和.tli文件<br />
(参照http://blog.csdn.net/boygrass/article/details/7482530）<br />
新建MFC工程&#8212;-为工程添加一个新类，选择Categories下的MFC Class From TypeLib（这里很多人会选错成MFC Class From ActiveX Control） &#8212;- 选择从Registry（注册表）添加类，Available type libraries中选择TeeChart Pro ActiveX Control v8，从下面的接口选择中，选择需要用到的接口（可全选）&#8212;-资源视图在对话框上单击右键，选择Insert ActiveX Control，再选择TeeChart Pro ActiveX Control &#8212;- 对话框上出现了TeeChart控件，调整它的大小并把它移到合适的位置上，双击TeeChart控件，为控件添加一个Series<br />
我这里选择Fast Line的Series &#8212;- 右键单击控件，Add Variable(添加变量)，都使用默认设置，设置Variable name，我这里设为：m_tchartDemo &#8212;-在CXXXXXDlg类的构造函数中，把m_tchartDemo(0)去掉。并在XXXXDlg.cpp中添加#include &#8220;CTChart.h&#8221;。</p>
<p>好了，快编译吧快编译吧&#8230;在工程目录里的Debug文件夹下面找到teechart8.tlh和teechart8.tli，马上复制在手，咱走着~~MFC拜拜吧您肋~</p>
<p>● 在Duilib中使用TeeChart<br />
把刚出炉的teechart8.tlh和teechart8.tli拷贝到duilib工程目录下，在VS中将teechart8.tlh添加到工程的头文件目录中，在使用控件的cpp中直接#include &#8220;teechart8.tlh&#8221;就能用鸟~需要注意的是teechart8.tlh里面引用teechart8.tli的路径需要改成当前teechart8.tli的路径。<br />
顺便说下，xml中的clsid号是{BDEB0088-66F9-4A55-ABD2-0BF8DEEC1196}，我下载的这个版本是这个clsid，如有雷同，纯属您跟我是同一版本,此外，IDD是IID_IDispatch，多说无益，.tlh有ActiveX控件的所有方法，用户手册里面也都挺全的。</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=562</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>duilib中使用CWebBrowserUI去掉IWebBrowser2的边框</title>
		<link>https://www.softwareace.cn/?p=547</link>
		<comments>https://www.softwareace.cn/?p=547#comments</comments>
		<pubDate>Mon, 26 Aug 2013 00:23:48 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[duilib]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=547</guid>
		<description><![CDATA[[crayon-69e76486af589107239588/] &#160;]]></description>
				<content:encoded><![CDATA[<p></p><pre class="crayon-plain-tag">STDMETHODIMP DuiLib::CWebBrowserUI::GetHostInfo( DOCHOSTUIINFO* pInfo ) { pInfo-&gt;dwFlags |= DOCHOSTUIFLAG_NO3DBORDER;//去掉3D边框 if (m_pWebBrowserEventHandler) { return m_pWebBrowserEventHandler-&gt;GetHostInfo(pInfo); } return S_OK; }
1.修改CWebBrowserUI的STDMETHOD(GetHostInfo)(DOCHOSTUIINFO* pInfo)函数，如下：

STDMETHODIMP DuiLib::CWebBrowserUI::GetHostInfo( DOCHOSTUIINFO* pInfo )
{
pInfo-&gt;dwFlags |= DOCHOSTUIFLAG_NO3DBORDER;//去掉3D边框
if (m_pWebBrowserEventHandler)
{
return m_pWebBrowserEventHandler-&gt;GetHostInfo(pInfo);
}
return S_OK;
}
注意：此种方法直接修改了库的源码，不建议。

2.建一个新类继承自CWebBrowserEventHandler覆盖HRESULT STDMETHODCALLTYPE GetHostInfo(DOCHOSTUIINFO __RPC_FAR *pInfo)如下：

virtual HRESULT STDMETHODCALLTYPE GetHostInfo( DOCHOSTUIINFO __RPC_FAR *pInfo)
{
if (pInfo != NULL)
{
pInfo-&gt;dwFlags |= DOCHOSTUIFLAG_NO3DBORDER;
}
return S_OK;
}
使用的时候

pWeb-&gt;SetWebBrowserEventHandler(你的子类);
建议此方法，不修改源库，继承的方法。</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=547</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Duilib 使用IE</title>
		<link>https://www.softwareace.cn/?p=546</link>
		<comments>https://www.softwareace.cn/?p=546#comments</comments>
		<pubDate>Mon, 26 Aug 2013 00:22:25 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[ui]]></category>
		<category><![CDATA[win32]]></category>
		<category><![CDATA[duilib]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=546</guid>
		<description><![CDATA[[crayon-69e76486af796353084483/] &#160;]]></description>
				<content:encoded><![CDATA[<p></p><pre class="crayon-plain-tag">1.xml中配置&lt;ActiveX name="ie" clsid="{8856F961-340A-11D0-A96B-00C04FD705A2}" delaycreate="false"/&gt;

2.代码中实现：

CActiveXUI* pActiveXUI = static_cast&lt;CActiveXUI*&gt;(m_pm.FindControl(_T("ie")));
if( pActiveXUI ) 
 {
    IWebBrowser2* pWebBrowser = NULL;
    pActiveXUI-&gt;GetControl(IID_IWebBrowser2, (void**)&amp;pWebBrowser);
    if( pWebBrowser != NULL ) 
    {
     pWebBrowser-&gt;Navigate(L"http://www.duilib.com",NULL,NULL,NULL,NULL); 
     pWebBrowser-&gt;Release();
    }
  }

CWebBrowserUI 使用
1.XML配置&lt;WebBrowser name="ie" clsid="{8856F961-340A-11D0-A96B-00C04FD705A2}" delaycreate="false"/&gt;

2.创建CWebBrowserEventHandler* m_pWebBrowserEventHandler对象

3.如果不需要滚动条则需要在virtual HRESULT STDMETHODCALLTYPE GetHostInfo(/* [out][in] */ DOCHOSTUIINFO __RPC_FAR *pInfo)中设置pInfo-&gt;dwFlags |= DOCHOSTUIFLAG_SCROLL_NO | DOCHOSTUIFLAG_NO3DBORDER;
4.如果不想要菜单则在virtual HRESULT STDMETHODCALLTYPE ShowContextMenu(
/* [in] */ DWORD dwID,
/* [in] */ POINT __RPC_FAR *ppt,
/* [in] */ IUnknown __RPC_FAR *pcmdtReserved,
/* [in] */ IDispatch __RPC_FAR *pdispReserved)
返回S_OK，如果想要显示菜单则返回S_FALSE

5.打开页面

CWebBrowserUI  * pWebBrowserUI = static_cast&lt;CWebBrowserUI *&gt;(m_pm.FindControl(_T("ie")));
 pWebBrowserUI -&gt;SetWebBrowserEventHandler(m_pWebBrowserEventHandler);
if(  pWebBrowserUI != NULL )  {
      pWebBrowserUI -&gt;Navigate2(_T("http://www.duilib.com")); 
 }</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=546</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Duilib编译成静态库</title>
		<link>https://www.softwareace.cn/?p=538</link>
		<comments>https://www.softwareace.cn/?p=538#comments</comments>
		<pubDate>Fri, 23 Aug 2013 01:33:07 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[duilib]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=538</guid>
		<description><![CDATA[这套库做界面还是非常不错的，虽然官方团队开始了Lomox的研发，不再支持这套库了，但是它依然有它的价值。 感谢 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>这套库做界面还是非常不错的<del>，虽然官方团队开始了Lomox的研发，不再支持这套库了，但是它依然有它的价值。</del></p>
<p>感谢指正。</p>
<p>有很多人不知道如何编译成静态库，其实很简单的。</p>
<p><strong>首先在vs中设置duilib项目。如图：配置类型改为静态库。</strong></p>
<p><img alt="" src="http://my.csdn.net/uploads/201206/13/1339587585_2808.png" /></p>
<p><strong>第二步修改UIlib.h头文件上面的宏。如图：</strong></p>
<p><img alt="" src="http://my.csdn.net/uploads/201206/13/1339587688_8295.png" /></p>
<p><strong>第三步在这个头文件下面添加内容：</strong></p>
<p><strong>#pragma comment(lib,&#8221;oledlg.lib&#8221;)<br />
#pragma comment(lib,&#8221;winmm.lib&#8221;)<br />
#pragma comment(lib,&#8221;comctl32.lib&#8221;)<br />
#pragma comment(lib,&#8221;Riched20.lib&#8221;)</strong></p>
<p><strong>如图：</strong></p>
<p><img alt="" src="http://my.csdn.net/uploads/201206/13/1339587748_8785.png" /></p>
<p>&nbsp;</p>
<p>然后编译，看看它的生成目录是不是有个DuiLib.lib文件生成。注意不是bin目录。</p>
<p>修改第一个demo的链接项，编译后连同它需要的皮肤文件拷贝到任意一个地方，运行试试</p>
<p>from <a href="http://blog.csdn.net/tornodo/article/details/7660728">http://blog.csdn.net/tornodo/article/details/7660728</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=538</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
