Solved

How to center align 'subitem image' in a List Control

Posted on 2006-06-11
6
1,754 Views
Last Modified: 2013-11-20
Is it possible to center align the subitem image (no text in subitem) in a List control (CListCtrl)? CListCtrl::SetItem() doesn't seem to do so. Help please!
0
Comment
Question by:zabbas
  • 3
  • 3
6 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 125 total points
ID: 16883393
Are you using it in report mode?

Just a guess - have you tried the LVCFMT_CENTER option when preparing the column headers.

      LVCOLUMN lvc;

      lvc.mask = LVCF_SUBITEM  | LVCF_FMT;   //add whatever other flags you require
      lvc.fmt = LVCFMT_CENTER;   //add whatever other flags you require


It might not work - if it doesn't then all I can suggest is an owner-draw list control.
0
 

Author Comment

by:zabbas
ID: 16884223
Yes I am using it in report mode.

Yes I have tried LVCFMT_CENTER when inserting columns but it appears to be aligning the text and not the images.

Owner-draw is an option but I have not much time to do in that way.

Thanks for your input.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 16884259
It was a long shot (the LVCFMT_CENTER).

Do you want to wait and see if someone else has a suggestion or do you need help with the owner draw?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:zabbas
ID: 16884788
For the moment I am not planning to (re)do all the stuff using owner draw lists. So i'll wait for couple of days to see if someone else has any suggestion (chances are very dim).
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 16885299
OK.
0
 

Author Comment

by:zabbas
ID: 16922002
I guess no one has solution for this. So i have no choice but to accept the try from AndyAinscow.

Thanks.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 49
iSeries FTP Exit Program 8 136
Fibonacci challenge 11 123
Problem to event 3 97
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

810 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