Solved

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

Posted on 2004-04-23
4
3,018 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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.
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…

733 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