Open source DirectUI interface development library DUILIB trial demo (Win32 program)

Demo third edition of the source code VC2005 project (with all .h, ansi / Unicode lib, DLL) , download address: http: //goo.gl/c0L7Q

 
Open Source Project Address: http://code.google.com/p/duilib/
The project is based on the principle of a foreigner viksoe DirectUI analysis papers and example: http://www.viksoe.dk/code/windowless1.htm
 
SVN checkout the source project conducted a trial, the use of the example program in the List control, mostly fake Windows standard ListCtrl, ie the head of the list + plain text (icon) application mode list item, and most DirectUI application scenarios the case is, List-- list item that is similar to the complex structure of the Thunder and other download software complex text, progress bars, buttons, drop-down boxes and other controls (and this is the modern software, including mobile phone software, for example, use up to iPhone, Android's type of control layout), probably looked at DUILIB controls the source code, the interface library, implementation of this complex List should be
(XML configuration): 
  1. <List name="" text="" tooltip="" float="false" bordersize="1" bkcolor="#FFE0F0FE" bordercolor="#FF1B4876" itemselectedbkcolor="#FFC1E3FF" itemhotbkcolor="#FFE9F5FF" header="hidden" inset="3,3,3,3" bkimage="file='downlist_bk.png' ytiled='true'">
  2. <ListContainerElement height="45">
  3. <HorizontalLayout name="" text="" tooltip="" float="false" bkcolor="#006B93B2" childpadding="10" inset="3,5,3,5">
  4. <Button name="" text="" tooltip="" float="false" bordersize="0" width="32" maxheight="26" bkcolor2="#FF757676" bordercolor="#FF000000" bkimage="downlist_app.png" normalimage="file='downlist_ok.png' dest='20,14,32,26'" />
  5. <VerticalLayout>
  6. <Label text="Download_0098_44.exe" textcolor="#FFAAAAAA" showhtml="true"></Label>
  7. <Progress float="false" fgimage="file='progress_fore.png'" min="0" max="100" value="100" maxheight="7" maxwidth="200"/>
  8. </VerticalLayout>
  9. <VerticalLayout width="80">
  10. <Label align="right" text="2.04M " textcolor="#FFAAAAAA" showhtml="true"></Label>
  11. <HorizontalLayout>
  12. <Label text="<b>打开</b>" textcolor="#FFAAAAAA" showhtml="true"></Label>
  13. <Label text="<b>文件夹</b>" textcolor="#FFAAAAAA" showhtml="true"></Label>
  14. </HorizontalLayout>
  15. </VerticalLayout>
  16. </HorizontalLayout>
  17. </ListContainerElement>
  18. </List>

I.e., ListContainerElement application, the control should be as similar to the main interface layout container Container as use, i.e., it enables complex list item layout arbitrary main interface can be employed in the List control; 

dynamic codes implementations should: 
  1. CListUI* pList = static_cast<CListUI*>(m_pm.FindControl(_T("listdemo")));      
  2. CListContainerElementUI *pElement = new CListContainerElementUI;            CTextUI *pTemp1 = new CTextUI;            pTemp1->SetAttribute(_T("text"), _T("This is a text"));               pElement->Add(pTemp1);    
  3. CComboUI *pTemp2 = new CComboUI;        
  4. CListLabelElementUI *pLabel = new CListLabelElementUI;        
  5. pLabel->SetAttribute(_T("text"), _T("Combo list1"));      
  6. pTemp2->Add(pLabel);           
  7. pLabel = new CListLabelElementUI;      
  8. pLabel->SetAttribute(_T("text"), _T("Combo list2"));      
  9. pTemp2->Add(pLabel);        pLabel = new CListLabelElementUI;  
  10. pLabel->SetAttribute(_T("text"), _T("Combo list3"));    
  11. pTemp2->Add(pLabel);      
  12. pElement->Add(pTemp2);  
  13. pElement->SetAttribute(_T("height"), _T("30"));
  14.         
  15. pList->Add(pElement);          


Roughly achieve a little, the effect of general annex screenshots, demo program is that SVN checkout out source code in a demo test app, simply changes a bit xml file path interface only, will not repeat put, exe in tarball, temporarily did not do event handling, mainly written presentation xml for reference purposes only, we hope that more exchanges, to have a more convenient way to achieve Open source DirectUI interface development library DUILIB trial demo <wbr> (Win32 program)      
PS: Let not pay even the trial is not to sell on price DirectUI business development libraries to the history of it, oyeah ~~

Guess you like

Origin www.cnblogs.com/blogpro/p/11426976.html