Solved

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

Posted on 2006-06-11
6
1,743 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

920 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

13 Experts available now in Live!

Get 1:1 Help Now