Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 1998-02-02
1
Medium Priority
?
747 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

688 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