• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 358
  • Last Modified:

CListCtrl:: 2 line column titles

In a CListCtrl, I would like to have 2 line column titles.
How do I do this ?
0
softev
Asked:
softev
1 Solution
 
Tommy HuiCommented:
Your best bet would be to take a look at the grid control on http://www.codeguru.com, which gives you more control over the list control.

http://www.codeguru.com/controls/gridctrl.shtml


0
 
Answers2000Commented:
My suggestion are two possible approaches

Either
(1) Find the header control on the list control (it's a child window so you can find it easily by stepping thru children it's usually the only one - if not double check by checking the class name)  subclass this and/or draw the text into a bitmap and put the bitmap onto the header control instead of the actual text

or

(2) Turn off the header in the list control.  Put your own header control above the real one.  In the case you need to respond to messages (for example column resizing) sent to the header control, and invoke the corresponding action on the list control.

I like (1) better but it's tricky, but can be done.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now