List control with single / double separator lines Pennsylvania

Placing row and column seperators in a listview

Local Companies

Fracture Technology Associates
(610) 262-1301
2412 Emrick Boulevard
Bethlehem, PA
Dellicker Strategies
(610) 395-6261
1647 Ashley Court
Kutztown, PA
Janis Technologies, Inc.
717-737-2935
2157 Market St.
Camp Hill, PA
Howell & Co. Inc
(814) 368-3513
13 Main Street
Bradford,, PA
Simply Software, Inc
(814) 362-5512
P.O. Box 78
Bradford,, PA
Global Business Solutions
412- 630-9111
109 Pineridge RD
Pittsburgh, PA
Owen-Alexander, LLC
(215) 257-5390
300 East Washington Street
Slatington, PA
LANtek, Inc.
(610) 776-7145
40 Willow Street
Kutztown, PA
DIVIUM, LLC
724-858-1422
645 E Pittsburgh St.
Greensburgh, PA
SuperUser Technologies, Inc.
(814) 362-5945
80 E. Corydon Street
Bradford,, PA

 

provided by: 
Originally published at Internet.com


This article describes how to add separator lines (single line or double line) to a list control derived from CListCtrl. This technique requires that the list control is owner drawn. This article also demonstrates how to prevent row selection in a list control.

grid_separator.gif (2590 bytes)

How to do it?



Let's assume that we have a class TVisualListCtrl derived from CListCtrl. Objects of this class correspond to list control resources (each list control must be ownerdrawn). In order to implement support for separator lines, we have to add several features to this class.

Step 1.

Add a public enum type containing the separator line identifiers and 2 public functions for inserting a separator line and checking whether the item is separator or not. class TVisualCtrlList : public CListCtrl { public: enum ESeparator { SEPARATOR_SINGLE, SEPARATOR_DOUBLE }; ..... public: .... BOOL IsSeparator(int row); int InsertSeparator(int row, ESeparator separator = SEPARATOR_SINGLE); };

Also create 2 constant strings (within a class or as local variables in a .cpp implementation file) which are inserted into the list control. These strings have a special meaning to the class implementation since they are actually aliases to separator lines. const CString SingleSeparator = _T("--"); const CString DoubleSeparator = _T("==="); ...

Read article at Internet.com site

Featured Local Company

Global Business Solutions

412- 630-9111
109 Pineridge RD
Pittsburgh, PA

Regional Articles
- List control with single / double separator lines Aliquippa PA
- List control with single / double separator lines Allentown PA
- List control with single / double separator lines Allison Park PA
- List control with single / double separator lines Altoona PA
- List control with single / double separator lines Ambler PA
- List control with single / double separator lines Apollo PA
- List control with single / double separator lines Aston PA
- List control with single / double separator lines Beaver Falls PA
- List control with single / double separator lines Beaver PA
- List control with single / double separator lines Belle Vernon PA
- List control with single / double separator lines Bellefonte PA
- List control with single / double separator lines Bensalem PA
- List control with single / double separator lines Berwick PA
- List control with single / double separator lines Bethel Park PA
- List control with single / double separator lines Bethlehem PA
- List control with single / double separator lines Birdsboro PA
- List control with single / double separator lines Bloomsburg PA
- List control with single / double separator lines Blue Bell PA
- List control with single / double separator lines Boyertown PA
- List control with single / double separator lines Bridgeville PA
- List control with single / double separator lines Broomall PA
- List control with single / double separator lines Bryn Mawr PA
- List control with single / double separator lines Butler PA
- List control with single / double separator lines Camp Hill PA
- List control with single / double separator lines Canonsburg PA
- List control with single / double separator lines Carlisle PA
- List control with single / double separator lines Carnegie PA
- List control with single / double separator lines Chalfont PA
- List control with single / double separator lines Chambersburg PA
- List control with single / double separator lines Chester PA
- List control with single / double separator lines Clairton PA
- List control with single / double separator lines Clarks Summit PA
- List control with single / double separator lines Clifton Heights PA
- List control with single / double separator lines Coatesville PA
- List control with single / double separator lines Collegeville PA
- List control with single / double separator lines Connellsville PA
- List control with single / double separator lines Conshohocken PA
- List control with single / double separator lines Coraopolis PA
- List control with single / double separator lines Cranberry Twp PA
- List control with single / double separator lines Darby PA
- List control with single / double separator lines Dillsburg PA
- List control with single / double separator lines Downingtown PA
- List control with single / double separator lines Doylestown PA
- List control with single / double separator lines Drexel Hill PA
- List control with single / double separator lines DuBois PA
- List control with single / double separator lines East Stroudsburg PA
- List control with single / double separator lines Easton PA
- List control with single / double separator lines Elizabethtown PA
- List control with single / double separator lines Elkins Park PA
- List control with single / double separator lines Ellwood City PA
- List control with single / double separator lines Emmaus PA
- List control with single / double separator lines Ephrata PA
- List control with single / double separator lines Erie PA
- List control with single / double separator lines Exton PA
- List control with single / double separator lines Feasterville Trevose PA
- List control with single / double separator lines Gettysburg PA
- List control with single / double separator lines Gibsonia PA
- List control with single / double separator lines Glenshaw PA
- List control with single / double separator lines Glenside PA
- List control with single / double separator lines Greensburg PA
- List control with single / double separator lines Hanover PA
- List control with single / double separator lines Harleysville PA
- List control with single / double separator lines Harrisburg PA
- List control with single / double separator lines Hatboro PA
- List control with single / double separator lines Hatfield PA
- List control with single / double separator lines Havertown PA
- List control with single / double separator lines Hazleton PA
- List control with single / double separator lines Hershey PA
- List control with single / double separator lines Hollidaysburg PA
- List control with single / double separator lines Hummelstown PA
- List control with single / double separator lines Huntingdon PA
- List control with single / double separator lines Huntingdon Valley PA
- List control with single / double separator lines Indiana PA
- List control with single / double separator lines Irwin PA
- List control with single / double separator lines Jeannette PA
- List control with single / double separator lines Jenkintown PA
- List control with single / double separator lines Johnstown PA
- List control with single / double separator lines Kennett Square PA
- List control with single / double separator lines King Of Prussia PA
- List control with single / double separator lines Kingston PA
- List control with single / double separator lines Kittanning PA
- List control with single / double separator lines Kutztown PA
- List control with single / double separator lines Lancaster PA
- List control with single / double separator lines Langhorne PA
- List control with single / double separator lines Lansdale PA
- List control with single / double separator lines Lansdowne PA
- List control with single / double separator lines Latrobe PA
- List control with single / double separator lines Lebanon PA
- List control with single / double separator lines Lehighton PA
- List control with single / double separator lines Levittown PA
- List control with single / double separator lines Lewistown PA
- List control with single / double separator lines Lititz PA
- List control with single / double separator lines Lock Haven PA
- List control with single / double separator lines Manheim PA
- List control with single / double separator lines Marcus Hook PA
- List control with single / double separator lines Mc Kees Rocks PA
- List control with single / double separator lines Mckeesport PA
- List control with single / double separator lines Meadville PA
- List control with single / double separator lines Mechanicsburg PA
- List control with single / double separator lines Media PA
- List control with single / double separator lines Monroeville PA
- List control with single / double separator lines Morrisville PA
- List control with single / double separator lines Nazareth PA
- List control with single / double separator lines New Castle PA
- List control with single / double separator lines New Cumberland PA
- List control with single / double separator lines New Kensington PA
- List control with single / double separator lines Newtown PA
- List control with single / double separator lines Newtown Square PA
- List control with single / double separator lines Norristown PA
- List control with single / double separator lines North Wales PA
- List control with single / double separator lines Oil City PA
- List control with single / double separator lines Palmyra PA
- List control with single / double separator lines Perkasie PA
- List control with single / double separator lines Philadelphia PA
- List control with single / double separator lines Phoenixville PA
- List control with single / double separator lines Pittsburgh PA
- List control with single / double separator lines Pittston PA
- List control with single / double separator lines Pottstown PA
- List control with single / double separator lines Pottsville PA
- List control with single / double separator lines Punxsutawney PA
- List control with single / double separator lines Quakertown PA
- List control with single / double separator lines Reading PA
- List control with single / double separator lines Red Lion PA
- List control with single / double separator lines Royersford PA
- List control with single / double separator lines Scranton PA
- List control with single / double separator lines Selinsgrove PA
- List control with single / double separator lines Sewickley PA
- List control with single / double separator lines Shippensburg PA
- List control with single / double separator lines Southampton PA
- List control with single / double separator lines State College PA
- List control with single / double separator lines Stroudsburg PA
- List control with single / double separator lines Telford PA
- List control with single / double separator lines Uniontown PA
- List control with single / double separator lines Upper Darby PA
- List control with single / double separator lines Verona PA
- List control with single / double separator lines Warminster PA
- List control with single / double separator lines Washington PA
- List control with single / double separator lines Wayne PA
- List control with single / double separator lines Waynesboro PA
- List control with single / double separator lines Waynesburg PA
- List control with single / double separator lines West Chester PA
- List control with single / double separator lines West Mifflin PA
- List control with single / double separator lines Wexford PA
- List control with single / double separator lines Whitehall PA
- List control with single / double separator lines Wilkes Barre PA
- List control with single / double separator lines Williamsport PA
- List control with single / double separator lines Willow Grove PA
- List control with single / double separator lines York PA
Related Local Events
30th Annual York County Chamber Business & Technology Expo Sneak Preview
Dates: 5/4/2010 - 5/4/2010
Location: Toyota Arena York Expo Center
York, PA
View Details

The 30th Annual York County Chamber Business & Technology Expo presented by DOCEO Office Solutions
Dates: 5/5/2010 - 5/5/2010
Location: Toyota Arena York Expo Center
York, PA
View Details

Career & Technical Awards Luncheon
Dates: 5/13/2010 - 5/13/2010
Location: Heritage Ballrooms
Holmes, PA
View Details

Tech U: Excel
Dates: 3/13/2010 - 3/13/2010
Location: PA CareerLink Allegheny West Robinson Plaza Two
Pittsburgh, PA
View Details

Learn about Windows 7
Dates: 2/10/2010 - 2/10/2010
Location: The Delaware County Chamber of Commerce
Media, PA
View Details

Topics: 
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML