Solved

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

Posted on 2006-06-11
6
1,729 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
List out all word 7 224
countEvens challenge 2 59
only14 challenge 19 64
building a service to accessed via telnet client, want colors ? 4 78
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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 video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

759 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

18 Experts available now in Live!

Get 1:1 Help Now