Solved

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

Posted on 2004-04-23
4
3,003 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 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