怎样静态调用XML资源描述文件生成控件,主程序是DirectUI框架的,资源描述都放在一个XML文件里面,可是怎么把这个文件和我的程序联系起来呢,要解析这个文件么?给点思路吧,分不多,谅解!!
XML文件部分控件信息内容如下:<Element Layout="FillLayout()" Margin="rect(0,2,0,0)" LayoutPos="Bottom">
<Element id="atom(idMyPaneInfoPane_Left)" Layout="FlowLayout()" Margin="rect(0,0,0,0)" LayoutPos="Left"> <CmdButton CmdID="16001" Layout="FlowLayout()" Margin="rect(0,0,5,0)" id="atom(idOCToolbar)" Active="MouseAndKeyboard" AccName="mainToolbar_phone" AccDesc="resstr(65033, library(beccres.dll))">
<PNG Flip="false" IdRes="65013" />
<!--<Element Padding="rect(0,0,0,0)" Content="resstr(65033,library(beccres.dll))"/>-->
</CmdButton>
<CmdButton CmdID="16002" Layout="FlowLayout()" Margin="rect(0,0,5,0)" id="atom(idOCToolbar)" Active="MouseAndKeyboard" AccName="mainToolbar_sms" AccDesc="resstr(65031, library(beccres.dll))">
<PNG Flip="false" IdRes="65011"/>
<!--<Element Padding="rect(0,0,0,0)" Content="resstr(65031,library(beccres.dll))"/>-->
</CmdButton>
<CmdButton CmdID="16003" Layout="FlowLayout()" Margin="rect(0,0,5,0)" id="atom(idOCToolbar)" Active="MouseAndKeyboard" AccName="mainToolbar_phonemeeting" AccDesc="resstr(65054, library(beccres.dll))">
<PNG Flip="false" IdRes="65019"/>
</CmdButton> </Element> <Element id="atom(idMyPaneInfoPane_Right)" Layout="FlowLayout()" Margin="rect(0,0,0,0)" LayoutPos="Right">
<CmdButton CmdID="16010" Layout="FlowLayout()" id="atom(idOCToolbar)" Active="MouseAndKeyboard" AccName="mainToolbar_addcontact" AccDesc="resstr(65053, library(beccres.dll))">
<PNG Flip="false" IdRes="65016"/>
</CmdButton>
</Element> </Element>
我感觉这么基础的功能,作为一个框架还是要有的吧。我没用过DirectUI。
回答的挺好
但是我感觉没抓住重点,我的问题是:怎样静态调用XML资源描述文件生成控件,大概就是这个意思吧,VC资源是放在.RC文件中,现在我把资源放到XML文件中,该怎么调用?
我是第一次接触XML和DirectUI,没看过太多的相关资料,也不知道该看那些,一些名称的说法也都是我自己定义的,也许描述的不是专业,但大概就是那个意思吧,我觉得,明白的人,一看便知