惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
T
The Exploit Database - CXSecurity.com
Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy & Cybersecurity Law Blog
L
LINUX DO - 热门话题
T
Threat Research - Cisco Blogs
T
Tenable Blog
TaoSecurity Blog
TaoSecurity Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
AI
AI
P
Proofpoint News Feed
A
About on SuperTechFans
P
Privacy International News Feed
月光博客
月光博客
雷峰网
雷峰网
S
Secure Thoughts
博客园 - 叶小钗
博客园 - 聂微东
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Project Zero
Project Zero
The Cloudflare Blog
SecWiki News
SecWiki News
The Hacker News
The Hacker News
V
Vulnerabilities – Threatpost
罗磊的独立博客
A
Arctic Wolf
阮一峰的网络日志
阮一峰的网络日志
Know Your Adversary
Know Your Adversary
酷 壳 – CoolShell
酷 壳 – CoolShell
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Troy Hunt's Blog
The Last Watchdog
The Last Watchdog
Schneier on Security
Schneier on Security
小众软件
小众软件
有赞技术团队
有赞技术团队
博客园 - 司徒正美
T
Tailwind CSS Blog
量子位
C
Cybersecurity and Infrastructure Security Agency CISA
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
S
Security @ Cisco Blogs
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
L
Lohrmann on Cybersecurity

博客园 - 想飞

区块链应用场景 系统微服务架构 shell sed命令 项目pom.xml第一行报错解决方案 Fabric事务机制 MSP成员服务管理 Dockerfile 说明 Docker-Compose 配置详解 Fabric 术语 Docker数据管理:Named volume Mac 查看Volumes Android中的JSON详细总结 经典黑客程序gh0st汇编改写 关于使用WM_COPYDATA进行进程之间交换数据的问题 关于金山开源界面BkWin不能使用DDX 的解决办法 CListBox没产生LBN_SELCHANGE消息 使用#define定义引用的编译问题 浏览器研究 图片合并工具V1.1
WTL中CListViewCtrl中LVS_ICON和LVS_REPORT模式的不同
想飞 · 2011-07-27 · via 博客园 - 想飞

LVS_SINGLESELCListViewCtrl的风格: 

LVS_ICON: 为每个item显示大图标

LVS_SMALLICON: 为每个item显示小图标

LVS_LIST: 显示一列带有小图标的item

LVS_REPORT: 显示item详细资料

直观的理解:windows资源管理器,“查看”标签下的“大图标,小图标,列表,详细资料” 

应用LVS_REPORT模式:

m_AttachList.Create( this->m_hWND, 

NULL, NULL, 

WS_CLIPCHILDREN | WS_CHILD | LVS_REPORT | LVS_SINGLESEL  , 

0, IDB_HOME_ATTACH_LISTVIEW, NULL); 

应用LVS_ICON模式: 

m_ListIcon.Create( GetViewHWND(), 

NULL, NULL, 

WS_VISIBLE |WS_BORDER| WS_CHILD | LVS_ICON   , 

0, IDC_SELECT_ICON_LIST, NULL);

ATLASSERT(m_pImageList != NULL);

ATLASSERT(m_uNumIcons != 0);

//LVS_REPORT LVS_ICON

LONG lStyle;

lStyle = ::GetWindowLong(m_ListIcon.m_hWnd, GWL_STYLE);  //获取当前窗口类型

lStyle &= ~LVS_TYPEMASK;   //清除显示方式位

lStyle |= LVS_SMALLICON;   //设置显示方式

::SetWindowLong(m_ListIcon.m_hWnd, GWL_STYLE, lStyle);  //设置窗口类型

m_uNumIcons = m_pImageList->GetImageCount();

m_ListIcon.SetImageList(m_pImageList->m_hImageList, LVSIL_SMALL);

需要注意的是:LVS_ICON模式需要指定WS_VISIBLE式样,并且不能和

 

LVS_SINGLESEL一起用。

同时需要清除显示方式位才能正常显示。

记录于此!