Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have created sample dialog application in MFC.
Inside dialog a list control is displayed with 1000 column.
The header is not drawn properly.
Is there any problem with the header of CListCtrl?
Posted
Comments
Joan M 13-May-11 3:10am    
Could you describe why "header is not drawn properly" I mean... what do you see?
Does it happens in all the columns? it starts from column number X?

PS: 1000 columns seems a little bit excessive to me, but... this is only an opinion, who knows what you want to achieve...
Roger Gonsalves 13-May-11 4:46am    
Thanks for quick response.
I found the answer at following link.

http://www.ms-news.net/f3291/clistctrl-columns-width-pixel-limits-in-header-ctrl-of-32768-a-2586598.html
Joan M 13-May-11 4:53am    
OK ;), the answer seems reasonable...
Roger Gonsalves 16-May-11 1:28am    
Is it possible to resolve this issue of header not drawing after 32767 pixel?

1 solution

I agree with Joan Murt's comment. 1000 columns is not reasonnable. Even though it would work and display properly, do you really think the user can read that?

Try with a few columns (let's say 10) to see if your problem persists.
- If it doesn't, then consider displaying just a few columns at a time.
- If the problem persists even with a few columns, then you have a problem in your code. In that case you should post some code so we can analyse it.
 
Share this answer
 
Comments
Roger Gonsalves 13-May-11 4:46am    
Thanks for quick response.
I found the answer at following link.

http://www.ms-news.net/f3291/clistctrl-columns-width-pixel-limits-in-header-ctrl-of-32768-a-2586598.html
Olivier Levrey 13-May-11 4:48am    
Ok good ;)
Roger Gonsalves 16-May-11 1:28am    
Is it possible to resolve this issue of header not drawing after 32767 pixel?
Olivier Levrey 16-May-11 3:38am    
It is not possible as far as I know. The only possibility is to make your columns smaller, or display fewer columns.
Roger Gonsalves 29-Jun-11 0:37am    
I resolved this by creating my own control, which is derived from CStatic.
I handled the drawing in my own class.
Since in my case I want to just display the information (other features such as column/row resizing and row selection are not required), it was easy to develop the control.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900