Solved

c# Custom ListView Control - Painting of Custom Header is awfully slow

Posted on 2004-04-23
4
2,979 Views
Last Modified: 2007-12-19
I have derived a custom ListView in C#  and I draw a custom Header(Native Window).
(I draw multi line strings in the headers - not provided by Native ListView)
I am drawing the header seperation lines and the header text in WM_DRAWITEM message where ctrltype is ODT_HEADER

Everything works fine. But when I fit the columns, the custom drawing happens visibly and it is slow and looks awkward.

I want the drawing of the custom header to happen only on EndUpdate.
(It happens when I am specifying the widths of the columns
ie., I am saying listview.columns(1).width = -1 for fitting data and the painting happens then)

Help Experts. Please help...

Thanks in advance
0
Comment
Question by:rajaloysious
4 Comments
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 10900932
0
 
LVL 8

Author Comment

by:rajaloysious
ID: 10975269
i have found the solution for this and lockwindowupdate api solves the issue.

Experts,
Kindly refund my points. Thanks
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 11757140
PAQed, with points refunded (500)
ee_ai_construct - CS Mod
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 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

22 Experts available now in Live!

Get 1:1 Help Now