Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 1998-02-02
1
Medium Priority
?
763 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 240 total points
ID: 1315404
Override OnEraseBkgnd, and paint the background there. This should prevent the flickering, and be faster the OnPaint.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

876 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