如何在mfc中合并clistctrl的列标题 [英] How to merge column header of clistctrl in mfc

查看:113
本文介绍了如何在mfc中合并clistctrl的列标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

|类别| Server1 | Server2 |

| | -summary | -detailed | -summary | -detailed |

| cat1 | - - | - - |





此处摘要和详细信息将带有复选框' - '表示复选框。

我需要在一台服务器下放置2列。我怎么做?



我尝试过:



我已成功放入复选框

|Category | Server1 | Server2 |
| |-summary |-detailed |-summary | -detailed |
|cat1 | - - | - - |


here summary and detailed will have checkbox '-' denotes checkbox.
I need to put 2 columns under one server. How i can do it?

What I have tried:

I have successfully put checkbox

推荐答案

参见合并mfc中clistcntrl的两个标题列 [ ^ ]。看起来你不能这样做。
See Merge two header columns of clistcntrl in mfc[^]. It appears that you cannot do that.


你不能直接做,而且努力工作,但是有一些策略可以用于更复杂的列表控件。关键是覆盖一些成员来操纵控件和/或所有者绘图的外观。



所以我搜索一些例子,希望你能找到一些有用的例子。首先是所有者绘图的另一个例子< a href =https://www.codeproject.com/Articles/11954/Custom-Drawn-Vertical-Tree-Control>所有者绘图有一些重写和多行列表控件。另一个更复杂的情况是您将控件放在列表控件元素中,如列表控制扩展进度控制



我个人不喜欢改变行为并看起来没有标准控件的感觉,因为它让普通用户感到厌烦。所以也要考虑重新考虑你的复杂设计。
You cant do it direct and it will be hard work, but there are some strategies for more complex list controls. The key is overriding some members for manipulating the appareance of the control and/or owner drawing.

So I search some examples and hope that you find some of it useful. First an example owner drawing, another example of owner drawing with some overriding and an example of multi line list control. Another and more complex scenario is that you place controls in a list control element like in this List Control Extended for Progress Control.

I personally dislike changing the behaviour and look'n'feel of standard controls because it is irretating the average users. So also consider to rethink your complex design.


这篇关于如何在mfc中合并clistctrl的列标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆