Solved

CListCtrl:: 2 line column titles

Posted on 1998-07-23
2
305 Views
Last Modified: 2013-11-20
In a CListCtrl, I would like to have 2 line column titles.
How do I do this ?
0
Comment
Question by:softev
2 Comments
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1319660
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
 
LVL 8

Accepted Solution

by:
Answers2000 earned 100 total points
ID: 1319661
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now