Solved

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

Posted on 1998-02-02
1
688 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
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.

762 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

19 Experts available now in Live!

Get 1:1 Help Now