如何在 Windows 列表视图控件中自定义绘制所选项目行
我已经创建了 NM_CUSTOMDRAW 消息处理程序来自定义绘制列表视图控件子项。差不多就OK了。但是,我无法自定义绘制选定的项目。我的自定义设置始终被忽略,并绘制蓝色 bkColor 上的默认白色文本。
我可以有机会自定义绘制选定的项目吗?
I have created NM_CUSTOMDRAW message handler to custom draw List-View control subitems. It is almost OK. However, I can't custom draw item which is selected. My custom settings are always ignored and default white text over blue bkColor is drawn.
Can I have any chance to custom draw selected items?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已成功编写代码以在 OnCustomDraw() 处理程序的 CDDS_ITEMPREPAINT 绘制阶段中自定义绘制所选项目,并在绘制所选项目后返回 CDRF_SKIPDEFAULT:
到目前为止,此代码工作得很好。热烈欢迎任何改进建议。
I have successfully written code to custom draw selected item in CDDS_ITEMPREPAINT draw stage of OnCustomDraw() handler, and return CDRF_SKIPDEFAULT after selected item drawn:
This code works so far so good. Any improvement suggestion is warmly welcome.