Home >> Visual C++ / C++ >> Controls >> ListView Control
Embracing the full spectrum of developer needs including content supporting 64 bit, Multi-Core, Tools, and Optimization.
Sun's AMD Opteron Compatibility Guarantee
They promise what?! Yes indeed, Sun offers a legally binding guarantee that future versions of Solaris will support any AMD Opteron-based application that will run on the current version of the OS.
Read more.
Future-Proof Your File System in 5 Minutes on AMD
ZFS, the open source, freely available 128-bit file system, now included with the Solaris 10 operating system (as well as other OSes based on the OpenSolaris project), moves data fast, scales without practical limit and makes File System Check (FSCK) obsolete. Here's what you need to know about ZFS on AMD64. Read more.
AMD's Multiple Threads, Multiple Cores, Multiple Gains
Author Peter Aitken walks through the benefits of preemptive multitasking and the opportunities there are for developers.
Read more.
Taking Advantage of Concurrent Programming for Windows, Part 3: Locality Effects in .NET Multi-Core Programming
In this third segment, author Larry O'Brien shows one way the data caches on the Opteron and Athlon processor families help prevent "premature optimization." Read more.
For more relevant code samples, tutorials and editorials click here.
ListView Control
Advanced
[Updated] MFC Extension Classes CListCtrlEx and CListViewEx
Rating: Thomas Holte - 08/17/2006 Augmented versions of CListCtrl and CListView with sort direction indicators, coloring of the sort column, column hiding, and more.Windows Forms: Creating an SDI ListView and Control Panel UI
Rating: Tom Archer - MSFT - 12/13/2004 Tom Archer illustrates how easy Visual Studio .NET and Windows Forms make creating interfaces that once required manual coding.
MFC Virtual List Control
Rating: Andrew Small - 04/10/2001 Removes the mystery of associating list views (controls) with large amounts of data
Copying/Moving Rows in CListCtrl
Rating: James Spibey - 06/19/1999 Copying/Moving Rows in CListCtrl
Owner drawn control
Rating: Zafir Anjum - 08/06/1998 Owner drawn control
Changing row height in owner drawn control
Rating: Zafir Anjum - 08/06/1998 Changing row height in owner drawn control
Serializable CListCtrl with check sum verify
Rating: none Mihai Filimon - 08/06/1998 Serializable CListCtrl with check sum verify
Background color and image
ListView Loading Images BMP, PNG, GIF, JPEG, WMF, ICO, and EMF Files Natively (pure WINAPI)
Rating: Ali Imran - 08/08/2006 Learn about the possibilites and extra functionality that a simple ListView provides for loading images, either from an external image file, an Internet URL, application resources, and from external EXE, DLL, OCS, or CPL files.How to Skin CListCtrl, Including Scrollbars and Column Headers
Rating: Greg Ellis - 08/15/2003 Learn how to skin a CListCtrl, including the CHeaderCtrl and the scrollbars. You will be able to totally customize the look and feel of almost all the aspects of a CListCtrl. (The article, demo program, and figures were updated.)
Setting the Background Image for a List Control
Rating: Mahesh Kumar S - 05/06/2003 A simple article on how to place a background image in a list control.
Changing the Background Color of Individual Listview Columns
Rating: Hari Krishnan - 08/23/2002 Learn how to change the background color of individual columns in a list view.
Change the background color of individual columns
Rating: none Zafir Anjum - 08/06/1998 Change the background color of individual columns
Use a bitmap as a background image
Rating: Zafir Anjum - 08/06/1998 Use a bitmap as a background image
Change background color
Rating: Zafir Anjum - 08/06/1998 Change background color
Change background color of individual rows
Rating: Zafir Anjum - 08/06/1998 Change background color of individual rows
Checkboxes
Add checkboxes
Rating: Eran Yariv - 02/01/1999 Add checkboxesTo make check boxes act like radio buttons (mutually exclusive)
Rating: none Praveen S. Kumar - 02/01/1999 To make check boxes act like radio buttons (mutually exclusive)
Columns
How to Easily Navigate and Edit a List View Control
Rating: Dr. Sai - 01/05/2004 Learn how to navigate through the controls the way one navigates in an Excel sheet.Retrieving the column caption
Rating: none Thomas Blenkers - 07/25/1999 Retrieving the column caption
Ensure (partial) visibility of a column
Rating: Daniel Frey - 09/03/1998 Ensure (partial) visibility of a column
How to set a minimum column width
Rating: Zafir Anjum - 08/06/1998 How to set a minimum column width
Autosize a column to fit its content
Rating: Roger Onslow - 08/06/1998 Autosize a column to fit its content
The Header Control
Rating: none Zafir Anjum - 08/06/1998 The Header Control
Determining right click on the header control
Rating: none Zafir Anjum - 08/06/1998 Determining right click on the header control
Disable clicking on selected report view columns
Rating: none Petr Novotny - 08/06/1998 Disable clicking on selected report view columns
Getting the number of columns in the report view
Rating: none Zafir Anjum - 08/06/1998 Getting the number of columns in the report view
Detecting column index of the item clicked
Rating: none Zafir Anjum - 08/06/1998 Detecting column index of the item clicked
Prevent column resizing (2)
Rating: none Charles Herman - 08/06/1998 Prevent column resizing (2)
Prevent column resizing
Rating: Zafir Anjum - 08/06/1998 Prevent column resizing
Adding a column
Rating: none Zafir Anjum - 08/06/1998 Adding a column
Custom Drawing
Custom Draw ListView Controls, Part I
Rating: Roger Onslow - 04/13/2001 In this first part of a two-part series programming owner-drawn controls, Roger Onslow introduces the concepts and techniques behind writing your own controls.Custom Draw ListView Controls, Part II
Rating: Roger Onslow - 04/13/2001 Roger walks you through the creation of a class that eases the burden on the working class programmer when it comes to custom draw controls.
Data
[Updated] Spying a File System
Rating: Vitali Halershtein - 04/29/2004 How to create the basis for a file system spy application.One-To-Many Relationship Between Two List Controls
Rating: none Alexander Khudyakov - 10/14/2003 Discover an example of data structures for the realization of constructing a one-to-many relationship between two data structures.
The CTableView class - CListView-based grid for really huge datasets
Rating: none Max Kazanowsky - 11/26/2001 The CTableView class - CListView-based grid for really huge datasets
Virtualizing List Views to Handle Large Amounts of Data
Rating: Scott Driscoll - 02/16/2001 Shows how to use the LVS_OWNERDATA style to control the display of extremely large data sets
Deleting
Deleting a Multiple Selection of Rows in a Listview Control
Rating: none Daniel Bartsch - 03/03/2003 Learn how to delete more than one row/item of a listview control in reported mode at once.Drag & Drop
A Drag and Drop List Control
Rating: astanley - 03/15/2004 Discover a new implementation of a drag and drop in a list and tree control.Insert and Replace in a List Control
Rating: Douglas Fraser - 06/25/2003 Build a listview control that can be used to highlight a row in two different colors'—one for inserting and one for replacing data depending on the position of the cursor.
List Control with OLE Drag '& Drop
Rating: Jean Claude Dauphin - 11/09/2000 This extended list control allow OLE drag and drop between multiple list controls
CreateDragImage for (Unlimited) Multiply Selected Items
Rating: none Hao ( David ) TRAN - 05/01/2000 Includes great Dual-ListCtrl Selection Manager Demo!
Drag '& Drop CListCtrl-derived Class
Rating: none Stuart Carter - 02/02/2000 Enhanced CListCtrl control that accepts drag '& drop of files
CreateDragImage for multiple selected items in CListCtrl
Rating: none Frank Kobs - 12/21/1999 CreateDragImage for multiple selected items in CListCtrl
Alternative CreateDragImage() to drag a complete row
10/19/1998 Alternative CreateDragImage() to drag a complete row
Dragging columns to rearrange column sequence
Rating: none Zafir Anjum - 08/06/1998 Dragging columns to rearrange column sequence
Dragging Items to Rearrange Rows
Rating: Wayne Berthin - 08/06/1998 Dragging Items to Rearrange Rows
Editing items and subitem
Simplified Subitem Editing
Rating: Gunnar Andre Dalsnes - 01/03/2003 A way to subclass the listview edit control.Easy Navigation Through an Editable List View
Rating: none Lee Nowotny - 06/19/1999 Easy Navigation Through an Editable List View
Editing listview subitems using LVM_GETEDITCONTROL
Rating: Reg Anderson - 11/21/1998 Editing listview subitems using LVM_GETEDITCONTROL
Allowing items to be edited
Rating: Zafir Anjum - 08/06/1998 Allowing items to be edited
Editable subitems
Rating: Zafir Anjum - 08/06/1998 Editable subitems
Using a drop down list to change a subitem
Rating: Zafir Anjum - 08/06/1998 Using a drop down list to change a subitem
Editing item programmatically
Rating: none Zafir Anjum - 08/06/1998 Editing item programmatically
Multiline Editable Subitems
Rating: Rex Myer - 08/06/1998 Multiline Editable Subitems
FilterBar
Example of the new ListView FilterBar feature (IE5)
Rating: none James R. Twine - 08/03/1999 Example of the new ListView FilterBar feature (IE5)Grid lines
List control with single / double separator lines
10/05/1998 List control with single / double separator linesDrawing horizontal and vertical gridlines
Rating: Zafir Anjum - 08/06/1998 Drawing horizontal and vertical gridlines
Vertical lines for column borders
Rating: Zafir Anjum - 08/06/1998 Vertical lines for column borders
Fix resizing problem in above article
Rating: none Serge Wautier - 08/06/1998 Fix resizing problem in above article
Header Control
Multiline Header Control Inside a CListCtrl
Rating: none Alberto Gattegno and Alon Peleg - 05/18/2000 If you've ever had listviews where some of the column headings would display better on multiple lines, this article is for you!Handling right-click on the CListCtrl header control
Rating: none Alberto Gattegno - 04/03/2000 An alternative to determining the right click on the header of the CListCtrl
Outlook 98-Style FlatHeader Control
Rating: Maarten Hoeben - 01/13/2000 Outlook 98-Style FlatHeader Control
Contiuously updating sizing header
Rating: none Alger Pike - 02/23/1999 Contiuously updating sizing header
Autofit Header Control
Rating: none Baldvin Hansson - 02/23/1999 Autofit Header Control
Catching header messages in a CListView
Rating: Justin Mitchell - 11/21/1998 Catching header messages in a CListView
OLE Controls: Subclassing the List View Control using MFC
09/23/1998 Repainting header and border of ActiveX listview
Introduction
How do I use a derived CListCtrl with a CListView?
Rating: Zafir Anjum - 10/01/2002 How do I use a derived CListCtrl with a CListView?Using text callbacks
Rating: none Chris Maunder - 08/11/1998 Using text callbacks
Using derived CListCtrl in CListView - Undocumented
Rating: none Zafir Anjum - 08/06/1998 Using derived CListCtrl in CListView - Undocumented
ListView Control
Creating a CListCtrl Class with Item Style Features (CListCtrlStyled Class)
Rating: Sébastien ANDRE - 08/06/2002 Create a class that uses "Custom Draw" capabilities for the drawing the CListCtrl. No owner-draw control is needed.Synchronization of scrolling of two list controls
Rating: Alexander Khudyakov - 06/10/2002 Shows the synchronization of scrolling of two list controls.
Report Control - An Outlook 2000-Style SuperGrid Control
Rating: Maarten Hoeben - 06/26/2001 This is an update (over 30 changes) of Maarten's ReportCtrl control. This is an Outlook 98/2000 style SuperGrid control.
Embed Progress Bars in a List Control
Rating: Scott Guillaudeu - 06/14/2001 This control can be used for displaying the progress of multiple events simultaneously. Each line in a list control can have its own progress bar. Progress bars operate independently and (can be) simultaneously.
Displaying an Empty ListView Message
Rating: none Mauro Ghini - 01/05/2000 Displays message so that user knows ListView is intentionally empty
Personalizing highlight colors through custom draw
Rating: none Damian Smith - 12/20/1999 Personalizing highlight colors through custom draw
Custom Draw items inside a ListView Control
Rating: Navi Singh - 06/19/1999 Custom Draw items inside a ListView Control
Miscellaneous
Accessing the Address Book Data Using MAPI
Rating: muthuis - 10/28/2004 Learn the different ways of accessing the address book data using Extended MAPI. It explains how to work with both smaller and larger address books in a Global Address List of an organization.SuperGrid: Yet Another ListView Control
Rating: Allan Nielsen - 01/13/2000 SuperGrid: Yet Another ListView Control
MeasureItem for dynamic font changing in a list control
Rating: none Peter Ierardi - 10/11/1998 MeasureItem for dynamic font changing in a list control
Stopping flicker during updates
Rating: Roger Onslow - 08/06/1998 Stopping flicker during updates
IE4 Extended Styles in a List Control
Rating: Garth Tolmie - 08/06/1998 IE4 Extended Styles in a List Control
CSortedListCtrl reusable base class
Rating: none Staffe Christian - 08/06/1998 CSortedListCtrl reusable base class
Using sub-stings in non report view
Rating: none Carsten Witte - 08/06/1998 Using sub-stings in non report view
Full row selection and title tips
Rating: none Matthew Bells - 08/06/1998 Full row selection and title tips
Printing the control
Rating: Philippe Carret - 08/06/1998 Printing the control
Class with full row highlighting, dragable headers, sorting
Rating: none James Schubert - 08/06/1998 Class with full row highlighting, dragable headers, sorting
Navigation
Navigating through CListCtrl's rows with the arrow and tab keys
Rating: none Michael Stradley - 04/24/1999 Navigating through CListCtrl's rows with the arrow and tab keysNew ListView control (IE 4.0)
Class for using new features in listview control
Rating: none Rui Santos - 08/06/1998 Class for using new features in listview controlPrinting
How to Determine Whether a Printer Supports Color
Rating: Mike Harnad - 03/25/2004 Learn how to determine whether a printer supports color printing.CPrintListCtrl Class
Rating: Mike Marquet - 09/27/2001 CListCtrl-derived class that prints (without MFC support) - Updated to fix bugs and more.
Print the contents of the list control
Rating: none Ravi Reddy - 02/02/1999 Print the contents of the list control
Plug-in class to support printing from a listview
Rating: none Gregory Goeppel - 02/02/1999 Class that supports black '& white printing from a listview (in "report view mode")
Property Lists
Completely Customizable Properties Window
Rating: none Brett R. Mitchell - 11/24/2000 Properties window with combo boxes that communicates with owner when properties are changedAn Adaptable Property List Control
Rating: none Stefan Belopotocan - 06/23/2000 Very nice list control for displaying VB-like properties dialog
Creating an Object Property List using the CListCtrl
Rating: none Marlon Tang - 02/05/1999 Creating an Object Property List using the CListCtrl
Reports
[Updated] Resources Explorer
Rating: Georges Dumond - 09/07/2006 Learn about a search files with resources to explore it. The selected resource can be extracted. This tool is a sample of using Splitter, List, Tree, and resource display.Customized Report List Control with In-Place Combo Box '& Edit Control
Rating: Aravindan Premkumar - 01/07/2004 Learn how to implement a customized report list control with in-place combo box and edit control by using the reusable classes.
Scrollbars
Hide Scrollbars from a CListCtrl
Rating: Lars Werner - 06/30/2003 Removes the scrollbars from a CListCtrl without losing the ability to scroll.Selection
Select Multiple Items Functionally Without Pressing the CTRL or SHIFT Key in a List View Control
Rating: none Jung Minki - 12/06/2005 Learn how to select multiple items without pressing the CTRL or SHIFT key on a touchscreen app or Windows CE app.Retrieving selected items
Rating: Zafir Anjum - 08/06/1998 Retrieving selected items
Grid List Control
Rating: none Rex Myer - 08/06/1998 Grid List Control
Set focus on a cell
Rating: none Shilpa Shamapant - 08/06/1998 Set focus on a cell
Select an item even if click is not on left most column
Rating: Zafir Anjum - 08/06/1998 Select an item even if click is not on left most column
Selection highlighting of entire row
Rating: Zafir Anjum - 08/06/1998 Selection highlighting of entire row
Selecting and deselecting a range of rows
Rating: none Zafir Anjum - 08/06/1998 Selecting and deselecting a range of rows
Select item programmatically
Rating: none Zafir Anjum - 08/06/1998 Select item programmatically
Sorting
[Updated] A Very Useful Class to Display SQL SELECT Results
Rating: Vitali Halershtein - 09/13/2004 Display the results of a SQL SELECT operation. Many grid controls are available for VC++ developers, but this control is small yet contains many features for developers and end users.Quick Sort Algorithm Comparing Any Data Type
Rating: none David Flores - 07/31/1999 Quick Sort Algorithm Comparing Any Data Type
Rearranging List Control Rows through Drag and Drop (including demos!)
Rating: none Tom Hill - 03/23/1999 Rearranging List Control Rows through Drag and Drop (including demos!)
Sorting list on Numeric Column
Rating: none Todd D. Degani - 08/06/1998 Sorting list on Numeric Column
Sort columns by the image index of the column
Rating: none Mark Findlay - 08/06/1998 Sort columns by the image index of the column
Sorting list based on integers in any column
Rating: Eric Vella - 08/06/1998 Sorting list based on integers in any column
Sorting the list based on text in any column
Rating: Zafir Anjum - 08/06/1998 Sorting the list based on text in any column
Determining row indices in Sorting Comparison function
Rating: Kamalahasan Rajaram - 08/06/1998 Determining row indices in Sorting Comparison function
Indicating sort order in header control
Rating: Zafir Anjum - 08/06/1998 Indicating sort order in header control
A Multi Column Sort listview
Rating: none Craig Lucas - 08/06/1998 A Multi Column Sort listview
Sorting the list when user clicks on column header
Rating: Zafir Anjum - 08/06/1998 Sorting the list when user clicks on column header
Automatically resorting after an edit
Rating: Zafir Anjum - 08/06/1998 Automatically resorting after an edit
Sort list (numeric/text/float/date) using callback
Rating: Max Poliashenko - 08/06/1998 Sort list (numeric/text/float/date) using callback
Sort list (numeric/text) using callback
Rating: none Iuri Apollonio - 08/06/1998 Sort list (numeric/text) using callback
Sort list based on text/numeric/date-time in any column
Rating: Tal J. Rosen - 08/06/1998 Sort list based on text/numeric/date-time in any column
Tooltip & Titletip
Adding Multiline Balloon ToolTips to ListView Column Headers
Rating: 10Tec Company - 04/07/2003 Learn now to add multiline balloon ToolTips to ListView column headers.List control multiline tooltip(DataTip)
Rating: JeongHwan Cho - 08/01/2001 This article show you a [large] data tip for a list control plus a sophisticated header tool tip.
List Control with Tooltips
Rating: none Kory Becker - 01/24/2001 CListCtrl-derived class that displays tooltips for list items regardless of listview style: List, Report and Icon
Enhanced Title Tip Handling
Rating: none Leonid Prokopovich - 06/19/1999 Enhanced Title Tip Handling
Handling Title Tips With Drag/Drop Headers Using The Visual C++ 6.0 CListCtrl
Rating: none Kevin Delgado - 09/02/1998 Handling Title Tips With Drag/Drop Headers Using The Visual C++ 6.0 CListCtrl
Tooltip for individual cells
Rating: none Zafir Anjum - 08/06/1998 Tooltip for individual cells
Tooltip for individual column header
Rating: none Zafir Anjum - 08/06/1998 Tooltip for individual column header
Tooltip for the header
Rating: none Zafir Anjum - 08/06/1998 Tooltip for the header
Titletip for individual cells
Rating: none Zafir Anjum - 08/06/1998 Titletip for individual cells
Using images
Using Thumbnail Images in a List Control
Rating: Yi Ren - 02/11/2001 Demo application that illustrates using thumbnail images in a list controlList Control displaying image thumbnails
Rating: Stefan Ungureanu - 02/02/1999 List Control displaying image thumbnails
Initializing the image list
Rating: none Zafir Anjum - 08/06/1998 Initializing the image list
Late binding of image - I_IMAGECALLBACK
Rating: none Zafir Anjum - 08/06/1998 Late binding of image - I_IMAGECALLBACK
Setting or removing an image for an item
Rating: none Zafir Anjum - 08/06/1998 Setting or removing an image for an item
Attaching a system imagelist to a list control
Rating: none Matt Esterly - 08/06/1998 Attaching a system imagelist to a list control
Using an imagelist with the header control
Rating: none Zafir Anjum - 08/06/1998 Using an imagelist with the header control
Setting a non-standard size image
Rating: none Zafir Anjum - 08/06/1998 Setting a non-standard size image
Displaying an image in the header
Rating: none Zafir Anjum - 08/06/1998 Displaying an image in the header
Views
Switching Views
Rating: none Zafir Anjum - 08/06/1998 Switching Views
Be Inventive. Be funny. Create a video and win a Sun Fire X4500 Server
$50 Rebate When You Purchase VMware Workstation! Get it Today.
Download: IBM Rational PurifyPlus V7.0. Start developing fast, reliable code in a single solution.
Download: Rational Application Developer. Quickly design, develop, analyze, test, & deploy apps.
RAVEN Extends Visual Studio for Requirements Development