dskinlite(uieasy mfc界面库)使用记录4:listbox测试
先看效果图:

xml代码:
作者qq:80101277,dskinlite交流qq群:138231653 <window name="listbox1" type="listbox">
<property bkcolor="#system_bg" bordercolor="RGB(0,255,0)" scrollbar="scrollbar" headerctrl="headerctrl" />
<rect id="border" index="1" bordercolor="#system.border" borderwidth="1" style="hole" />
<rect id="border" index="2" bordercolor="RGB(255,255,255)" left="1" top="1" right="-1" bottom="-1" borderwidth="1" style="hole" /> <rect id="item" bordercolor="RGB(221,234,242)" fillcolor="RGB(232,247,254)" left="1" bottom ="-1" state="over"/>
<image id="item" picfile="#listbox.select" left="3" right="-15" paintmode="stretchparthorz" left_part="3" right_part="3" state="checked"/>
<rect id="listitem.odd" bordercolor="RGB(255,255,255)" fillcolor="RGB(251,251,255)" state="all"/>
<rect id="listitem.even" bordercolor="RGB(255,255,255)" fillcolor="RGB(243,248,251)" state="all"/> <listboxinfo bDrawOver="true" itemheight="35" >
<drawitem id="default" >
<image state="all" id="image.default" picfile="#face.default" left="5" top="2" width="20" height="20"/>
<text id="text.default" content="" left="30" top="4" state="normal" textcolor="RGB(0,0,0)" font="#default"/>
<text id="text.default" content="" left="30" top="4" state="over" textcolor="RGB(255,0,0)" font="#default"/>
<text id="text.default" content="" left="30" top="4" state="checked" textcolor="RGB(255,0,0)" font="#default"/> <eventitem id="close" event="LButtonDown" cursor="handcur" state="over|checked" left="-20" top="5" width="15" height="15" 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() 加入如下代码:
dsSkinWindow(GetSafeHwnd(), SKIN_TYPE_DIALOG, NULL, TRUE);
dsSkinWindow(m_listbox1.GetSafeHwnd(), SKIN_TYPE_LISTBOX, L"listbox1", FALSE);
m_listbox1.SetItemHeight(, );
for (int i = ; 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, , _T("image.default"), img, FALSE);
dsSetDrawItemValueEx(m_listbox1.GetSafeHwnd(), i, , _T("text.default"), title, FALSE);
}
dskinlite(uieasy mfc界面库)使用记录4:listbox测试的更多相关文章
- dskinlite(uieasy mfc界面库)使用记录1: schema验证xml
市场上的MFC第三方库很多,最终选定dskinlite企业版,成熟度比较高,当然价格也略贵. 在2017年仍然使用MFC是有些另类,但特定场景很适用,也适合不愿转型的老程序员. 目前处于学习阶段,欢迎 ...
- dskinlite(uieasy mfc界面库)使用记录4:绘制动态元素(listbox)
效果图: XML代码: 299行的headerctrl只针对listview有效,这里是listbox,忽略 wirelessName,wirelessStatus,wirelessSignal会通过 ...
- dskinlite(uieasy mfc界面库)使用记录3:绘制动态元素(按钮控件通过隐藏方式修改图片显示)
效果图: 分别是:正常,正常鼠标悬停,按下,按下鼠标悬停 XML代码: 75,76行定义了一个image,注意id和index属性 初始化代码: click代码: 147,148,153,154:通过 ...
- dskinlite(uieasy mfc界面库)使用记录2:绘制动态元素(按钮控件绘制元素动态控制,改变图片和文字)
效果图:这4个分别是按钮按下后4种状态的效果 第88行是显示默认的按钮文字,没有id,SetWindowText改的就是它了 第87行是左边的图片,id是ico,可以通过程序控制 第89行是蓝色的文字 ...
- BCGcontrolBar(一) MFC界面库简介
原帖地址:http://blog.csdn.net/zw514159799/article/details/9148385 英文原文:http://www.bcgsoft.com/bcgcontrol ...
- MFC界面库BCGControlBar v30.1新功能详解:Dialogs和Forms
亲爱的BCGSoft用户,我们非常高兴地宣布BCGControlBar Professional for MFC和BCGSuite for MFC v30.1正式发布!此版本包含themed find ...
- MFC界面库BCGControlBar v30.1——Grid/Report控件
亲爱的BCGSoft用户,我们非常高兴地宣布BCGControlBar Professional for MFC和BCGSuite for MFC v30.1正式发布!此版本包含themed find ...
- VC UI界面库大集合
Guitoolkit http://www.beyondata.com/pwc.html The Ultimate Toolbox http://www.codeproject.com/KB/MFC/ ...
- 常见MFC UI界面库[转]
Xtrme toolkit,BCGControlBar,SkinMagic,AppFace,Skin++,Uskin++,SYGUI,LibUIDK,GuiToolkit,GardenUI等等,除了后 ...
随机推荐
- iptables 配置说明
#配置,禁止进,允许出,允许回环网卡 iptables -P INPUT DROP iptables -P OUTPUT ACCEPT iptables -A INPUT -i lo -j ACCEP ...
- Idea spring 配置文件报红 URI is not registered
把报错的加到如下忽略列表中
- LeetCode 144. Binary Tree Preorder Traversal 二叉树的前序遍历 C++
Given a binary tree, return the preorder traversal of its nodes' values. Example: Input: [,,] \ / Ou ...
- Open SuSE 设置开关机时自动执行脚本
在open SuSE中,有两个文件是用于存放开机自动执行命令的.这两个文件分别是: /etc/init.d/before.local /etc/init.d/after.local /etc/init ...
- 如何自学Java开发
对于这个话题,已经不止N次在线上或线下听到了.从这个话题被太多的人提问及回答,我们可以肯定地说,Java这个已经有近15年头的计算机编程语言是有着及其广阔的应用领域和独特而短期无法替代的优势.我们姑且 ...
- Django05-模型系统model
Object Relational Mapping(ORM) 一.ORM介绍 1.ORM概念对象关系映射(Object Relational Mapping,简称ORM)模式是一种为了解决面向对象与关 ...
- css note
1.text-align规定了其子元素的对齐方式,当设置在子元素无效时,尝试设置在父元素,子元素可以水平居中: 2.vertical-align使用的前提,首先元素必须是display:inline ...
- java学习--Iterable 和 Iterator
Iterable Iterable :故名思议,实现了这个接口的集合对象支持迭代,是可迭代的. 一个集合对象要表明自己支持迭代,能有使用foreach语句的特权,就必须实现Iterable接口,表明我 ...
- 折腾newifi3 d2笔记
1.忘记密码,恢复出厂 通电开机,等正常运行后,长按RESET大约6~8秒,见所有灯开始一起慢闪,可松手等重启就是出厂状态了,出厂IP是:192.168.99.1 2.免拆机刷breed 首先要打开s ...
- Java实现把图片转成字符画
1,先看效果图: