如何合并两个标头并在mfc中的clistctrl中给出obe名称 [英] How do i merge two headers and give obe name in clistctrl in mfc
问题描述
嗨开发者,
我的项目中有ClistCtrl,有4个标题,意思是4个列。标题命名为Header1,Header2,Header3,Header4。让我们说这些标题的值是Value1,Value2,Value3,Value4。(作为一行)
我需要的是我想合并Header1和Header 2并给出新名称DetailsA,我想合并Header 3和Header4并给出名称DetailsB。
如何合并这些标题并给出新名称。
注意:值1,值2,值3和值4将保持不变它是。
我是否需要覆盖绘制方法......或者我们有办法做到这一点。
任何人都可以提供代码的snippit来实现这一目的。
问候,
欢乐
我尝试过:
尚未尝试.. 。不知道怎么做。
Hi devs,
I have ClistCtrl in my project with 4 headers which means 4 colums. Headers are named as Header1,Header2, Header3, Header4. Lets say Values to these headers are as Value1, Value2, Value3, Value4.( as a row)
My need is that I want to merge Header1 and Header 2 and give new name as DetailsA and I want to merge Header 3 And Header4 and give name DetailsB.
How can I merge these headers and give new names.
Note: Value 1 , Value2 , Value3 and Value4 will remain displying as it is.
Do I need to override draw method...or we have any way to do this.
Can anybody provide snippit of code which will do the trick.
Regards,
Joy
What I have tried:
Not tried yet...do not know how to do this .
推荐答案
我认为没有任何设施可以做到这一点;请参阅关于列表视图控件(Windows) [ ^ ]。您可以尝试使用LVS_OWNERDRAWFIXED,如列表视图窗口样式(Windows) [ ^ ]。
I do not think there is any facility to do this; see About List-View Controls (Windows)[^]. You could try using LVS_OWNERDRAWFIXED as described in List-View Window Styles (Windows)[^].
这篇关于如何合并两个标头并在mfc中的clistctrl中给出obe名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!