Solved

CListCtrl(CListView) Problem: how to draw bitmap background for big icon view

Posted on 1998-02-02
1
697 Views
Last Modified: 2013-11-19
I am trying to put a bitmap background for my list view controls. I have a solution for report view with LVS_OWNERDRAWFIXED style, by overwriting function DrawItem of class CListView.
However for big icon view, the function DrawItem() of CListCtrl or CListView won't get called. So I overwrite the OnPaint() function to repaint everything. It basically works, but I got a lot of problems-- such as the device context is not right, and it blinks annoyingly when I click on the client area. I believe it's not the right way to do it, I think it'd better to tell the parent the visual aspect of the list view has changed so that DrawItem can be called, but I don't know how.
If anyone has some experience on this, please give me some idea, I'd appreciate your help. Thank you in advance.

0
Comment
Question by:KZhou
1 Comment
 

Accepted Solution

by:
wisered earned 120 total points
ID: 1315404
Override OnEraseBkgnd, and paint the background there. This should prevent the flickering, and be faster the OnPaint.
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

Suggested Solutions

Title # Comments Views Activity
How to know only "File created" with EventLog 3 32
conditional code and condition difference 9 77
mapAB Challlenge 35 124
Problem to open Excel file 15 97
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

910 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

20 Experts available now in Live!

Get 1:1 Help Now