home Tech Library Tech Forum
Publisher
 
Custom Controls in MFC       
 
 
List View Control and its Styles
 
 

 

A list view control displays a collection of items each consisting of an icon and a label. In addition to the window styles that apply to the common controls, there are styles specific to each new common control.
 
List View Control Styles
LVS_ICON Each item appears as a full-sized icon with a label below it. The user can drag the items to any location in the list control window.
LVS_SMALLICON Each item appears as a small icon with the label to the right of it. The user can drag the items to any location.
LVS_LIST Each item appears as a small icon with a label to the right of it. Items are arranged in columns and cannot be dragged to any arbitrary location by the user.
LVS_REPORT Each item appears on its own line with information arranged in columns. The leftmost column contains the small icon and label, and subsequent columns contain subitems as specified by the application.
LVS_ALIGNLEFT Left-aligns items in icon and small icon view.
LVS_ALIGNTOP Top-aligns items in icon and small icon view.
LVS_AUTOARRANGE Automatically arranges items in rows and columns in icon and small icon view.
LVS_SORTASCENDING Sorts items in ascending order.
LVS_SORTDESCENDING Sorts items in descending order.
LVS_SINGLESEL Only one item can be selected (default is multiple selections).
LVS_SHAREDIMAGELISTS Prevents the control from automatically deleting the image lists associated with it when it is deleted.
LVS_NOLABELWRAP Displays item text on a single line in icon view (default allows text wrapping).
LVS_EDITLABELS Allows item’s text to be edited in place.
LVS_OWNERDRAWFIXED In the report view, enables the owner window to paint items in response to a WM_DRAWITEM message.
LVS_NOSCROLL Disables scrolling. (Default allows scrolling.)
LVS_NOCOLUMNHEADER Does not display the header control that is by default displayed in the report view.
LVS_NOSORTHEADER Specifies that column headers do not respond to clicks in the report view.
   
   
   
  RELATED TOPICS  
Custom Controls in MFC
SubClassing a Window
Common Custom Controls in MFC
Creating the Common Controls
Slider Control and Styles
Spin Control and Styles
Tree View Control and Styles
Notification Messages by Common Controls
Property Sheets
How to create a Modal Property Sheet
 


 
           
Home | Profile | Users | Library | Publisher | Tech Forum | News | Contact Us