Look first:
XML code:
author Qq:80101277,dskinlite QQ Group: 138231653
<windowname= "ListBox1"type= "ListBox"> < PropertyBkcolor= "#system_bg"bordercolor= "RGB (0,255,0)"ScrollBar= "ScrollBar"Headerctrl= "Headerctrl" /> <rectID= "Border"Index= "1"bordercolor= "#system. Border"BorderWidth= "1"style= "Hole" /> <rectID= "Border"Index= "2"bordercolor= "RGB (255,255,255)" Left= "1"Top= "1" Right= "-1"Bottom= "-1"BorderWidth= "1"style= "Hole" /> <rectID= "Item"bordercolor= "RGB (221,234,242)"FillColor= "RGB (232,247,254)" Left= "1"Bottom= "-1" State= "Over"/> <ImageID= "Item"Picfile= "#listbox. Select" Left= "3" Right= " -15"Paintmode= "Stretchparthorz"Left_part= "3"Right_part= "3" State= "Checked"/> <rectID= "Listitem.odd"bordercolor= "RGB (255,255,255)"FillColor= "RGB (251,251,255)" State= "All"/> <rectID= "Listitem.even"bordercolor= "RGB (255,255,255)"FillColor= "RGB (243,248,251)" State= "All"/> <ListboxinfoBdrawover= "true"ItemHeight= "+" > <DrawItemID= "Default" > <Image State= "All"ID= "Image.default"Picfile= "#face. Default" Left= "5"Top= "2"width= " the"Height= " the"/> <textID= "Text.default"content="" Left= "+"Top= "4" State= "normal"TextColor= "RGB (0,0,0)"Font= "#default"/> <textID= "Text.default"content="" Left= "+"Top= "4" State= "Over"TextColor= "RGB (255,0,0)"Font= "#default"/> <textID= "Text.default"content="" Left= "+"Top= "4" State= "Checked"TextColor= "RGB (255,0,0)"Font= "#default"/> <EventitemID= "Close"Event= "Lbuttondown"cursor= "Handcur" State= "over|checked" Left= " -20"Top= "5"width= " the"Height= " the"Visible= "true"> <Image State= "normal"Picfile= "#extend. Listbox.closebtn.nor" /> <Image State= "Over"Picfile= "#extend. Listbox.closebtn.over" /> </Eventitem> </DrawItem> </Listboxinfo></window>
BOOL Cxxdlg::oninitdialog () Add the following code:
Dsskinwindow (GetSafeHwnd (), Skin_type_dialog, NULL, TRUE); Dsskinwindow (M_listbox1. GetSafeHwnd (), Skin_type_listbox, L"ListBox1", FALSE); M_listbox1. SetItemHeight (0, -); for(inti =0; I < +; i++) {CString title; Title. Format (L"%x---%x---%x", I, I, I); M_listbox1. Insertstring (i, _t ("")); M_listbox2. Insertstring (i, title); CString img= Getfaceimagebyindex (i% -); Dssetdrawitemvalueex (M_listbox1. GetSafeHwnd (), I,0, _t ("Image.default"), IMG, FALSE); Dssetdrawitemvalueex (M_listbox1. GetSafeHwnd (), I,0, _t ("Text.default"), title, FALSE); }
Dskinlite (Uieasy MFC interface Library) using logging 4:listbox testing