Solved

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

Posted on 2004-04-23
4
2,990 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

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 Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

943 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

16 Experts available now in Live!

Get 1:1 Help Now